-
Notifications
You must be signed in to change notification settings - Fork 25
Update warning about ignoring cached namespaces #1258
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 ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev #1258 +/- ##
==========================================
+ Coverage 91.66% 91.68% +0.01%
==========================================
Files 42 42
Lines 9552 9597 +45
Branches 1921 1933 +12
==========================================
+ Hits 8756 8799 +43
- Misses 518 519 +1
- Partials 278 279 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
for more information, see https://pre-commit.ci
I would really like to not show the hdmf-experimental warning but I know we do not ensure backwards compatibility between schema versions there. What if we also hide the warning if none of the data types in the namespace are used in the file? Most files do not involve data types used in hdmf-experimental. On rewrite/append, the loaded namespaces are written to the file, so we should not have a problem with writing new data that is incompatible with old namespaces. |
I think that's a good idea! I agree it would be nice to not display that warning unless necessary. Are there any places you can point me to in the code that get all the data types used in the file? I am thinking this would be an optional argument to |
After talking with @oruebel , we realized that it would be hard or hacky to get all the data types used in the file. The hacky way is to iterate through all groups and datasets in the file and look for the Another approach we discussed is to have the IO object build all the builders before loading the namespace from the file. Then we can iterate through the in-memory builders. But this requires refactoring the logic in NWBHDF5IO and HDF5IO, which currently takes in a BuildManager that has the loaded namespace. This would be complicated. The primary use case for the hdmf-experimental warning is to warn users of incompatible/breaking changes introduced in, say 0.4.0 when the data was written in an older version, say 0.3.0. This really only impacts So, I would say, let's include hdmf-experimental into the "core" set of namespaces to ignore from hdmf. |
Thanks for explaining in detail. That sounds good to me - I'll add the hdmf-experimental namespace to the Note that the pynwb Edit: see NeurodataWithoutBorders/pynwb#2064 as the open issue to add "core" as a core namespace |
@rly this is ready for you to look at again |
for more information, see https://pre-commit.ci
@rly I think I addressed all of your comments I believe the test failures are due to an ImportError issue with the schemasheets package. The warning in the logs is a little confusing because schemasheets is actually installed, but does not seem to be compatible with the latest versions of |
Thanks! I made a couple minor comments. Otherwise looks good. |
@rly I think I addressed all your remaining comments! This should be ready to merge |
Looks good. Thank you! Squash and merge anytime. |
I'll just do it since Matt and I are managing this package and the release. |
This is great! Thanks for moving this forward! |
Motivation
Fix #1018.
Combine the warnings about ignoring cached namespaces into a single warning, and only warn for core namespaces if the cached version is newer than the loaded version.
How to test the behavior?
with an example file from the pynwb test suite:
Checklist
CHANGELOG.md
with your changes?