Skip to content

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

Merged
merged 7 commits into from
Oct 6, 2017
Merged

Conversation

brhillman
Copy link
Contributor

@brhillman brhillman commented Oct 5, 2017

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.

  • Closes pynio backend broken in python 3 #1611
  • Tests added / passed
  • Passes git diff upstream/master **/*py | flake8 --diff
  • Fully documented, including whats-new.rst for all changes and api.rst for new API

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.
@brhillman
Copy link
Contributor Author

brhillman commented Oct 5, 2017

I'm not sure why but git diff upstream/master | flake8 --diff is reporting some non-conforming lines that seem to follow conventions used in the surrounding code, and in lines that I did not modify (attached).
flake8_diff.txt

Copy link
Member

@jhamman jhamman left a 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)?

- h5netcdf
- matplotlib
- netcdf4
- pynio=dev python=3
Copy link
Member

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?

Copy link
Contributor Author

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
Copy link
Member

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.

Copy link
Contributor Author

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.
@jhamman
Copy link
Member

jhamman commented Oct 5, 2017

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.

@brhillman
Copy link
Contributor Author

@jhamman no problem, more than happy to finally be able to contribute in some way. Thanks for your help putting this together!

Copy link
Member

@shoyer shoyer left a 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

@jhamman jhamman merged commit 5bd4015 into pydata:master Oct 6, 2017
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.

pynio backend broken in python 3
3 participants