-
Notifications
You must be signed in to change notification settings - Fork 266
[NIXIO] version checks #636
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
[NIXIO] version checks #636
Conversation
|
Hello @achilleas-k! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found: There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻 Comment last updated at 2019-07-26 18:48:18 UTC |
271bf2c to
fd38d95
Compare
| nixverstr = nix.__version__ | ||
| nixver = nixverstr.split(".") | ||
|
|
||
| try: |
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.
Would it makes sense to use packaging.version for the version handling here instead of doing explicit string handling?
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.
I considered it and since the packaging module isn't in the standard library, I didn't want to add an extra dependency. I only now realise that it's part of the setuptools and pip group of modules so it's pretty close to standard.
I'll amend.
|
Regarding the errors, I noticed them when preparing this PR and opened an issue on our fork: G-Node#21 At the time it looked like it was only occurring on macOS but it looks like it's happening on circle as well. Haven't had the chance to investigate yet. |
fd38d95 to
cf8b084
Compare
|
Amended to use To allow betas and dev releases of 1.5, the version comparison is made against the base_version of the installed nixio module. If the version string is not understood for any reason, a warning is presented, but usage is allowed. |
|
Looks like the travis environments don't include the |
|
Except for Py3.4? That's strange. |
|
Quite strange. I also assumed circle was failing for the old reason, but it looks like those envs don't have the module either. |
Currently the IO requires NIXPy (nixio) version 1.5.0 or greater (betas included). We use distutils.version to make the version string comparison. The NIXIO version string prefix 'v' is trimmed.
- Wrapped long lines - Broke several long lines into multiple statements (deep nested dictionary access) - Fixed baserawio import (relative import path)
Run the same version check from the NixIO in the constructor of the NIXRawIO
cf8b084 to
4f4e8a8
Compare
|
Changed to distutils.version. |
This PR adds a version compatibility check function to the NIX IO.
Currently the IO requires NIXPy (nixio) version 1.5 or greater (betas included). The version checker only checks the first two components of the version string.
The same function is used in the constructor of the NIXRawIO.
Some codestyle cleanup for the NIXRawIO is included.