Skip to content
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

Adapt to current pint #1212

Merged
merged 3 commits into from
Oct 25, 2022
Merged

Adapt to current pint #1212

merged 3 commits into from
Oct 25, 2022

Conversation

aulemahal
Copy link
Collaborator

@aulemahal aulemahal commented Oct 25, 2022

Pull Request Checklist:

  • This PR addresses an already opened issue (for bug fixes / features)
  • Tests for the changes have been added (for bug fixes / features)
    • (If applicable) Documentation has been added / updated (for bug fixes / features)
  • HISTORY.rst has been updated (with summary of main changes)
    • Link to issue (:issue:number) and pull request (:pull:number) has been added
  • The relevant author information has been added to AUTHORS.rst and .zenodo.json

What kind of change does this PR introduce?

  • Changes how the UnitRegistry is declared, by copying the one from cf-xarray.
  • I also copied the declaration of the % unit from cf-xarray
  • This removed the need to import things that were refactored in pint0.20, so it fixes this.
  • It also allowed to remove the string processing stuff from units2pint, this is now directly in the registry's preprocessors.
  • I removed the force_ndarray_like=True option that cf-xarray uses because it made our tests fail. I haven't looked further, this is to be done in Phase out convert_calendar and some units processing #1010.

Does this PR introduce a breaking change?

It shouldn't!

@Zeitsperre Zeitsperre added bug Something isn't working standards / conventions Suggestions on ways forward labels Oct 25, 2022
@Zeitsperre Zeitsperre added this to the v0.39 milestone Oct 25, 2022
@Zeitsperre Zeitsperre merged commit a5127e0 into master Oct 25, 2022
@Zeitsperre Zeitsperre deleted the fix-percent-pint branch October 25, 2022 20:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working standards / conventions Suggestions on ways forward
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pint 0.20 incompatible with Xclim unit registry processes
2 participants