OpenDSSDirect.py version 0.5.0 upgrades to DSS_Python 0.10.6. The version was bumped to v0.5.0 to reflect changes with the default behavior.
With this set of releases from the [DSS Extensions project](https://dss-extensions.org/), most API calls are checked, avoiding surprising/confusing messages when the errors are not handled immediately. In OpenDSSDirect.py, the error messages provided in the OpenDSS Error interface are automatically mapped to Python exceptions and should now provide a better context for the errors.
Two new important compatibility settings are introduced:
- [`opendssdirect.Error.ExtendedErrors`](http://dss-extensions.org/OpenDSSDirect.py/opendssdirect.html#opendssdirect.Error.ExtendedErrors) (defaults to enabled state): this new mechanism provides more error messages from the validation checks at the API level. You can disable the new messages, falling back to the previous behavior, using `opendssdirect.Error.ExtendedErrors(False)`.
- [`opendssdirect.Basic.LegacyModels`](http://dss-extensions.org/OpenDSSDirect.py/opendssdirect.html#opendssdirect.Basic.LegacyModels) (defaults to disabled state): in OpenDSS v9.0, the old PVSystem, Storage, ... models were deprecated and removed from the official release. In ODD.py, you can toggle the old models using `opendssdirect.Basic.LegacyModels(True)`. The current/new models, previously known as PVSystem2, Storage2, ... have been validated with the official tests and enabled by default.
OpenDSSDirect.py can be installed using pip. For more: http://dss-extensions.org/OpenDSSDirect.py/notebooks/Installation.html
As OpenDSSDirect.py accumulates changes from DSS_Python (all ported to OpenDSSDirect.py), DSS C-API and the official OpenDSS, read below for other important changes including bug-fixes.
Changes from DSS_Python 0.10.6
DSS_Python is the project that focuses on providing an interface, at Python level, that can be used as a drop-in replacement for the official OpenDSS COM interface. Users can combine both OpenDSSDirect.py and DSS_Python in the same application, sharing the same OpenDSS engine.
- Updated to DSS C-API 0.10.6, which includes most changes up to OpenDSS v9.0.0.3.
- Debug builds of DSS C-API are now included. See the [Debugging](https://github.com/dss-extensions/dss_capi/blob/0.10.x/docs/debug.md) document.
- New `DSS.LegacyModels`: allow using the legacy/deprecated models for `PVsystem`, `Storage`, `InvControl`, and `StorageController`.
- New `DSS.Error.ExtendedErrors`: controls if the new extended error messages are used.
- Many new properties and functions in `DSS.ActiveCircuit.PDElements`.
- Now most of the low-level API calls are checked, mapping the errors from the `DSS.Error` interface to Python exceptions more frequently.