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

#1621 optional decode timedelta #4071

Merged
merged 6 commits into from
May 19, 2020

Conversation

aurghs
Copy link
Collaborator

@aurghs aurghs commented May 16, 2020

Releated to ticket #1621. Add decode_timedelta kwargs in open_dataset, xr.open_datarray, xr.open_zarr, xr.decode_cf. If not passed explicitly the behaviour is not changed.

  • Tests added for xr.decode_cf.
  • Passes isort -rc . && black . && mypy . && flake8
  • Fully documented, including whats-new.rst for all changes and api.rst for new API

@@ -477,6 +485,7 @@ def maybe_decode_store(store, lock=False):
chunks,
drop_variables,
use_cftime,
decode_timedelta,
Copy link
Member

@shoyer shoyer May 19, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In theory, it would be better organized to add this argument after decode_times, but for now what you have done here putting it at the end is a good choice to preserve backwards compatibility. I made a note about making most open_dataset arguments keyword only in #4080.

Copy link
Member

@shoyer shoyer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice -- looks great to me!

Thanks!

@shoyer shoyer merged commit 742d000 into pydata:master May 19, 2020
@shoyer
Copy link
Member

shoyer commented May 19, 2020

Thank you @aurghs, I'm looking forward to more great PRs!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants