Skip to content

Releases: SDXorg/pysd

3.10.0

28 Apr 14:13
Compare
Choose a tag to compare

New Features

Bug fixes

  • Set the final_subscripts to an empty dictionary for ELMCOUNT function in pysd.builders.python_exressions_builder.CallBuilder.build_function_call(). (@rogersamso)
  • Define comp_subtype of Unchangeable tabbed arrays as Unchangeable. This is done in pysd.builders.python.python_expressions_builder.ArrayBuilder.build(). (@rogersamso)

Documentation

Internal Changes

  • Add a weekly scheduled run to all CI workflows, which run each Monday at 06:00 UTC. (@EwoutH)
  • Fix CI pipeline for Python 3.11 and remove Python 3.10 pipeline in favour of 3.11. (@kinow)
  • Add non_negative argument in[pysd.translators.structures.abstract_expressions.IntegStructure. (@enekomartinmartinez)

3.9.1

11 Mar 19:09
Compare
Choose a tag to compare

New Features

  • Add numpy.py as translation for the call to the function PI(). (@lionel42)

Bug fixes

Internal Changes

  • Run test for Python 3.11 with ubuntu-latest (hdf5-headers need to be installed using apt manager). (@enekomartinmartinez)

3.9.0

16 Dec 19:06
5c3a323
Compare
Choose a tag to compare

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

3.8.0

03 Nov 15:15
5e86527
Compare
Choose a tag to compare

New Features

  • Adds ncfile.py module with helper functions to export a subset or all of the data_vars in netCDF files generated with PySD to pandas.DataFrame, csv or tab files. (@rogersamso)
  • Adds possibility to initialize and export a subset or all external objects to netCDF, and then initialize the external objects from the file. (@rogersamso)

Deprecations

  • Deprecate pysd.py_backend.model.Model._get_dependencies() replacing it with pysd.py_backend.model.Model.get_dependencies(). (@enekomartinmartinez)

Bug fixes

  • Include new class pysd.py_backend.utils.Dependencies to return by pysd.py_backend.model.Model.get_dependencies() (issue #379). (@lionel42)

Documentation

  • Updates the Getting Started page with instructions on how to use the new helper functions for netCDF files. (@rogersamso)
  • Updates the Advanced Usage page with instructions on how to export externals to netCDF and initialize a model from it. (@rogersamso)
  • Update citation information to include the new paper published in JOSS. (@enekomartinmartinez)

Performance

  • Initializing external objects from netCDF file is much faster than reading from spreadsheet files.(@rogersamso)

Internal Changes

  • Adds the pysd.py_backend.model.Macro.serialize_externals() and pysd.py_backend.model.Macro.initialize_external_data() methods, and a few other private methods.(@rogersamso)
  • Adds the pysd.py_backend.utils.UniqueDims class for renaming model dimensions with unique names.(@rogersamso)
  • Force pysd.py_backend.external.External objects to always have the full element dimensions, missing dimensions are filled with numpy.nan. (@enekomartinmartinez)
  • Add dependabot configuration for GitHub Actions updates. (@EwoutH)
  • Include new error messages for initialization of pysd.py_backend.lookups.HardcodedLookups (issue #376). (@enekomartinmartinez)
  • Include new warning message when a translated variable has several types or subtypes. (@enekomartinmartinez)
  • Set CI test to run in parallel in 2 cores. (@enekomartinmartinez)

3.7.1

19 Sep 21:08
Compare
Choose a tag to compare

Bug fixes

  • Fix bugs with pandas release 1.5.0.

3.7.0

19 Sep 16:00
ac80a06
Compare
Choose a tag to compare

New Features

  • Simulation results can now be stored as netCDF4 files. (@rogersamso)
  • The CLI also accepts netCDF4 file paths after the -o argument. (@rogersamso)

Bug fixes

  • Fix bug when a WITH LOOKUPS argument has subscripts. (@enekomartinmartinez)
  • Fix bug of exportig csv files with multiple subscripts variables. (@rogersamso)
  • Fix bug of missing dimensions in variables defined with not all the subscripts of a range (issue #364). (@enekomartinmartinez)
  • Fix bug when running a model with variable final time or time step and progressbar (issue #361). (@enekomartinmartinez)

Documentation

  • Add Storing simulation results on a file section in the Getting Started page. (@rogersamso)
  • Include cookbook information in the Getting Started page. (@enekomartinmartinez)
  • Include an introduction of main historical changes in the About the Project page. (@enekomartinmartinez)

Performance

  • Exporting outputs as netCDF4 is much faster than exporting a pandas DataFrame, especially for large models. (@rogersamso)

Internal Changes

3.6.1

05 Sep 15:36
Compare
Choose a tag to compare

Internal Changes

  • Set parsimonius requirement to 0.9.0 to avoid a breaking change in the newest version. Pending to update PySD to run it with parsimonious 0.10.0.

3.6.0

31 Aug 10:44
Compare
Choose a tag to compare

New Features

  • Include warning messages when a variable is defined in more than one view, when a control variable appears in a view or when a variable doesn’t appear in any view as a workbench variable (issue #357).
  • Force variables in a module to be saved alphabetically for being able to compare differences between versions (only for the models that are split by views).

Bug fixes

  • Classify control variables in the main file always (issue #357).

Internal Changes

3.5.2

15 Aug 14:44
Compare
Choose a tag to compare

Bug fixes

  • Make sketch's font_size optional.

Documentation

  • Correct typos.

3.5.1

11 Aug 20:12
Compare
Choose a tag to compare

Bug fixes

Performance

  • Improve the performance of reading pysd.py_backend.external.External data with cellrange names by loading the data in memory with pandas. As recommended by openpyxl developers, this is a possible way of improving performance to avoid parsing all rows up each time for getting the data (issue 1867 in openpyxl).