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 numpy 1.18.1 #2448

Merged
merged 10 commits into from
Feb 11, 2020
Merged

add support for numpy 1.18.1 #2448

merged 10 commits into from
Feb 11, 2020

Conversation

munkm
Copy link
Member

@munkm munkm commented Feb 7, 2020

PR Summary

This should fix the issues reported in #2445 caused by updates in our upstream packages.

For the yt_units errors I followed the same approach taken in yt-project/unyt#115. Thanks @ngoldbaum; your work made this a lot easer for me.

PR Checklist

  • Code passes flake8 checker

@ngoldbaum
Copy link
Member

Thank you for backporting that!

Maybe we should bump the numpy version in test_requirements.txt too?

@munkm
Copy link
Member Author

munkm commented Feb 7, 2020

You're welcome! 🎉 It was a fun learning experience.

So we don't set the version for numpy in test_requirements, but I've bumped the version in the travis config file!

Copy link
Member

@neutrinoceros neutrinoceros left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job, thanks for fixing this !
I have several very minor suggestions but nothing critical. Although I'm noting that bumping the test version number for numpy on travis broke the py27 tests, for obvious reasons. Is this a good time to just drop py27, testwise ?

yt/visualization/color_maps.py Show resolved Hide resolved
yt/units/tests/test_ytarray.py Show resolved Hide resolved
yt/units/tests/test_ytarray.py Outdated Show resolved Hide resolved
yt/units/yt_array.py Show resolved Hide resolved
@ngoldbaum
Copy link
Member

Hey Clement,

All of the changes to yt.units are backported from unyt and probably shouldn’t be changed to make future backports (if any) easier.

@neutrinoceros
Copy link
Member

Oh right, my mistake. I did not realise the nature of the backport. Sorry !

@munkm
Copy link
Member Author

munkm commented Feb 8, 2020

Ok, I've done the following:

  • removed testing on travis for Python 2.7 with newer versions of upstream packages
  • retained testing minimal versions for py2.7
  • added two new test jobs in travis for minimal versions of both unit tests and answer tests in python 3.6

We do have a test job running python 3.5, which is set to be sundown in September. Do we want to remove this job and add a new one for py 3.8? (note we also don't have tests on travis for py3.7 yet either)

@ngoldbaum
Copy link
Member

retained testing minimal versions for py2.7

Why keep these? I don’t think we need to have any python2.7 testing at all.

Dropping 3.5 and adding 3.7 and 3.8 makes sense to me.

That said, I think there only needs to be one minimal dependency version job, with MINIMAL=1, that runs on python3.6 with the earliest known supported combination of packages we can easily install on CI.

I don’t think there’s enough marginal benefit to justify the additional complication of doing the minimal tests on multiple python versions, especially now that we’ve dropped python2.7 and don’t have to worry about 2/3 compatibility anymore.

@munkm
Copy link
Member Author

munkm commented Feb 8, 2020

Why keep these? I don’t think we need to have any python2.7 testing at all.

I'm happy to remove them if we decide that's best. I mostly kept them because we could catch backwards incompatibilities with them. But since we're dropping py2 support it makes sense to remove them. If we do, then there will only be two minimal dependency version jobs (for unit tests and answer tests in python3) and the issue with multipleMINIMAL definitions will be resolved.

@neutrinoceros
Copy link
Member

The test_ufuncs test is now failing against python 3.6 (minimal deps run), though you clearly bumped the minimal numpy version to 1.18.1... I'm not getting it.

@ngoldbaum
Copy link
Member

ngoldbaum commented Feb 10, 2020

No, the minimal numpy is 1.12 on 3.6.

@munkm it might be easiest to only run these multiple-output ufunc tests on sufficiently new numpy. Another option would be to bump the minimum required numpy to match unyt (1.13), those tests seem to pass for unyt on numpy 1.13.

Copy link
Member

@neutrinoceros neutrinoceros left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all -remaining- tests are now passing, so I'm updating my review's status to "approved". Thanks again !

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.

3 participants