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

Change: Only embed specs/namespaces for types that are included in NWB file on export #615

Open
wants to merge 44 commits into
base: master
Choose a base branch
from

Conversation

ehennestad
Copy link
Collaborator

@ehennestad ehennestad commented Nov 4, 2024

Fix #607

Motivation

Ensure that only relevant namespaces/specifications are embedded in an NWB file. This issue suggests that such extra namespaces can cause errors when validating with NWBInspector.

How to test the behavior?

Export NWB file with types from a subset of available extension and check the file's `specification` group

Questions / todo

  • Are namespace names always specified in kebab-case? - Appears so
  •  Does matnwb always format namespace names as snake_case? - Appears so
  • Should the specification group be completely cleared before rewriting it if exporting to an existing file?
  • Check superclasses of each type and included namespace of superclasses as well
  • Add unit test

Checklist

  • Have you ensured the PR description clearly describes the problem and solutions?
  • Have you checked to ensure that there aren't other open or previously closed Pull Requests for the same change?
  • If this PR fixes an issue, is the first line of the PR description fix #XX where XX is the issue number?

Copy link

codecov bot commented Nov 4, 2024

Codecov Report

Attention: Patch coverage is 92.85714% with 19 lines in your changes missing coverage. Please review.

Project coverage is 95.19%. Comparing base (ead90dd) to head (7e9aac6).

Files with missing lines Patch % Lines
+io/+internal/+h5/mustBeH5File.m 55.55% 4 Missing ⚠️
+matnwb/+extension/+internal/downloadZippedRepo.m 77.77% 4 Missing ⚠️
+matnwb/+extension/installExtension.m 89.65% 3 Missing ⚠️
+io/+internal/+h5/mustBeH5FileReference.m 66.66% 2 Missing ⚠️
...+extension/+internal/downloadExtensionRepository.m 88.88% 2 Missing ⚠️
+io/+internal/+h5/resolveFileReference.m 87.50% 1 Missing ⚠️
+matnwb/+extension/listExtensions.m 96.00% 1 Missing ⚠️
+schemes/+utility/listNwbTypeHierarchy.m 87.50% 1 Missing ⚠️
NwbFile.m 96.87% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #615      +/-   ##
==========================================
- Coverage   95.24%   95.19%   -0.05%     
==========================================
  Files         117      137      +20     
  Lines        4902     5165     +263     
==========================================
+ Hits         4669     4917     +248     
- Misses        233      248      +15     

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

@ehennestad ehennestad changed the title Change: Only include namespaces for types that are included in NWB file on export Change: Only embed specs/namespaces for types that are included in NWB file on export Nov 6, 2024
Add utility function for listing the type hierarchy of an nwb type
Add schedule event for workflow to update nwbInstallExtension
@ehennestad ehennestad marked this pull request as ready for review January 16, 2025 17:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature]: Improve embedding of namespaces on nwbExport
2 participants