Skip to content

[Bug]: Required properties of NWB schemas are not marked as required in MatNWB #654

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

Closed
2 tasks done
ehennestad opened this issue Jan 31, 2025 · 3 comments · Fixed by #655
Closed
2 tasks done

[Bug]: Required properties of NWB schemas are not marked as required in MatNWB #654

ehennestad opened this issue Jan 31, 2025 · 3 comments · Fixed by #655

Comments

@ehennestad
Copy link
Collaborator

ehennestad commented Jan 31, 2025

What happened?

Properties originating from Attributes in the NWB specification schemas are not marked as required by MatNWB, even though they are required by the schemas.

This was discovered in issue #650

@bendichter It is not obvious to me from the NWB Specification Language, but are Link properties always required?

Steps to Reproduce

types.core.ProcessingModule() % does not issue a warning that description (required) is missing.

Error Message

Operating System

macOS

Matlab Version

2023b

Code of Conduct

@ehennestad
Copy link
Collaborator Author

It is not obvious to me from the NWB Specification Language, but are Link properties always required?

Found this: https://schema-language.readthedocs.io/en/latest/description.html#quantity

@bendichter
Copy link
Contributor

@bendichter It is not obvious to me from the NWB Specification Language, but are Link properties always required?

@ehennestad yes, this is a bit obscure, esp. since this deviates from the json-schema convention that attributes are optional by default, but they are required by default in NWB:

1.6.1.8. attribute::required
Optional boolean key describing whether the attribute is required. Default value is True.

https://schema-language.readthedocs.io/en/latest/description.html#id8

@bendichter
Copy link
Contributor

attributes using the "required" field and links and datasets use the "quantity" field. They are all mandatory by default

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 a pull request may close this issue.

2 participants