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

Which properties should be in common-properties? #67

Open
bryanwweber opened this issue Jul 19, 2017 · 5 comments
Open

Which properties should be in common-properties? #67

bryanwweber opened this issue Jul 19, 2017 · 5 comments

Comments

@bryanwweber
Copy link
Member

At the moment, the common-properties section allows the following keys:

common-properties:
  type: dict
  schema:
    pressure: *value-unit-optional
    ignition-type: *ignition-type
    composition: *composition
    pressure-rise: *value-unit-optional

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.

@kyleniemeyer
Copy link
Member

I agree that we should allow any property to be in common-properties

@kyleniemeyer
Copy link
Member

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...)

@bryanwweber
Copy link
Member Author

bryanwweber commented Oct 3, 2017

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 😄

(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)

@kyleniemeyer
Copy link
Member

Right... I agree this way is a bit harder to maintain.

I think we have two options:

  1. 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.

  2. 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).

@kyleniemeyer
Copy link
Member

Any more thoughts on this?

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

No branches or pull requests

2 participants