-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Fix py3 pynio backend #1612
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
Fix py3 pynio backend #1612
Conversation
Update pynio backend to work with python 3. Previous version accessed the iteritems() method of of the Nio variables object, which no longer exists in the python 3 version. Instead, access the items() method here.
Add tests for development version of pynio with python3 support. There is currently no official release version of pynio with python3 support, so we need to pull in the development version from the ncar conda channel to use pynio in python 3 environments and to run the pynio tests in the test suite. Also fixes a bug in the test initialization in which the presence of the pynio library was tested by trying to import "pynio" instead of "Nio" (the actual name of the library).
Add notes to big fixes section in documentation to highlight changes.
I'm not sure why but |
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.
Note that I've updated the checkbox above to be: git diff upstream/master **/*py | flake8 --diff
. flake8
doesn't know how to lint rst/yml so it has been throwing extra warnings. I've fixed this in #1485.
This looks pretty good. One small comment but this should basically work. Can you update with the latest master branch so the tests have a chance to pass (#1610)?
ci/requirements-py36-pynio-dev.yml
Outdated
- h5netcdf | ||
- matplotlib | ||
- netcdf4 | ||
- pynio=dev python=3 |
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.
do we need the python=3 piece here?
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.
Nope, fixed.
@@ -59,6 +59,8 @@ matrix: | |||
env: CONDA_ENV=py36-bottleneck-dev | |||
- python: 3.6 | |||
env: CONDA_ENV=py36-condaforge-rc | |||
- python: 3.6 | |||
env: CONDA_ENV=py36-pynio-dev |
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.
add this same block to just after line 41. Travis requires these allowed_failures
tests to be listed in the main test matrix too.
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.
Gotcha. Done.
Fix requirements for py36-pynio-dev test to remove unnecessary option.
Added tests were only specified in the allowed failures and needed to be added to the main include block as well.
This looks like its complete. Thanks @brhillman! @shoyer - any problem adding another dev test for pynio? I think this should be a temporary addition, one that can be removed after pynio produces a full release with python3 support. |
@jhamman no problem, more than happy to finally be able to contribute in some way. Thanks for your help putting this together! |
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.
This looks great to me. Thanks!
@jhamman added another build for pynio-dev seems fine to me
Fix backend for pynio with python 3 support. Also fixes tests for pynio, and adds a test for development version of pynio that includes python 3 support until pynio releases an official version with python 3 support.
git diff upstream/master **/*py | flake8 --diff
whats-new.rst
for all changes andapi.rst
for new API