BAMWelDX / weldx

The welding data exchange format
https://www.bam.de/weldx
BSD 3-Clause "New" or "Revised" License
19 stars 9 forks source link

add read_buffer_context and write_read_buffer_context #875

Closed braingram closed 1 year ago

braingram commented 1 year ago

closes #873

Changes

Add read_buffer_context and write_read_buffer_context to weldx.asdf.util.

Update previous uses of read_buffer and write_read_buffer that inspect the result to use the context.

read_buffer and write_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: https://github.com/BAMWelDX/weldx/blob/c2ee9b1f7cb8df8b2f4723884341e9e20dcd0d50/weldx/tests/asdf_tests/test_asdf_base_types.py#L15-L20

Related Issues

Closes #873

Checks

github-actions[bot] commented 1 year ago

Test Results

2 188 tests   - 1   2 187 :heavy_check_mark:  - 1   2m 41s :stopwatch: +7s        1 suites ±0          1 :zzz: ±0         1 files   ±0          0 :x: ±0 

Results for commit 04ef802e. ± Comparison against base commit 7b5c0c1f.

This pull request removes 1 test. ``` weldx.tests.asdf_tests.test_asdf_util ‑ test_write_buffer_dummy_inline_arrays ```

:recycle: This comment has been updated with latest results.

codecov[bot] commented 1 year ago

Codecov Report

Merging #875 (04ef802) into master (7b5c0c1) will decrease coverage by 0.04%. The diff coverage is 87.50%.

@@            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     
Impacted Files Coverage Δ
weldx/asdf/util.py 90.28% <87.50%> (-0.60%) :arrow_down: