-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Pint support for top-level functions #3611
Conversation
it seems the changes to |
the |
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.
the failing matrix multiply tests should be fixed by hgrecco/pint#926.
I think this is ready for review and merge?
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.
thanks @keewis
Should I have edited py36-min-nep18 instead?Should I have edited py36-min-nep18 instead?
Let's do this once there's a pint release.
Thanks for the review @dcherian ! @keewis FYI I am starting a new job so will be lying low on xarray for a couple of months, forgive the temporary pause in speedy reviews. It was great to work together for the past few months! The whole team is looking forward to working more closely with you in the future. We'd like to invite you to be a maintainer: could you drop me an email at |
I added a If this is okay for now, we could merge? |
This should be ready for review / merge once again. It seems that after the merge of #3706 all that was left to get the top-level function tests to pass was to clean up those tests. |
Looks good! |
Yeah, thanks @keewis |
…e-size * upstream/master: (24 commits) Fix alignment with join="override" when some dims are unindexed (pydata#3839) Fix CFTimeIndex-related errors stemming from updates in pandas (pydata#3764) Doctests fixes (pydata#3846) add xpublish to related projects (pydata#3850) update installation instruction (pydata#3849) Pint support for top-level functions (pydata#3611) un-xfail tests that append to netCDF files with scipy (pydata#3805) remove panel conversion (pydata#3845) Add nxarray to related-projects.rst (pydata#3848) Implement skipna kwarg in xr.quantile (pydata#3844) Allow `where` to receive a callable (pydata#3827) update macos image (pydata#3838) Label "Installed Versions" item in Issue template (pydata#3832) Add note on diff's n differing from pandas (pydata#3822) DOC: Add rioxarray and other external examples (pydata#3757) Use stable RTD image. removed mention that 'dims' are inferred from 'coords'-dict when omit… (pydata#3821) Coarsen keep attrs 3376 (pydata#3801) Turn on html repr by default (pydata#3812) Fix zarr append with groups (pydata#3610) ...
This PR tries to get the pint integration tests (see #3594) to pass. To make sure this does not become a giant PR, it is limited to the top-level functions and the work on the tests for
DataArray
andDataset
will be done in other PRs.I added pint master to the
upstream-dev
CI since that way CI finally helps finding bugs. Should I have editedpy36-min-nep18
instead?black . && mypy . && flake8
whats-new.rst
for all changes andapi.rst
for new APIAlso, I finally ran into a situation where I have to use
assert_allclose
instead ofassert_equal_with_units
. However,assert_allclose
does not check for identical units, I think? Would it make sense to copy the code ofassert_allclose
and add the strict unit checking or would it be better to just useassert_allclose
and something likeassert extract_units(expected) == extract_units(actual)
?Failing tests list from #3594:
align
:needs more investigationpartially blocked byworks (but units inwhere
,IndexVariable
and a bug inassert_equal_with_units
and / or the tests, also a behaviour decision on alignIndexVariable
still fail)combine_by_coords
:needs more investigationpartially blocked byworks (but units inIndexVariable
and a test bug (due to assign_coords with mixed DataArray / array args removes coords #3483)IndexVariable
still fail)combine_nested
:needs more investigationblocked byworks (but units inreindex
IndexVariable
still fail)concat
:needs more investigationworks (but units inIndexVariable
still fail)merge
:needs more investigationworks (but units inIndexVariable
still fail)full_like
:blocked by Expected behavior ofpint
currently does not implementcopyto
np.*_like
functions hgrecco/pint#882where
:needs more investigationunit is stripped becauseworkspint
does not implementastype
and test bug intest_where_dataset
dot
:workspint
currently does not implementeinsum