-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
add freq as CFTimeIndex property and to CFTimeIndex.__repr__ #4597
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
add freq as CFTimeIndex property and to CFTimeIndex.__repr__ #4597
Conversation
Hello @aaronspring! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found: There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻 Comment last updated at 2020-11-23 16:02:32 UTC |
I also get this error locally. somehow in some envs xarray/xarray/coding/frequencies.py Line 261 in d9ebcaf
|
Actually, there's no inconsistency here: To fix the CI, you might need to fix both the |
also should it be frequency or freq? |
the parameter is named |
@aaronspring regarding the local test failure -- which version of |
@spencerclark, see the build logs of the |
Thanks @keewis I didn't realize this was also happening in CI. Yeah, the version is definitely the problem:
My vote for now would be to skip these tests on versions less than 1.1.0. Perhaps we could also think about adding a nicer error message if the version is not up-to-date enough.
xarray/xarray/tests/test_cftimeindex.py Lines 1180 to 1192 in a219215
|
Ah I need to account for the docstring examples with only one or two items, maybe dropping freq then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @aaronspring; this looks great. Just a few small things. Could you also add CFTimeIndex.freq
to doc/api-hidden.rst
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, this looks good to me. I agree with @keewis that it would be good to move CFTimeIndex.freq
to the group of CFTimeIndex
attributes in api-hidden.rst
, but it is not strictly necessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, @aaronspring, looks good to me, too. Let's merge?
LGTM too. Thanks @aaronspring |
Thanks for the smooth review process @spencerkclark @keewis |
isort . && black . && mypy . && flake8
whats-new.rst
api.rst