Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Roll coords deprecation #5653

Merged
merged 14 commits into from
Oct 1, 2021
Merged

Conversation

TomNicholas
Copy link
Member

@TomNicholas TomNicholas commented Jul 30, 2021

The default behaviour of da.roll() caught me out whilst trying to hand-write a diff function, so I completed the transition to defaulting to roll_coords=False as the default. It's been throwing a warning for 3 years so I think it's time!

I also improved the docstrings and added type hints whilst there, although mypy doesn't seem to like some of the type hinting :/

  • Completes deprecation started in Add option to not roll coords #2360
  • Tests updated
  • Passes pre-commit run --all-files
  • User visible changes (including notable bug fixes) are documented in whats-new.rst

@github-actions
Copy link
Contributor

github-actions bot commented Jul 30, 2021

Unit Test Results

         6 files  ±0           6 suites  ±0   53m 11s ⏱️ ±0s
16 226 tests ±0  14 494 ✔️ ±0  1 732 💤 ±0  0 ±0 
90 552 runs  ±0  82 375 ✔️ ±0  8 177 💤 ±0  0 ±0 

Results for commit a62e313. ± Comparison against base commit a62e313.

♻️ This comment has been updated with latest results.

@max-sixty
Copy link
Collaborator

@TomNicholas typing should be fixed!

xarray/core/dataarray.py Outdated Show resolved Hide resolved
xarray/core/dataarray.py Outdated Show resolved Hide resolved
xarray/core/dataarray.py Outdated Show resolved Hide resolved
xarray/core/dataarray.py Outdated Show resolved Hide resolved
xarray/core/dataset.py Outdated Show resolved Hide resolved
xarray/core/dataset.py Outdated Show resolved Hide resolved
xarray/core/dataset.py Outdated Show resolved Hide resolved
TomNicholas and others added 7 commits August 2, 2021 11:40
Co-authored-by: Mathias Hauser <mathause@users.noreply.github.com>
Co-authored-by: Mathias Hauser <mathause@users.noreply.github.com>
Co-authored-by: Mathias Hauser <mathause@users.noreply.github.com>
Co-authored-by: Mathias Hauser <mathause@users.noreply.github.com>
Co-authored-by: Mathias Hauser <mathause@users.noreply.github.com>
@TomNicholas
Copy link
Member Author

Thank you very much @max-sixty and @mathause ! I think this should be ready to merge now.

xarray/core/indexes.py Outdated Show resolved Hide resolved
@max-sixty
Copy link
Collaborator

@TomNicholas shall we merge?

@dcherian dcherian added the plan to merge Final call for comments label Sep 29, 2021
@TomNicholas TomNicholas merged commit a62e313 into pydata:main Oct 1, 2021
snowman2 pushed a commit to snowman2/xarray that referenced this pull request Feb 9, 2022
* changed default

* updated tests

* updated whats-new

* Fix mypy

* Update xarray/core/dataarray.py

Co-authored-by: Mathias Hauser <mathause@users.noreply.github.com>

* Update xarray/core/dataarray.py

Co-authored-by: Mathias Hauser <mathause@users.noreply.github.com>

* Update xarray/core/dataarray.py

Co-authored-by: Mathias Hauser <mathause@users.noreply.github.com>

* Update xarray/core/dataset.py

Co-authored-by: Mathias Hauser <mathause@users.noreply.github.com>

* Update xarray/core/dataset.py

Co-authored-by: Mathias Hauser <mathause@users.noreply.github.com>

* tidy up specification of default argument in docstring

* isort linting

* Update xarray/core/indexes.py

Co-authored-by: Maximilian Roos <m@maxroos.com>
Co-authored-by: Mathias Hauser <mathause@users.noreply.github.com>
Co-authored-by: Deepak Cherian <dcherian@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plan to merge Final call for comments
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants