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 support for latest versions of h5py, sympy, numpy, and pytest #115

Merged
merged 10 commits into from
Jan 10, 2020

Conversation

ngoldbaum
Copy link
Member

This fixes a number of issues caused by updates to upstream libraries we depend on. This is a bit of a grab-bag PR that makes the tests pass again on the latest versions of our dependencies. Unfortunately I can't easily issue these changes as separate PRs since the tests will be broken without all of these coming in at once. If you have questions about reviewing this I'm happy to help out.

To catch issues caused by upstream changes more quickly in the future I've updated the tox config to always recreate a virtualenv. This will ensure we get test failures on the cron job test whenever an upstream release breaks our test suite.

I also made the following updates to our tox config:

  • Add testing for python 3.8, update older python minor versions
  • Remove pytest version constraint now that issue with pytest-doctest-plus has been fixed.
  • Pin coverage to be older than coverage 5.0, which allows us to work around Coverage in parallel failing nedbat/coveragepy#883

There also some code changes, in particular

  • Avoid deprecation warnings from h5py by always specifying the file mode in h5py.open.
  • Fix usage of rationalize transformer in our usage of sympy.parse_expr. Before we were not using it correctly since we needed to run auto_number first.
  • Fix latex output for non-float unit scalar multiples.
  • Add support for NumPy 1.8 by fixing handling of the out keyword argument for ufuncs that have multiple outputs.
  • Fix warnings from Pint caused by our implicity using Pint.quantity.__array__.
  • Make the unit registry saved to HDF5 files smaller to avoid the attribute size limit triggered in newer versions of h5py. Fixes h5py throwing errors on yt-4.0 branch yt#2404.

@jzuhone
Copy link
Contributor

jzuhone commented Dec 31, 2019

Add support for NumPy 1.8 by fixing handling of the out keyword argument for ufuncs that have multiple outputs.

Do you mean NumPy 1.18?

@ngoldbaum
Copy link
Member Author

Yes, sorry for the typo.

@jzuhone
Copy link
Contributor

jzuhone commented Jan 8, 2020

@ngoldbaum do you want anyone else to have a look at this before merging?

@ngoldbaum
Copy link
Member Author

I was a little worried about the test failures in yt from the changes in this PR. I'm not convinced that the yt failures are something that can't happen with unyt, since unyt's Unit class doesn't subclass sympy's Expr class. I'll go ahead and merge this in now. Thanks for taking a look John.

@ngoldbaum ngoldbaum merged commit 34550a4 into yt-project:master Jan 10, 2020
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.

h5py throwing errors on yt-4.0 branch
2 participants