3.9.0
enekomartinmartinez
released this
16 Dec 19:06
·
87 commits
to master
since this release
New Features
- Parses and ignores reality check functions during translation of Vensim models. (@rogersamso)
Bug fixes
- Fix issue with the classification of variables in modules and submodules (issue #388). When a model had a view with 3 sublevels (e.g. energy-transformation.losses) but another view was defined with only two of them (e.g. energy-transformation), the variables in the second view were placed in the main model file. Now, if this happens, the variables in the second view will be placed in a main.py file (i.e. energy/transformation/main.py). (@rogersamso)
- Fix bug on the CLI when passing a hyphen as first value to the –subview-sep argument (issue #388). (@rogersamso)
- Fix bug on the CLI when parsing initial conditions ([ssue #395). (@rogersamso)
Documentation
- The Splitting Vensim views in different files section in Command Line Usage has been updated to include an example of the usage of the –subview-sep CLI argument. (@rogersamso)
Internal Changes
- The _merge_nested_dicts() method from the pysd.translators.vensim.vensim_file.VensimFile class has been made a static method, as it does not need to access any attribute of the instance, and it does facilitate unit testing. (@rogersamso)
- The pysd/translators/vensim/parsing_grammars/element_object.peg grammar has been modified to be able to parse reality check elements. (@rogersamso)
- pysd.translators.vensim.vensim_element.Constraint and pysd.translators.vensim.vensim_element.TestInputs classes have been added, which inherit from the also newly created pysd.translators.vensim.vensim_element.GenericComponent, which include the parse() and get_abstract_component() methods. (@rogersamso and @enekomartinmartinez)
- The pysd.translators.structures.abstract_model.AbstractSection class now has two extra attributes (constraints and input_tests), which hold the pysd.translators.structures.abstract_model.AbstractConstraint and pysd.translators.structures.abstract_model.AbstractTestInputs objects. (@rogersamso)