[x] This PR addresses an already opened issue (for bug fixes / features)
This PR fixes #217
[ ] (If applicable) Documentation has been added / updated (for bug fixes / features).
[x] (If applicable) Tests have been added.
[x] This PR does not seem to break the templates.
[x] HISTORY.rst has been updated (with summary of main changes).
[x] Link to issue (:issue:number) and pull request (:pull:number) has been added.
What kind of change does this PR introduce?
Fix build_path to it uses Period objects, allowing dates from outside the datetime64[ns] bounds.
Inject a better __format__() in pd.Period, so it's easier to use.
Does this PR introduce a breaking change?
No
Other information:
I could have avoided the injection by using datetime64[s] instead, but this requires pandas 2. Clisops 0.9.6's conda package doesn't have the good dependencies, so we currently can't install pandas 2 in a conda env for xscen. This should be fixed soon with clisops 0.9.7.
Pull Request Checklist:
number
) and pull request (:pull:number
) has been added.What kind of change does this PR introduce?
build_path
to it usesPeriod
objects, allowing dates from outside thedatetime64[ns]
bounds.__format__()
inpd.Period
, so it's easier to use.Does this PR introduce a breaking change?
No
Other information:
I could have avoided the injection by using
datetime64[s]
instead, but this requires pandas 2. Clisops 0.9.6's conda package doesn't have the good dependencies, so we currently can't install pandas 2 in a conda env for xscen. This should be fixed soon with clisops 0.9.7.