File tree Expand file tree Collapse file tree
tests/unittests/lib_parsing Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -87,6 +87,7 @@ class ExtraOutputSchema(ModifiedBaseModel):
8787
8888class ModelSchema (ModifiedBaseModel ):
8989 id : str
90+ taxonomy_category : Optional [str ] = None # # Optional or mandatory,open question ?
9091 parameters : List [ParameterSchema ] = Field (default_factory = list )
9192 variables : List [VariableSchema ] = Field (default_factory = list )
9293 ports : List [ModelPortSchema ] = Field (default_factory = list )
Original file line number Diff line number Diff line change @@ -137,6 +137,22 @@ def test_binary_variable_parsing() -> None:
137137 assert on_off .data_type == ValueType .BINARY
138138
139139
140+ def test_model_taxonomy_category_parses () -> None :
141+ yaml_content = """
142+ library:
143+ id: taxo_lib
144+ models:
145+ - id: bus
146+ taxonomy-category: balance
147+ parameters:
148+ - id: v_nom
149+ time-dependent: false
150+ scenario-dependent: false
151+ """
152+ input_lib = parse_yaml_library (io .StringIO (yaml_content ))
153+ assert input_lib .models [0 ].taxonomy_category == "balance"
154+
155+
140156def test_library_error_parsing (libs_dir : Path ) -> None :
141157 lib_file = libs_dir / "model_port_definition_ko.yml"
142158
You can’t perform that action at this time.
0 commit comments