-
Notifications
You must be signed in to change notification settings - Fork 2
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
Use xsdba #530
base: main
Are you sure you want to change the base?
Conversation
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
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.
Explicitly requesting changes so that we don't forget to replace the xsdba
dependency with a stable version.
@@ -63,6 +63,7 @@ dependencies = [ | |||
"toolz", | |||
"xarray >=2023.11.0, !=2024.6.0, <2024.10.0", # FIXME: 2024.10.0 breaks rechunker with zarr | |||
"xclim >=0.53.2, <0.55", | |||
"xsdba@git+https://[email protected]/Ouranosinc/xsdba.git@naming_conventions", |
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.
FYI, this will not pass the PyPI
smell test. Pointing to git branches for dependencies is forbidden on PyPI
(thankfully).
We can release a patch (for xsdba
) when the branch (on xsdba
) is merged.
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.
We could just have a new xsdba release before this PR is merged?
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.
Yep. Exactly that.
Co-authored-by: Pascal Bourgault <[email protected]>
src/xscen/biasadjust.py
Outdated
group: sdba.Grouper | str | dict | None = None, | ||
xclim_train_args: dict | None = None, | ||
group: xsdba.Grouper | str | dict | None = None, | ||
xsdba_train_args: dict | None = None, |
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.
This will be a breaking change.
We should instead support both options for a while, but issue a FutureWarning
if someone uses xclim_train/adjust_args
. The rest of the code can use the new names, just with xsdba_train/adjust_args = xclim_train/adjust_args
for those cases.
In extract.py::resample, there's an issue with the new xclim, presumably following the recent PR about missing method > complete = ~xc.core.missing.MISSING_METHODS[missmeth](
da, target_frequency, initial_frequency
)(**missing) |
@coxipi Je m'en occupe, c'est ma faute! |
Pull Request Checklist:
number
) and pull request (:pull:number
) has been added.What kind of change does this PR introduce?
xscen
directly importxsdba
Does this PR introduce a breaking change?
xclim_train_args -> xsdba_train_args and so on, so yes.
Other information: