-
Notifications
You must be signed in to change notification settings - Fork 25
Fix container class mapped to incorrect namespace #1373
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
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #1373 +/- ##
==========================================
+ Coverage 92.44% 92.45% +0.01%
==========================================
Files 42 42
Lines 9765 9765
Branches 1983 1983
==========================================
+ Hits 9027 9028 +1
+ Misses 463 462 -1
Partials 275 275 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| # NOTE that the type_name may appear in multiple namespaces based on how they were resolved | ||
| # but the same type_name should point to the same class | ||
| if data_type in ns_data_types: | ||
| if data_type in ns_data_types and not isinstance(ns_data_types[data_type], TypeSource): |
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.
Does the comment also need to be updated? I'm not sure what isinstance(ns_data_types[data_type], TypeSource actually checks so may be worth clarifying. Otherwise this looks good so I approve and you can decide
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.
The comment could be a little clearer. I'll make a new PR. Sorry, this was on auto-merge.
Clarify comment regarding TypeMap.__container_types
Motivation
DynamicTableRegionwritten withhdmf_experimentalinstead ofhdmf_commonwhen using NWB extensions #1347 with a minimal change. Although this resolves the issue, the logic within load_namespaces and TypeMap regarding container class registration is not intuitive, and could be improved with a larger refactor as shown in Refactor load_namespaces to return source types, fix registration #1372.How to test the behavior?
Checklist
CHANGELOG.mdwith your changes?