You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When initializing a VariableCode, the attributes region-aggregation and skip-region-aggregation are automatically added and set to "False". When then exporting the CodeList to yaml, these attributes are written explicitly to the file, leading to very cumbersome, unwieldy files, see for example iiasa/ariadne-intern-workflow#42
Thanks for opening this issue @danielhuppmann.
I have been aware of it and would strongly suggest option 2.
Reason being that it's easier and more logical to work with the values actually set to true or false. I think using none could be ambiguous.
The reason why I didn't fix it in the past was that I didn't find a quick way to check with pydantic if the value that a field has is the default value. But I'm sure there's a way.
When initializing a
VariableCode
, the attributesregion-aggregation
andskip-region-aggregation
are automatically added and set to "False". When then exporting the CodeList to yaml, these attributes are written explicitly to the file, leading to very cumbersome, unwieldy files, see for example iiasa/ariadne-intern-workflow#42This is implemented in this line (and following)
nomenclature/nomenclature/code.py
Line 142 in 0b3dec1
I see two options:
VariableCode
if they are not defined in the source yaml/xlsx fileFalse
) when exporting to yamlThe text was updated successfully, but these errors were encountered: