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

Allow unresolved values in NestedChainMap #35

Closed
wants to merge 2 commits into from

Conversation

teutoburg
Copy link
Collaborator

@teutoburg teutoburg commented Mar 5, 2024

This already works in a single RecursiveNestedMapping, but the NestedChainMap will still throw an error if a recursive bang-string-key ends up pointing to a "dead end", i.e. another, unresolved, bang key.

Maybe we'd want to include a "strict mode" for this, so we can enable that for some applications in ScopeSim, where we actually want an error in such a case. Something similar is currently done in some places, i.e. check if something is still a bang key when it should be a float or whatever. So by having a "strict mode" for resolving recursive bang keys, we wouldn't need that because the NestedChainMap would just throw a KeyError. Kinda like it currently does. Hmm, this again makes me wonder if we actually want this change, or if all errors from unresolved bang keys in ScopeSim are maybe really a symptom of something else being wrong. Yeah, I'll keep this a draft for now...

@teutoburg teutoburg self-assigned this Mar 5, 2024
@teutoburg teutoburg added the enhancement New feature or request label Mar 5, 2024
At some point, this might turn in better inheritance / mixin stuff...
Copy link

codecov bot commented Mar 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.17%. Comparing base (8fcab48) to head (7c87948).
Report is 38 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #35   +/-   ##
=======================================
  Coverage   99.16%   99.17%           
=======================================
  Files           5        5           
  Lines         361      364    +3     
=======================================
+ Hits          358      361    +3     
  Misses          3        3           

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

@teutoburg
Copy link
Collaborator Author

Closing in favor of #47

@teutoburg teutoburg closed this Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

1 participant