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

Fix case when init or update NestedMapping with another NestedMapping #31

Merged
merged 3 commits into from
Feb 2, 2024

Conversation

teutoburg
Copy link
Collaborator

@teutoburg teutoburg commented Jan 31, 2024

This caused weird warnings in ScopeSim, because the update method would get the bang-keys from the NestedMapping instance used to init another one. What we probably really want in that case anyway is to init (or update) it with the internal nested dict of the NestedMapping. This should fix those warnings.

Edit: Apparently this is still triggered in mocks (patch dict) within testing (I think the mock patch used .update() with all keys to restore the original dict). So downgrading to DEBUG and changing wording, because this is then normal, but still shouldn't happen outside mocking.

Copy link

codecov bot commented Jan 31, 2024

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (73babb4) 99.36% compared to head (e13230f) 99.04%.
Report is 1 commits behind head on main.

Files Patch % Lines
astar_utils/nested_mapping.py 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #31      +/-   ##
==========================================
- Coverage   99.36%   99.04%   -0.32%     
==========================================
  Files           5        5              
  Lines         313      315       +2     
==========================================
+ Hits          311      312       +1     
- Misses          2        3       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@teutoburg teutoburg marked this pull request as ready for review January 31, 2024 22:00
astar_utils/nested_mapping.py Outdated Show resolved Hide resolved
Co-authored-by: Hugo Buddelmeijer <hugo@buddelmeijer.nl>
@teutoburg teutoburg merged commit 445264f into main Feb 2, 2024
20 of 21 checks passed
@teutoburg teutoburg deleted the fh/fixupdatewithself branch February 2, 2024 10:32
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.

2 participants