Releases: SDXorg/pysd
3.14.2
Internal Changes
- Several changes to allow compatibility with latest versions of numpy and xarray:
- Ensure that float objects evaluated with numpy are converted to float.
- Ensure proper shape of inputs when loading external data.
- Avoid DeprecationWarning raised in invert_matrix` test.
- Remove get_html_theme_path from docs conf.
3.14.1
Bug fixes
- Support for numpy 2. (@enekomartinmartinez)
- Allow multiple font styles in var names (#443). (@rogersamso)
- Allow Vensims GET DIRECT/XLS SUBSCRIPT when lastcell is not a cell value (#443). (@enekomartinmartinez)
- Allow Vensims GET DIRECT/XLS SUBSCRIPT defined with cell range names (#261). (@enekomartinmartinez)
- Translate filenames as raw str to made them work properly for Windows paths (#443). (@enekomartinmartinez)
- Improve support for reading pysd.py_backend.external.External from all the spreadsheet files includying those types from open software (‘.odf’, ‘.ods’, ‘.odt’). (@enekomartinmartinez)
- Improve support for reading pysd.py_backend.external.External from CSV, TAB and any other kind of text file. (@enekomartinmartinez)
Internal Changes
- Fix CI tests. (@rogersamso)
- Run CI coverage only on ubuntu and lowest Python. (@enekomartinmartinez)
- Rename ‘sheet’ by ‘tab’ in pysd.py_backend.external.External and related functions and classes to follow Vensim’s nomenclature. (@enekomartinmartinez)
- Add error message when no subscripts are read from pysd.py_backend.external.ExtSubscript during the model building. (@enekomartinmartinez)
- Add error message when a pysd.py_backend.external.External cell/firstcell is interpreted as cellrange name but the input file is not a spreadsheet. (@enekomartinmartinez)
- Improve parsing of quoted arguments in the vensim translator for external lookups and external subscripts. (@enekomartinmartinez)
3.14.0
New Features
- Support Vensim’s RANDOM EXPONENTIAL function (#107). (@enekomartinmartinez)
Bug fixes
- Fix truncation in Vensim’s RANDOM NORMAL function translation. (@enekomartinmartinez)
Documentation
- Add supported random functions to the documentation tables. (@enekomartinmartinez)
Internal Changes
- Add test for random functions, including comparison with Vensim outputs and expected values (#107). (@enekomartinmartinez)
- Allow to add multiple imports by the python function call builder. (@enekomartinmartinez)
3.13.4
Bug fixes
- Fix initialization dependencies for pysd.py_backend.statefuls.Smooth in the builder pysd.builders.python.python_expressions_builder.SmoothBuilder (issue #440). (@enekomartinmartinez)
3.13.3
Documentation
- Improve documentation for
netCDF4
dependency. (@enekomartinmartinez)
Internal Changes
- Support for
Python 3.12
. (@enekomartinmartinez) - Support for
numpy >= 1.24
. (@enekomartinmartinez) - Correct some warnings management in the tests. (@enekomartinmartinez)
- Set
numpy
requirements to>= 1.23
to follow NEP29. (@enekomartinmartinez) - Custom error messages when
netCDF4
is missing (#435). (@enekomartinmartinez)
3.13.2
Bug fixes
- Add support for XMILE's DELAY function through
DelayFixed
(issue #433). (@enekomartinmartinez)
3.13.1
Bug fixes
- Fix bug with
pysd.py_backend.output.ModelOutput
initializing all the handlers, and thus, importing netCDF4 when unnecessary (issue #431). (@enekomartinmartinez)
3.13.0
New Features
- Include new method pysd.py_backend.model.Model.copy which allows copying a model (issue #131). (@enekomartinmartinez)
- pysd.py_backend.model.Model.select_submodel now takes an optional argument inplace when set to
False
it will return a modified copy of the model instead of modifying the original model (issue #131). (@enekomartinmartinez) - pysd.py_backend.model.Model.export will now save also time component information if changed (e.g. final time, time step…). (@enekomartinmartinez)
Bug fixes
-
Set the pointer of pysd.py_backend.statefuls.DelayFixed to 0 during initialization (issue #427). (@enekomartinmartinez)
-
pysd.py_backend.model.Model.export now works with Macros. (@enekomartinmartinez)
Documentation
-
Improve documentation of methods in pysd.py_backend.model.Model and pysd.py_backend.model.Macro includying cross-references and rewrite the one from pysd.py_backend.model.Macro.set_components. (@enekomartinmartinez)
-
Include documentation about the new method pysd.py_backend.model.Model.copy and update documentation from pysd.py_backend.model.Model.select_submodel. (@enekomartinmartinez)
Performance
- Improved performace of
pysd.py_backend.output.DataFrameHandler
by creating the dataframe at the end of the run (issues #374 and #330). (@easyas314159 and @enekomartinmartinez)
Internal Changes
- Move old
pysd.py_backend.model.Macro.set_components
topysd.py_backend.model.Macro._set_components
, and create new method with the same name without the new argument. (@enekomartinmartinez) - Move old
pysd.py_backend.model.Macro.set_stateful
topysd.py_backend.model.Macro._set_stateful
. (@enekomartinmartinez) - Make integration tests filter only specific warnings. (@enekomartinmartinez)
- Include warnings in pysd.py_backend.model.Macro.set_components when changing the behaviour of the component (issue #58). (@enekomartinmartinez)
3.12.0
Breaking changes
- Remove support for Python 3.7 and 3.8. (@enekomartinmartinez)
- Update the cellrange retrievel to be compatible with openpyxl >= 3.1. It breaks the code for lower versions. (@enekomartinmartinez)
Bug fixes
- Update benchmarking tools to avoid FutureWarning for positional keys from pandas. (@enekomartinmartinez)
Documentation
- Update requirements. (@enekomartinmartinez)
Internal Changes
- Update libraries used for building documentation and .readthedocs.yml. (@enekomartinmartinez)
- Force to use xarray >= 2023.09. (@enekomartinmartinez)
- Use pandas[excel] instead of xlrd dependency in the requirements. (@gdrosos)
3.11.0
New Features
- Add the possibility to run a model one or several steps at a time, updating model variables in the process. (@rogersamso)
Documentation
- Add the Running models one (or more) step(s) at a time section in Advanced Usage. (@rogersamso)
Internal Changes
- Modify signature of the pysd.py_backend.output.ModelOutput class. It now only accepts the path of the results file (@rogersamso)
- Add the pysd.py_backend.output.ModelOutput.collect() method to the pysd.py_backend.output.ModelOutput class. (@rogersamso)
- Add the pysd.py_backend.model.Model.set_stepper() and pysd.py_backend.model.Model.step() methods to the pysd.py_backend.model.Model class. (@rogersamso)
- Add several internal methods to the pysd.py_backend.model.Model class, to avoid code repetition. (@rogersamso)
- Add FutureWarning for Python 3.7 support deprecation. (@enekomartinmartinez)