open229 / ruleset-model-description-schema

Developing a schema for ASHRAE Standard 229P.
Other
9 stars 3 forks source link

Remove ruleset specific enumerations from the overall schema #180

Open nealkruis opened 1 year ago

nealkruis commented 1 year ago

We can figure out ways to "forward declare" enumerations (so that the specific ruleset defines them), or maybe generate a ruleset specific schema from a template where some enumerations and data groups are inserted when the schema is "compiled".

These enumerations are not within the scope of 229, and often not within the scope of ASHRAE to decide.

JasonGlazer commented 1 year ago

Any suggestions on how to do this?

nealkruis commented 1 year ago

Yes. Through the definitions of a Machine Readable Ruleset.

JasonGlazer commented 1 year ago

I'm not sure I'm following the example provided. What makes this a "forward declare" type of enumeration?

nealkruis commented 1 year ago

By "forward declare", I mean that the primary schema would reference an enumeration (e.g., ), without defining it, because the actual definition would come from an external machine readable ruleset. You'd have a script that does something like:

generate_229_schema(primary_schema_template, machine_readable_ruleset) that would pull the ruleset specific enumeration definitions into a complete schema specific to the ruleset.

JasonGlazer commented 1 year ago

Any recommendations on how should this be expressed in the YAML schema file?

nealkruis commented 1 year ago

For now, I think you can create two separate files: A primary schema "template" with the forward declarations, and a second file with ruleset specific enumerations / data groups. You can reference the latter from the former for now and develop the script to generate them more dynamically later.

JasonGlazer commented 1 year ago

If you could create some example text, that would help me. It sounds like you are describing essentially what we have now except for something that would indicate the forward declaration itself.