Skip to content

DSS-Python v0.14.2

Compare
Choose a tag to compare
@PMeira PMeira released this 25 May 20:19
· 108 commits to master since this release

DSS-Python 0.14.2 upgrades the DSS engine, complements the plotting backend, and updates the JSON exports and Obj/Batch APIs. The following notebooks can give an overview of some features:

Both can be run with Google Colab (links included in the notebooks), but some features may work better on a local installation. As always, feedback is welcome!


DSS-Python is a Python package that provides access to the DSS-Extensions engine, using DSS C-API and CFFI. This engine is a customized port of the Windows/Delphi code to Free Pascal, including several quality-of-life improvements for Python users. DSS-Python tries to provide a drop-in replacement from the official OpenDSS COM API, while adding some features/extensions. It is also the underlying package used by OpenDSSDirect.py since 2018. If you are new to DSS-Extensions, see our FAQ here, as well as https://dss-extensions.org/

Version 0.14.2 has been released on the official Python package repository (PyPI). Since version 0.14.0, the main DSS-Python package is pure Python, but relies on the new dss-python-backend to allow us easier iteration on Python features. The backend package is available for Windows, macOS and Linux. This release includes support for Intel x86 and x86-64, ARM platforms, including Apple's M1 and later.

Please feel free to open issues on GitHub or post on https://github.com/orgs/dss-extensions/discussions

Note: Although the majority of features are ported frequently from the official OpenDSS and validated with a large suite of tests, this is not supported by EPRI.

The main differences in behavior compared to the official OpenDSS implementation are listed in https://github.com/dss-extensions/dss_capi/blob/master/docs/known_differences.md

Some of the tests can also serve as examples of some features. For example, see test_general.py/test_threading2 for an example of how to use DSSContexts and Python threads.

Installation

Using pip (Python versions: 3.7 to 3.11):

    pip install dss_python==0.14.2

The binary wheels are also available as attachments on this release announcement.

If you encounter issues installing on Linux, be sure to update your pip and wheel packages before reporting a problem (versions too old may fail).

For PyPy, we recommend the users to build the wheels. If you'd like to use PyPy but aren't able to easily build the packages, please report here on GitHub.


⚙️ DSS C-API 0.13.2 changes

check its repo for more info

  • Integrate some of the code ports from the official OpenDSS. A few changes were left in the next_svn_merge branch to be integrated after there is a new OpenDSS release.
  • Fix and complement some header code and comments.
  • Refactor more of the internal code (huge merge still pending).
  • Plotting: callback messages now include bus marker information. This is used only in Python at the moment.
  • Add more error-checking to avoid accidental crashes in case of unexpected calls by the user code.
  • Text_CommandBlock: rewritten, now reuses the internal DoRedirect function, which allows block comments and also complements the error backtrace, when necessary.
  • Obj_GetClassIdx: fixed both header and implementation.
  • Build scripts updated. The version in the header is automatically updated on release.
  • JSON exports: new flags implemented, and whole behavior adjusted to better exporting all classes, including some problematic cases See DSS-Extensions — JSON exports for notes and examples.