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

ability to specify conditions under which certain datasets/attributes are present #22

Closed
ajtritt opened this issue Apr 4, 2017 · 3 comments
Labels
category: enhancement improvements of code or code behavior priority: high impacts proper operation or use of feature important to most users
Milestone

Comments

@ajtritt
Copy link
Member

ajtritt commented Apr 4, 2017

Originally reported by: Andrew Tritt (Bitbucket: ajtritt, GitHub: ajtritt)


Examples

  • TimeSeries.timestamps or TimeSeries.starting_time present, but not both
  • control and control_description must both be present

@ajtritt
Copy link
Member Author

ajtritt commented Apr 7, 2017

Original comment by Oliver Ruebel (Bitbucket: oruebel, GitHub: oruebel):


In the previous version of the NWB specification language this was implemented by the _required.

@ajtritt ajtritt added priority: high impacts proper operation or use of feature important to most users category: enhancement improvements of code or code behavior labels Aug 3, 2017
@oruebel oruebel added this to the NWB 2.x milestone Oct 23, 2017
@oruebel
Copy link
Contributor

oruebel commented Nov 30, 2017

CC @nclack since this issue came up during discussion of MatNWB.

It might make sense to describe these conditions that relate to the quantity of datasets/groups directly as part of the quantity flag. Currently the quantity flag is just a single value, but it could potentially be a list, where each value has a condition. For example, for the example of TimeSeries mentioned above, TimeSeries.timestamps could have a quantity key that could look something like:

quantity:
  - value: 0
    condition: starting_time
  - value : 1
    condition: None 

The quantity flag in this way would essentially describe a if elif elif else statement. @ajtritt what do you think?

I think we want to avoid using regular expressions as part conditions, so we may need to have some keys like: exists: starting_time etc. to describe the conditions explicitly.

@rly
Copy link
Contributor

rly commented Nov 8, 2024

This is a schema language and schema issue. I added hdmf-dev/hdmf-schema-language#40 to document that if/when we migrate to a different schema language.

@rly rly closed this as completed Nov 8, 2024
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: high impacts proper operation or use of feature important to most users
Projects
None yet
Development

No branches or pull requests

3 participants