NREL / buildstockbatch

Other
22 stars 14 forks source link

Update apply_logic schema #322

Open rajeee opened 2 years ago

rajeee commented 2 years ago

Describe the bug Currently, the apply_logic schema allows the apply_logic to begin as either a map or a list. It also allows not block to be either a list or a map. The documentation for example shows this: image

However, currently, and and or blocks can only be a list. Sometimes, when using aliases, it makes sense to define an alias for a certain block and use them in various places, including as a sole child of a 'or' or an 'and' block. Example: https://github.com/NREL/resstock/blob/38c53ea77b55991aef84c195ad7812c6735ce918/facades2-project-file.yml#L344

So, to facilitate such usage, and also to have less surprises, I think it makes sense to allow and and or to also support single-key maps.

This will basically require or-spec and and-spec here to match the not-spec

nmerket commented 2 years ago

Will this break backwards compatibility with existing project files?