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

Add tests and improve upcast type compatibility (part of #845) #959

Merged
merged 5 commits into from
Dec 27, 2019

Conversation

jthielen
Copy link
Contributor

@jthielen jthielen commented Dec 27, 2019

As a part of #845, this PR adds tests for upcast type compatibility with xarray (just tests of deferral/commutativity, for full integration tests, see @keewis's work in xarray's test suite). Along the way came a check for upcast types on Quantity creation (closing #479), changing to checking actual types rather than names (otherwise xarray's and uncertainties Variable conflict), exposing the upcast type collection, and adding the @check_implemented decorator to several arithmetic operations where it was missing.

Also, I hope that the xarray tests only being run on the latest available python and xarray versions is sufficient. If that should be changed, please let me know (if a more complete matrix is desired, it may be worth looking at reconfiguring the Travis configuration to use a build matrix).

@hgrecco hgrecco added this to the 0.10 milestone Dec 27, 2019
@hgrecco
Copy link
Owner

hgrecco commented Dec 27, 2019

bors r+

bors bot added a commit that referenced this pull request Dec 27, 2019
959: Add tests and improve upcast type compatibility (part of #845) r=hgrecco a=jthielen

As a part of #845, this PR adds tests for upcast type compatibility with xarray (just tests of deferral/commutativity, for full integration tests, see @keewis's work in xarray's test suite). Along the way came a check for upcast types on Quantity creation (closing #479), changing to checking actual types rather than names (otherwise xarray's and uncertainties `Variable` conflict), exposing the upcast type collection, and adding the `@check_implemented` decorator to several arithmetic operations where it was missing.

Also, I hope that the xarray tests only being run on the latest available python and xarray versions is sufficient. If that should be changed, please let me know (if a more complete matrix is desired, it may be worth looking at reconfiguring the Travis configuration to use a [build matrix](https://docs.travis-ci.com/user/build-matrix/)).

- [x] Closes #479; Progress towards #845
- [x] Executed ``black -t py36 . && isort -rc . && flake8`` with no errors
- [x] The change is fully covered by automated unit tests
- [x] Documented in docs/ as appropriate
- [x] Added an entry to the CHANGES file


Co-authored-by: Jon Thielen <github@jont.cc>
@bors
Copy link
Contributor

bors bot commented Dec 27, 2019

Build succeeded

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Preserve ndarray-like magnitudes or reject them from the start
2 participants