-
Notifications
You must be signed in to change notification settings - Fork 30
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
Adding Section properties cardinality #383
Conversation
Adds and registers a validation to check the properties cardinality of Sections.
Adds tests for Section set properties cardinality including a general function that can be reused for Section set sections cardinality tests.
Adds tests for the Section properties cardinality convenience set method including a general method that can be reused for the Section sections cardinality convenience set method.
Tests saving and loading the Section properties cardinality attribute to and from all supported file formats. Adds a general test method that can be reused with the Section sections cardinality.
Tests the Section properties cardinality validation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just wondered if we shouldn't extend this functionality to constrain based not only on the number of properties, but also on the property names? E.g. there must be only one property named amplifier, or there must be at least one experimenter and one date property...
Don't we restrict name collisions anyway? At least when validating. |
ah, true... You are right, I was thinking into the "type" direction which does not apply for properties. |
I was thinking it might be useful to have restrictions on types for subsections, but I think that might complicate things, at least for now. Might be good to think about though. |
Discussions aside, we got two approvals, so I'm merging. We can open issues for the other ideas. |
The current PR adds the basic cardinality implementation for Section.properties. It provides
The PR refers to issue #361. Another PR providing the missing Section.sections cardinality will follow.