{{ message }}
Feature cfpint - #7006
Draft
pp-mo wants to merge 10 commits into
Draft
Feature cfpint#7006pp-mo wants to merge 10 commits into
pp-mo wants to merge 10 commits into
Conversation
* separate cfpint unit handling to experimental context manager * fix default_units_class logic * address review comments
* Enable testing against latest cfpint. Revert tests scope. * Re-enable None units assignment. * Reinstate CfUnit.from_unit calls cf_units.as_unit first. * Ensure 'None' units become 'unknown's. * Make repr of CfUnit backwards-compatible. * Revert temporary/debug changes. * Fix some random test failures. * Install pint/cfpint for all nox sessions. * Disable benchmark-validate. * Make iris importable without cfpint. * Re-enable benchmarks-validate. * Install pint/cfpint for tests only.
* fix USE_CFPINT behaviour * lint fix * refactor and move code to experimental.units * move code back * ruff fix * add wrapping behaviour and tests * fix numeric unit behaviour * ignore mypy unreachable error * address review comments * remove tests * allow pint to be None
* Separate the cf_units emulation layer from permanent behaviours of the Iris 'PintUnit'. * Move all units code into a separate iris.common.units submodule. * Knockon test fixes. * Extend special cfpint installs to doctests, wheels and RTD build. * Adjust docstrings, add deprecations for all cf_units compatibility methods. * Use enums and constants for pint unit categories. * Update lib/iris/experimental/units.py Co-authored-by: Martin Yeo <40734014+trexfeathers@users.noreply.github.com> * Update lib/iris/experimental/units.py Co-authored-by: Martin Yeo <40734014+trexfeathers@users.noreply.github.com> * Update lib/iris/experimental/units.py Co-authored-by: Martin Yeo <40734014+trexfeathers@users.noreply.github.com> * Update lib/iris/common/units/_pint.py Co-authored-by: Martin Yeo <40734014+trexfeathers@users.noreply.github.com> * Update lib/iris/common/units/_pint.py Co-authored-by: Martin Yeo <40734014+trexfeathers@users.noreply.github.com> * Update lib/iris/common/units/_pint.py Co-authored-by: Martin Yeo <40734014+trexfeathers@users.noreply.github.com> * Fix deprecation versions. * Small review actions. * Use the category constants. * Some suggestions for fully harnessing Enums. (#126) --------- Co-authored-by: Martin Yeo <40734014+trexfeathers@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Templating
This PR includes changes that may be worth sharing via templating. For each file listed below, please either:
- Action the suggestion via a pull request editing/adding the relevant file in the SciTools/.github
templates/directory. 1 - Raise an issue against the SciTools/.github repo for the above action if you really don't have 10mins spare right now. Include an assignee, to avoid it being forgotten.
- Dismiss the suggestion if the changes are not suitable for templating.
You will need to dismiss this review before this PR can be merged. Recommend the reviewer does this as their final action before merging, as this text will continually update as commits come in.
Template candidates
The following changed files are not currently templated, but their parent directories suggest they may be good candidates for a new template to be created:
Footnotes
-
Include this text in the PR body to avoid any notifications about applying the template changes back to the source repo!
@scitools-templating: please no update notification on: iris↩
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.

Just here to show the current state of the FEATURE_cfpint wrt main,
i.e. a useful summary of all the changes.