-
Notifications
You must be signed in to change notification settings - Fork 26
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
Allow SZIP compression options #167
Conversation
Codecov Report
@@ Coverage Diff @@
## dev #167 +/- ##
==========================================
+ Coverage 69.91% 69.97% +0.05%
==========================================
Files 30 30
Lines 5767 5785 +18
Branches 1355 1363 +8
==========================================
+ Hits 4032 4048 +16
Misses 1302 1302
- Partials 433 435 +2
Continue to review full report at Codecov.
|
@rly @bendichter @ajtritt could you check and approve. I had to dismiss your approval to fix a bug that Ben had found. |
if not isinstance(self.__iosettings['compression_opts'], tuple) or \ | ||
len(self.__iosettings['compression_opts']) != 2: | ||
raise ValueError("SZIP compression filter compression_opts" + | ||
" must be a 2-tuple ('ec'|'nn', even integer 0-32") |
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.
Super minor, but regarding code style, I'm pretty sure the backslash and plus symbols are not necessary.
PEP8 says: "The preferred way of wrapping long lines is by using Python's implied line continuation inside parentheses, brackets and braces. Long lines can be broken over multiple lines by wrapping expressions in parentheses. These should be used in preference to using a backslash for line continuation."
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.
You need an ending parenthesis inside the last quote marker on line 322
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.
Since we check for gzip compression opts being an int from 0-9, can we also check for the szip compression opts being ('ec'|'nn', even integer 0-32)?
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.
Not sure what the issue with 322 is?
szip compression opts being ('ec'|'nn', even integer 0-32)?
sure
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.
Not a syntax error - but within the string, the "(" before "'ec'" needs a corresponding ")".
Motivation
Fix #166
Enhance parameter checking in H5DataIO
Add tests for parameter checking
Checklist
flake8
from the source directory.#XXX
notation whereXXX
is the issue number ? By including "Fix #XXX" you allow GitHub to close the corresponding issue.