Open rajeee opened 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:
apply_logic
not
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
and
or
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
or-spec
and-spec
not-spec
Will this break backwards compatibility with existing project files?
Describe the bug Currently, the apply_logic schema allows the
apply_logic
to begin as either a map or a list. It also allowsnot
block to be either a list or a map. The documentation for example shows this:However, currently,
and
andor
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#L344So, to facilitate such usage, and also to have less surprises, I think it makes sense to allow
and
andor
to also support single-key maps.This will basically require
or-spec
andand-spec
here to match thenot-spec