[DOCS] Update docstring for date2num (module function)#483
Merged
pp-mo merged 5 commits intoSciTools:mainfrom Sep 26, 2024
Merged
[DOCS] Update docstring for date2num (module function)#483pp-mo merged 5 commits intoSciTools:mainfrom
pp-mo merged 5 commits intoSciTools:mainfrom
Conversation
Collaborator
|
I have a fix for those pre-commit errors in #484, if you wanted to merge that one first? |
Member
|
( merge-in fixed the pre-commit failure. -- thanks @trexfeathers for #484 ) |
stephenworsley
added a commit
to stephenworsley/cf-units
that referenced
this pull request
Sep 27, 2024
* 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🚀 Pull Request
As per #467, but for module function
date2numThe 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.date2numupdated 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