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

Add warning/error if extension cannot be loaded from namespace alone #389

Closed
rly opened this issue Jun 18, 2020 · 1 comment
Closed

Add warning/error if extension cannot be loaded from namespace alone #389

rly opened this issue Jun 18, 2020 · 1 comment
Labels
category: bug errors in the code or code behavior

Comments

@rly
Copy link
Contributor

rly commented Jun 18, 2020

Suggestion from @bendichter while using the ndx-icephys-meta extension.

Some extensions cannot be loaded from the namespace alone because dynamic class generation doesn't work for a particular type or the class has custom ObjectMapper mappings that the extension does not know about. We should add a flag in the extension namespace that is True if the extension needs to be installed through pip install [extension] and import [extension] before reading the file. When reading a file with the flag and the extension is not already loaded, HDMF should raise a warning/error saying how to install the extension.

@rly rly added the category: bug errors in the code or code behavior label Jun 18, 2020
@rly
Copy link
Contributor Author

rly commented Jan 11, 2024

Since we have substantially improved dynamic class generation, this should now be a rare occurrence. See also NeurodataWithoutBorders/pynwb#1818 . We could resolve that issue through a flag on the extension catalog entry or the namespace itself as proposed here. The catalog entry may be better because it encourages people to publish their extensions in the catalog if they have already published it on PyPI.

@rly rly closed this as completed Jan 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: bug errors in the code or code behavior
Projects
None yet
Development

No branches or pull requests

1 participant