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

Remove quantity from OptogeneticStimulusSite and ImagingPlane definitions #472

Merged
merged 4 commits into from
Aug 5, 2021

Conversation

rly
Copy link
Contributor

@rly rly commented Apr 21, 2021

The group spec that defines OptogeneticStimulusSite includes quantity: '*'. What does that mean? To use OptogeneticStimulusSite, one would either:

  1. define a new group spec with neurodata_type_def: X, neurodata_type_inc: OptogeneticStimulusSite
  2. use it within another group with subgroup spec containing neurodata_type_inc: OptogeneticStimulusSite
  3. use it within another group with subgroup spec containing neurodata_type_inc: NWBContainer or another parent type

In all cases, one would set quantity to a value or leave it out, in which case it would be set to the default GroupSpec quantity value of 1 (or should it inherit from the data type definition? But why would you want to set it on the data type definition so that it applies to every use of it?)

If OptogeneticStimulusSite were defined nested within another data type, then quantity would be used, but here it is defined at the root of the schema.

The same is true for ImagingPlane which has quantity: '*'. Both are used only as subgroups with quantity: '*' and as the target type for links with default quantity (1).

Since the quantity on the data type definition is not actually used and has no bearing on the quantity when it is used, it should be removed to reduce confusion. Not defining quantity on a non-nested data type definition should be added as a best practice to writing schema.

@rly rly merged commit 345d022 into dev Aug 5, 2021
@rly rly deleted the fix/quantity_ogen branch August 5, 2021 18:14
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.

2 participants