Skip to content
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

[wxfile] raise KeyError for non-existent keys. #759

Merged
merged 5 commits into from
May 18, 2022

Conversation

marscher
Copy link
Contributor

@marscher marscher commented May 17, 2022

Changes

WeldxFile now raises a KeyError, if a given key could not be accessed. Previously only a warning was emitted and the change was ignored. As this leads to confusion, e.g. None being returned, we now trigger the exception.

Related Issues

Closes #757

Checks

  • updated CHANGELOG.rst
  • updated tests

@github-actions
Copy link

github-actions bot commented May 17, 2022

Unit Test Results

       1 files  ±0         1 suites  ±0   3m 23s ⏱️ +48s
2 152 tests +7  2 152 ✔️ +7  0 💤 ±0  0 ±0 

Results for commit e51a5fe. ± Comparison against base commit 9af804a.

♻️ This comment has been updated with latest results.

@codecov
Copy link

codecov bot commented May 18, 2022

Codecov Report

Merging #759 (e51a5fe) into master (9af804a) will increase coverage by 0.09%.
The diff coverage is 91.66%.

❗ Current head e51a5fe differs from pull request most recent head e6c465d. Consider uploading reports for the commit e6c465d to get more accurate results

@@            Coverage Diff             @@
##           master     #759      +/-   ##
==========================================
+ Coverage   96.76%   96.86%   +0.09%     
==========================================
  Files          88       88              
  Lines        6006     6005       -1     
==========================================
+ Hits         5812     5817       +5     
+ Misses        194      188       -6     
Impacted Files Coverage Δ
weldx/asdf/file.py 96.20% <ø> (ø)
weldx/asdf/util.py 92.13% <91.66%> (+1.85%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9af804a...e6c465d. Read the comment docs.

@marscher marscher marked this pull request as ready for review May 18, 2022 13:01
@marscher marscher requested a review from CagtayFabry May 18, 2022 13:03
Copy link
Member

@CagtayFabry CagtayFabry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you for adding the test cases

weldx/tests/asdf_tests/test_asdf_util.py Outdated Show resolved Hide resolved
Co-authored-by: Cagtay Fabry <43667554+CagtayFabry@users.noreply.github.com>
@marscher marscher merged commit b6e9a33 into BAMWelDX:master May 18, 2022
@marscher marscher deleted the wxfile_raise_keyerror_missing_keys branch May 18, 2022 18:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

WeldxFile doesn't raise KeyError on missing key
2 participants