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

[Feature]: Improve embedding of namespaces on nwbExport #607

Closed
2 tasks done
ehennestad opened this issue Oct 31, 2024 · 0 comments · Fixed by #615
Closed
2 tasks done

[Feature]: Improve embedding of namespaces on nwbExport #607

ehennestad opened this issue Oct 31, 2024 · 0 comments · Fixed by #615
Assignees
Labels
category: enhancement improvements of code or code behavior priority: medium non-critical problem and/or affecting only a small set of NWB users status: need verification potentially solved, but needs verification topic: nwb-file relates to how an exported nwb file is structured

Comments

@ehennestad
Copy link
Collaborator

ehennestad commented Oct 31, 2024

What would you like to see added to MatNWB?

All extension namespaces in the cache (namespaces folder), will get embedded in the specs of an NWB file when running nwbExport. This can lead to files containing embedded specifications that are not relevant to any of the data types in the file.

Is your feature request related to a problem?

One recorded problem of this in #603

What solution would you like?

Implement a system detecting what namespaces a user actually used and embedding schemas off of that.

Do you have any interest in helping implement the feature?

Yes.

Code of Conduct

@ehennestad ehennestad added category: enhancement improvements of code or code behavior status: todo something needs to be done topic: matnwb-api related to improving the matnwb api priority: medium non-critical problem and/or affecting only a small set of NWB users topic: nwb-file relates to how an exported nwb file is structured and removed topic: matnwb-api related to improving the matnwb api labels Oct 31, 2024
@ehennestad ehennestad added status: need verification potentially solved, but needs verification and removed status: todo something needs to be done labels Nov 4, 2024
@ehennestad ehennestad self-assigned this Nov 5, 2024
bendichter added a commit that referenced this issue Feb 11, 2025
…B file on export (#615)

* Only include namespaces for types that are included in NWB file on export (Issue #607)

* Add functionality for installing extensions

* Minor fixes

* Update comment

* Add comment + print message when extension has been installed

* Update installExtension.m

* Fix changed variable name

* Update matnwb_createNwbInstallExtension.m

Update docstring

* Create listNwbTypeHierarchy.m

Add utility function for listing the type hierarchy of an nwb type

* Add private method for embedding specifications to file on export

* Fix variable name

* Add workflow for updating nwbInstallExtension

* Add option to save extension in custom location

* Create InstallExtensionTest.m

* Update docstring

* Change dispExtensionInfo to return info instead of displaying + add test

* Reorganize code into separate functions and add tests

* Minor changes to improve test coverage

* add nwbInstallExtension to docs

* Update update_extension_list.yml

Add schedule event for workflow to update nwbInstallExtension

* Update downloadExtensionRepository.m

Remove local function

* Update docstring for nwbInstallExtension

* Fix docstring indentation in nwbInstallExtension

* Add doc pages describing how to use (ndx) extensions

* Fix typo

* Update +tests/+unit/InstallExtensionTest.m

Co-authored-by: Ben Dichter <[email protected]>

* Update docs/source/pages/getting_started/using_extensions/generating_extension_api.rst

Co-authored-by: Ben Dichter <[email protected]>

* Add docstrings for functions to retrieve and list extension info

* Fix docstring formatting/whitespace

* Update listExtensions.m

Add example to docstring

* Move static test methods into io.internal.h5 namespace

Introduce some functions that will be useful later

* Update writeEmbeddedSpecifications.m

Add arguments block, fix function name

* Add validateEmbeddedSpecifications

* Update NwbFile.m

Redefine listNwbTypes method, add validation of embedded namespaces

* Create listEmbeddedSpecNamespaces.m

* Update nwbExportTest.m

* Update test for spec/namespace embedding

* Update read_indexed_column.m

* Add disclaimer in deleteGroup function

* Update read_indexed_column.m

* Fix broken test

* add test-requirement

* Fix: Ensure object is group before deleting

* Fix error id

* Add unittests for functions in io.internal.h5 namespace

* Update nwbExportTest.m

Added comments and a better test to test for warning with ID 'NWB:validators:MissingEmbeddedNamespace'

* Fix failing tests

---------

Co-authored-by: Ben Dichter <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: enhancement improvements of code or code behavior priority: medium non-critical problem and/or affecting only a small set of NWB users status: need verification potentially solved, but needs verification topic: nwb-file relates to how an exported nwb file is structured
Projects
None yet
1 participant