-
Notifications
You must be signed in to change notification settings - Fork 263
MRG: some refactoring of PARREC API #264
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
Conversation
The file-loading API needs some thought, because I would also like to be able to pass in a parameter |
@@ -82,9 +82,6 @@ | |||
from copy import deepcopy | |||
import re | |||
|
|||
from .externals.six import string_types | |||
from .py3k import asbytes | |||
|
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.
FYI I already have these changes in my PR #263
Makes sense to have |
Test that truncated PAR/REC file raises error or warning according to `permit_truncated` flag.
Add `permit_truncated` to header attributes. Fix `copy` method to use value of `permit_truncated` when making a copy. Test.
Add methods with optional args `permit_truncated` and `scaling`: * from_file_map * from_filename * load
04e953a
to
e20a1cd
Compare
Add decorator to make keyword arguments keyword-only for Python 2.
Use and test keyword-onliness of permit_truncated, scaling argument to PARRECImage file loading methods.
I added the keyword-only stuff - I think it's ready now. |
Fancy solution, I like it. LGTM. |
MRG: some refactoring of PARREC API Add fake truncated file for testing, and test. Add permit_truncated as header attribute. Fix header copy to use permit_truncated. Add file loading API methods with PARREC-specific parameters. Make PARREC-specific parameters keyword-only.
MRG: some refactoring of PARREC API Add fake truncated file for testing, and test. Add permit_truncated as header attribute. Fix header copy to use permit_truncated. Add file loading API methods with PARREC-specific parameters. Make PARREC-specific parameters keyword-only.
Add fake truncated file for testing, and test.
Add permit_truncated as header attribute.
Fix header copy to use permit_truncated.
Add file loading API methods with PARREC-specific parameters.