-
Notifications
You must be signed in to change notification settings - Fork 57
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
Refactor, better mode handling, deprecate asdf.AsdfFile.open #579
Merged
drdavella
merged 19 commits into
asdf-format:master
from
drdavella:refactor-open-handling
Oct 31, 2018
Merged
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
d27e6da
First steps towards better mode handling
drdavella 23a3982
Refactor asdf.open into standalone factory method...
drdavella b472385
Use asdf_open for opening external array blocks
drdavella 465fae6
Accommodate generic_io.GenericFile in mode detection
drdavella 9f871e8
Deprecate AsdfFile.open, remove use internally and in tests...
drdavella 478b540
Fix test_update_exceptions test
drdavella c9b0a82
Make sure to account for https schemes
drdavella 82fcf38
Remove redundant asdf_open function from top-level namespace
drdavella f972e61
Enforce readonly arrays under certain circumstances
drdavella 221c3c4
Enforce readonly mode for external arrays
drdavella 73e7255
Add test for readonly behavior of ndarrays
drdavella 85e1209
Override ndarray __setitem__ to avoid segfault during exception handling
drdavella 9167221
Update change log
drdavella 3f8954e
Add docstring with deprecation notice to asdf.AsdfFile.open
drdavella f6c3e36
Fix test failure on windows.
drdavella 51993f1
Attempt to fix file handle issue that appears on Windows
drdavella 07ef146
Cleaner exception handling in ndarray.__setitem__
drdavella 1411b4f
Replace references to AsdfFile.open in the documentation
drdavella e17a376
Add test for deprecated asdf.AsdfFile.open
drdavella File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Can we have r+ or w+ modes?
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 you just mean that we should add these and make them equivalent to the current
'rw'
? Although I think to be consistent with Python'sopen
API,'w+'
would have to overwrite an existing file. Maybe we should support that, though?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 wasn't sure if those modes were supported but not mentioned here or not supported at all. Looks like the latter case so all is good 👍