-
Notifications
You must be signed in to change notification settings - Fork 49
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
[DOCS] Update docstring for date2num (module function) #483
[DOCS] Update docstring for date2num (module function) #483
Conversation
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.
Can you please fix the Unit.date2num similarly ?
It seems increasingly that I made a mess of reviewing #467 !
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 @ukmo-ccbunney
I have a fix for those pre-commit errors in #484, if you wanted to merge that one first? |
( merge-in fixed the pre-commit failure. -- thanks @trexfeathers for #484 ) |
* main: [DOCS] Update docstring for date2num (module function) (SciTools#483) Modernise setup scripts (SciTools#484) Make antlr optional (SciTools#423) Ruff: smaller steps (SciTools#364) Updated docstring for num2date. (SciTools#467) updated conda lock files (SciTools#479) Revert to 00:03 Mondays for lockfile updates. (SciTools#480) New trigger time for GMT. (SciTools#478) Check lockfile updates @ 3pm daily (temporary for testing). (SciTools#477) Fixlocks (SciTools#470) # Conflicts: # pyproject.toml # requirements/cf-units.yml # requirements/locks/py310-lock-linux-64.txt # requirements/locks/py310-lock-osx-64.txt # requirements/locks/py310-lock-win-64.txt # requirements/locks/py311-lock-linux-64.txt # requirements/locks/py311-lock-osx-64.txt # requirements/locks/py311-lock-win-64.txt # requirements/locks/py312-lock-linux-64.txt # requirements/locks/py312-lock-osx-64.txt # requirements/locks/py312-lock-win-64.txt
🚀 Pull Request
As per #467, but for module function
date2num
The underlying cftime package will now preferentially return an integer rather than a float if if encoded datetime(s) can be expressed exactly as an integer.
Description
Docstring for
cf_units.date2num
updated to reflect this underlying change in behaviour.Extra example added showing outputs of type integer where encoded allows.
#467 fixed docstring for
cf_units.Unit.date2num
, but this module level function was missed.Fixes: #202