model_conf_parser
The parser of xml file model_cof.xml located at the root of the model package. This file is optional in package
model_conf_parser API reference
ModelConfParser
- class macsypy.model_conf_parser.ModelConfParser(path)[source]
Handle model_conf.xml configuration file.
- __weakref__
list of weak references to the object (if defined)
- _get_model_conf_node()[source]
Find the root of the document
- Returns:
the document root of model_conf
- _parse_section(section_node, allowed_elements)[source]
Parse a node containing configurations options and value
- Parameters:
section_node –
allowed_elements (a dict with options name as keys and function to parse the element) – The elements allowed in this section Only these elements are parsed and in the final dictionnary
- Returns:
dict
- parse()[source]
Parse the xml ‘model_conf’ file set at the root of a data package
- Returns:
The specific configuration for a model family
- Return type:
dict with the name of variables as keys and value as values