-
Notifications
You must be signed in to change notification settings - Fork 0
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
Implement open enumerations #56
Comments
Our current notation like this type:
doc: |
type of radiation source (pick one from the enumerated list and spell exactly)
enumeration: [Spallation Neutron Source, Pulsed Reactor Neutron Source, Reactor Neutron Source, ...] will likely not be able to handle this. Another option we could go for is to add another special keyword, like type:
doc: |
type of radiation source (pick one from the enumerated list and spell exactly)
enumeration: [Spallation Neutron Source, Pulsed Reactor Neutron Source, Reactor Neutron Source, ...]
open_enumeration: True |
if combined with #52 will enable to process of an enumeration nest rigorously, i.e. convenience open: False the default |
This exactly won't work because currently we have |
Consistent with how it will be with dimensionsType |
Hm, that makes the logic quite a bit more involved. How would that work for the first use case? Like so?
Then we need to distinguish enums
Note that this means that neither |
nexusformat/definitions#1521 introduced open enumerations, i.e., to allow values not explicitly given in the enumeration list. For this, a new attribute
open
was introduced for the enumerationTYPE, which defaults to "False". If open enumeration is used, this XML attribute should be "True".In order to support this new feature, I suggest the following notation:
shall be expressed in nyaml as
If
\@open
is not set, we default to <enumeration"> (i.e. open="False").Using the
\@
notation, we avoid situations whereopen
is a valid enumeration value.Opinions @sanbrock @mkuehbach @RubelMozumder ?
The text was updated successfully, but these errors were encountered: