-
Notifications
You must be signed in to change notification settings - Fork 10
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
add read_buffer_context and write_read_buffer_context #875
Conversation
Test Results2 188 tests - 1 2 187 ✔️ - 1 2m 41s ⏱️ +7s Results for commit 04ef802. ± Comparison against base commit 7b5c0c1. This pull request removes 1 test.
♻️ This comment has been updated with latest results. |
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.
thank you very much for you contribution here @braingram
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.
Thanks! The utility functions are not meant to be used directly by users, as dealing with file handle life times can be tedious. This is mainly why we introduced a wrapper class around the file handle (also using the context manager protocol).
Codecov Report
@@ Coverage Diff @@
## master #875 +/- ##
==========================================
- Coverage 96.51% 96.48% -0.04%
==========================================
Files 94 94
Lines 6283 6284 +1
==========================================
- Hits 6064 6063 -1
- Misses 219 221 +2
|
closes #873
Changes
Add
read_buffer_context
andwrite_read_buffer_context
toweldx.asdf.util
.Update previous uses of
read_buffer
andwrite_read_buffer
that inspect the result to use the context.read_buffer
andwrite_read_buffer
were updated to use the new context to avoid code duplication. These were not removed to preserve the API and to leave them available for uses where the result is not inspected. Such as this test:weldx/weldx/tests/asdf_tests/test_asdf_base_types.py
Lines 15 to 20 in c2ee9b1
Related Issues
Closes #873
Checks
CHANGELOG.md
tests/
updateddoc/
update example/tutorial notebooksupdate manifest file