Open bryanwweber opened 7 years ago
I agree that we should allow any property to be in common-properties
I'm not sure the easiest way of doing this, but perhaps common-properties:
in chemked_schema.yaml
can be extended to:
# Start the ChemKED schema
common-properties:
type: dict
schema:
pressure: *value-unit-optional
ignition-type: *ignition-type
composition: *composition
pressure-rise: *value-unit-optional
compression-time: *value-unit-optional
ignition-delay: *value-unit-required
first-stage-ignition-delay: *value-unit-optional
compressed-pressure: *value-unit-optional
compressed-temperature: *value-unit-optional
temperature: *value-unit-required
?
(Though I don't think we should really allow ignition-delay
to be common...)
Right, but if we do it that way, we have to add every property from every experiment type that we end up adding. I'm hoping for something a little more sustainable :smile:
(Also, everything in common-properties
has to be *value-unit-optional
or else it becomes required in the common-properties
section, which we don't want)
Right... I agree this way is a bit harder to maintain.
I think we have two options:
Don't specify anything for common-properties
, just let the YAML parser pull the things that are tagged/referenced into the datapoints
. This way, we don't have to edit the allowed fields as we increase the number of potential fields.
If we want to prevent some things from being used here, like ignition-delay
, then we probably have to explicitly list the available options in the schema.
I don't have a strong feeling either way, but I'm leaning towards option 2, because explicit is better than implicit :), and I don't think the number of available fields will really increase that much, because other experiment types use much of the same fields we already have (temperature, pressure, composition).
Any more thoughts on this?
At the moment, the
common-properties
section allows the following keys:How can we handle the common properties without explicitly specifying which ones are allowed? I think that any property should be eligible to be a
common-property
.