Skip to content

Commit 7ce7142

Browse files
committed
Updated docs for 0.10.3
1 parent fc335dd commit 7ce7142

File tree

6 files changed

+40
-70
lines changed

6 files changed

+40
-70
lines changed

.travis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ matrix:
77
sudo: required
88
env:
99
- DOCKER_IMAGE=pmeira/manylinux_wheel_cmake_fpc
10-
- DSS_CAPI_TAG=0.10.3a7
10+
- DSS_CAPI_TAG=0.10.3
1111
- LINUX_X64=1
1212
- CONDA_SUBDIR=linux-64
1313
services:
@@ -32,7 +32,7 @@ matrix:
3232
sudo: required
3333
env:
3434
- DOCKER_IMAGE=pmeira/manylinux_wheel_cmake_fpc_i686
35-
- DSS_CAPI_TAG=0.10.3a7
35+
- DSS_CAPI_TAG=0.10.3
3636
- CONDA_SUBDIR=linux-32
3737
services:
3838
- docker
@@ -52,7 +52,7 @@ matrix:
5252
- name: "osx_x64"
5353
os: osx
5454
env:
55-
- DSS_CAPI_TAG=0.10.3a7
55+
- DSS_CAPI_TAG=0.10.3
5656
script:
5757
- export TRAVIS_TAG_DSS_PYTHON=$TRAVIS_TAG
5858
- export TRAVIS_TAG=

README.md

Lines changed: 16 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ See also the other projects from [DSS-Extensions.org](https://dss-extensions.org
1313
- [DSS Sharp](http://github.com/dss-extensions/dss_sharp/): available for .NET/C#, also mimics the COM classes, but Windows-only at the moment. Soon it will be possible to use it via COM too.
1414
- [DSS MATLAB](http://github.com/dss-extensions/dss_matlab/): presents multi-platform integration (Windows, Linux, MacOS) with DSS C-API and is also very compatible with the COM classes.
1515

16-
Version 0.10.3 **in development**, based on OpenDSS revision 2504. While we plan to add a lot more funcionality into DSS Python, the main goal of creating a COM-compatible API has been reached. If you find an unexpected missing feature, please report it!
16+
Version 0.10.3, based on OpenDSS revision 2609 (which is slightly newer than OpenDSS v8.5.9.1 and v7.6.5.86). While we plan to add a lot more funcionality into DSS Python, the main goal of creating a COM-compatible API has been reached. If you find an unexpected missing feature, please report it!
1717

1818
This module mimics the COM structure (as exposed via `win32com` or `comtypes`), effectively enabling multi-platform compatibility at Python level.
1919
Most of the COM documentation can be used as-is, but instead of returning tuples or lists, this modules returns/accepts NumPy arrays for numeric data exchange.
@@ -22,9 +22,10 @@ The module depends on CFFI, NumPy and, optionally, SciPy.Sparse for reading the
2222

2323
## Recent changes
2424

25-
Check the [changelog](docs/changelog.md#0101) document for a more detailed list.
25+
Check the [changelog](docs/changelog.md#0103) document for a detailed list.
2626

27-
- **2019-02-28 / version 0.10.2: Some small fixes, adds the missing `CtrlQueue.Push`, faster LoadShapes and new property `DSS.AllowEditor` to toggle editor calls.**
27+
- **2019-05-22 / version 0.10.3: Some important fixes, better general performance, new API extensions, new features ported from COM and the OpenDSS version 8 codebase.**
28+
- 2019-02-28 / version 0.10.2: Some small fixes, adds the missing `CtrlQueue.Push`, faster LoadShapes and new property `DSS.AllowEditor` to toggle editor calls.
2829
- 2019-02-17 / version 0.10.1: Integrate DSS C-API changes/fix, some small fixes, and more error-checking.
2930
- 2018-11-17 / version 0.10.0: Lots of changes, fixes and new features. Check the new [changelog](docs/changelog.md#0100) document for a list.
3031
- 2018-08-12 / version 0.9.8: Reorganize modules (v7 and v8), adds 8 missing methods and new backend methods for OpenDSSDirect.py v0.3+. Integrates many fixes from DSS_CAPI and the upstream OpenDSS.
@@ -66,13 +67,13 @@ Or, if you're using the Anaconda distribution, you can use:
6667
conda install -c pmeira dss_python
6768
```
6869

69-
Binary wheels are provided for all major platforms (Windows, Linux and MacOS) and many combinations of Python versions (2.7, 3.4 to 3.7). If you have issues with a specific version, please open an issue about it. Conda packages support at least Python 2.7, 3.5, 3.6 and 3.7.
70+
Binary wheels are provided for all major platforms (Windows, Linux and MacOS) and many combinations of Python versions (2.7, 3.5 to 3.7). If you have issues with a specific version, please open an issue about it. Conda packages support at least Python 2.7, 3.5, 3.6 and 3.7.
7071

7172
After a successful installation, you can then import the `dss` module from your Python interpreter.
7273

7374
## Building
7475

75-
Get this repository:
76+
Get the repository:
7677

7778
```
7879
git clone https://github.com/dss-extensions/dss_python.git
@@ -102,7 +103,7 @@ If you were using `win32com` in code like:
102103

103104
```python
104105
import win32com.client
105-
dss_engine = win32com.client.Dispatch("OpenDSSEngine.DSS")
106+
dss_engine = win32com.client.gencache.EnsureDispatch("OpenDSSEngine.DSS")
106107
```
107108

108109
or `comtypes`:
@@ -115,15 +116,15 @@ dss_engine = comtypes.client.CreateObject("OpenDSSEngine.DSS")
115116
you can replace that fragment with:
116117
```python
117118
import dss
118-
dss.use_com_compat()
119119
dss_engine = dss.DSS
120120
```
121121

122+
If you need the mixed-cased handling (that is, you were not using early bindings with win32com), add a call to `dss.use_com_compat()`.
123+
122124
Assuming you have a DSS script named `master.dss`, you should be able to run it as shown below:
123125

124126
```python
125127
import dss
126-
dss.use_com_compat()
127128
dss_engine = dss.DSS
128129

129130
dss_engine.Text.Command = "compile c:/dss_files/master.dss"
@@ -134,7 +135,6 @@ for i in range(len(voltages) // 2):
134135
print('node %d: %f + j%f' % (i, voltages[2*i], voltages[2*i + 1]))
135136
```
136137

137-
If you do not need the mixed-cased handling, omit the call to `use_com_compat()` and use the casing used in this project, which should use most of the COM instance conventions.
138138

139139
If you want to play with the experimental OpenDSS-PM interface (from OpenDSS v8), it is installed side-by-side and you can import it as:
140140

@@ -145,68 +145,25 @@ dss_engine = dss.v8.DSS
145145

146146
Although it is experimental, most of its funcionality is working. Depending on your use-case, the parallel interface can be an easy way of better using your machine resources. Otherwise, you can always use general distributed computing resources via Python.
147147

148+
Beware the v8 alternative can present issues and it should be removed as soon as all OpenDSS 8+ features are integrated into the default version.
148149

149150
Testing
150151
=======
151-
Since the DLL is built using the Free Pascal compiler, which is not officially supported by EPRI, the results are validated running sample networks provided in the official OpenDSS distribution. The only modifications are done directly by the script, removing interactive features and some other minor issues.
152-
153-
The validation scripts is `tests/validation.py` and requires the same folder structure as the building process. You need `win32com` to run it.
154-
155-
Currently, at least the following sample files from the official OpenDSS repository are used:
152+
Since the DLL is built using the Free Pascal compiler, which is not officially supported by EPRI, the results are validated running sample networks provided in the official OpenDSS distribution. The only modifications are done directly by the script, removing interactive features and some other minor issues. Most of the sample files from the official OpenDSS repository are used for validation.
156153

157-
```
158-
Distrib/EPRITestCircuits/ckt5/Master_ckt5.dss
159-
Distrib/EPRITestCircuits/ckt7/Master_ckt7.dss
160-
Distrib/EPRITestCircuits/ckt24/Master_ckt24.dss
161-
Distrib/IEEETestCases/8500-Node/Master-unbal.dss
162-
Distrib/IEEETestCases/IEEE 30 Bus/Master.dss
163-
Distrib/IEEETestCases/NEVTestCase/NEVMASTER.DSS
164-
Distrib/IEEETestCases/37Bus/ieee37.dss
165-
Distrib/IEEETestCases/4Bus-DY-Bal/4Bus-DY-Bal.DSS
166-
Distrib/IEEETestCases/4Bus-GrdYD-Bal/4Bus-GrdYD-Bal.DSS
167-
Distrib/IEEETestCases/4Bus-OYOD-Bal/4Bus-OYOD-Bal.DSS
168-
Distrib/IEEETestCases/4Bus-OYOD-UnBal/4Bus-OYOD-UnBal.DSS
169-
Distrib/IEEETestCases/4Bus-YD-Bal/4Bus-YD-Bal.DSS
170-
Distrib/IEEETestCases/4Bus-YY-Bal/4Bus-YY-Bal.DSS
171-
Distrib/IEEETestCases/123Bus/IEEE123Master.dss
172-
Distrib/IEEETestCases/123Bus/SolarRamp.DSS
173-
Distrib/IEEETestCases/13Bus/IEEE13Nodeckt.dss
174-
Test/IEEE13_LineSpacing.dss
175-
Test/IEEE13_LineGeometry.dss
176-
Test/IEEE13_LineAndCableSpacing.dss
177-
Test/IEEE13_Assets.dss
178-
Test/CableParameters.dss
179-
Test/Cable_constants.DSS
180-
Test/BundleDemo.DSS
181-
Test/IEEE13_SpacingGeometry.dss
182-
Test/TextTsCable750MCM.dss
183-
Test/TestDDRegulator.dss
184-
Test/XYCurvetest.dss
185-
Test/PVSystemTestHarm.dss
186-
Test/TestAuto.dss
187-
Test/Stevenson.dss
188-
Test/YgD-Test.dss
189-
Test/Master_TestCapInterface.DSS
190-
Test/LoadTest.DSS
191-
Test/IEEELineGeometry.dss
192-
Test/ODRegTest.dss
193-
Test/MultiCircuitTest.DSS
194-
Test/TriplexLineCodeCalc.DSS
195-
Test/PVSystemTest-Duty.dss
196-
Test/PVSystemTest.dss
197-
Test/REACTORTest.DSS
198-
```
154+
The validation scripts is `tests/validation.py` and requires the same folder structure as the building process. You need `win32com` to run it on Windows.
199155

200-
On Windows 10, remember to set the compatibility layer to Windows 7 (set the environment variable `__COMPAT_LAYER=WIN7RTM`), otherwise you may encounter issues with COM due to [ASLR](https://en.wikipedia.org/wiki/Address_space_layout_randomization) on Python 3.6+.
201156

202-
There is no full validation on Linux yet since we cannot run the COM module there. There is an ongoing effort on pickling the data on Windows and loading on Linux for comparison (for the full test suite, it results in 8+GB of data and can be time-consuming).
157+
As of version 0.11, the full validation suite can be run on the three supported platforms. This is possible by saving the official COM DLL output and loading it on macOS and Linux. We hope to automate this validation in the future.
203158

204159
Roadmap
205160
=======
206161
Besides bug fixes, the main funcionality of this library is mostly done. Notable desirable features that may be implemented are:
207162

208163
- More and better documentation
209-
- Plotting and reports integrated in Python
164+
- Plotting and reports integrated in Python.
165+
166+
Expect news about these items by version 0.11.
210167

211168
Questions?
212169
==========

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ clone_folder: c:\projects\dss_python
55
cache:
66
- c:\projects\VCForPython27.msi
77
environment:
8-
DSS_CAPI_TAG: 0.10.3a7
8+
DSS_CAPI_TAG: 0.10.3
99
DSS_CAPI_PATH: c:\projects\dss_capi
1010
ANACONDA_API_TOKEN:
1111
secure: 78d9aslKXYoP2gVc7p5A5BJj3bSDPd2kZjQAlvEd64cCcxaf185CexeDNYNeNPuU

conda/meta.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package:
33
version: "{{ load_setup_py_data().version }}"
44

55
source:
6-
#git_rev: "0.10.2"
6+
#git_rev: "0.10.3"
77
#git_url: https://github.com/dss-extensions/dss_python.git
88
path: ..
99

docs/changelog.md

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,24 @@
1+
2+
13
# 0.10.3
24

3-
**in development, not released**
5+
Released on 2019-05-22. This is the last release to provide pre-built binaries for Python 3.4.
46

5-
- Use prebuilt binaries for DSS C-API and KLUSolve
6-
- Prebuilt wheels for 32-bit Linux are now available
7+
- Includes fix for issue with the line parameters on Linux and macOS due to memory-address aliasing issues.
8+
- Prebuilt binaries for DSS C-API and KLUSolve are used instead of rebuilding everything from source.
9+
- Prebuilt packages (wheels) for 32-bit Linux are now available.
10+
- Development artifacts are now included in the distribution package. This enables advanced usage and easier integration with compiled languages (examples pending, please open an issue if you'd like to know more).
711
- `ReduceCkt` ported from COM: new circuit reduction methods available in `DSS.ActiveCircuit.ReduceCkt`
8-
12+
- `Lines`: ported from COM, new seasonal ratings mechanism that allows changing the current rating through the simulation
13+
- Optimization and extended error-checking in many properties
14+
- Includes new `Settings.LoadsTerminalCheck`: on static scenarios (no open terminals for loads) to toggle the costly checks for open terminals. If set to false, it can save around 25% of simulation time, depending on the circuit characteristics.
15+
- All components now can be accessed by index (`idx` property)
16+
- All components now have faster `Name` iteration
17+
- Ported to v7/default interface: the DSS commands `CalcIncMatrix`, `CalcIncMatrix_O`, `Refine_BusLevels`, `CalcLaplacian`, and related export options: `IncMatrix`, `IncMatrixRows`, `IncMatrixCols`, `BusLevels`, `Laplacian`, `ZLL`, `ZCC`, `Contours`, `Y4`. Also includes related Python-level properties.
18+
- Some other new properties:
19+
- `CktElement.IsIsolated`
20+
- `Lines.IsSwitch`
21+
- `Transformers.LossesByType` and `Transformers.AllLossesByType`
922

1023
# 0.10.2
1124

dss/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
'''A compatibility layer for DSS_CAPI that mimics the official OpenDSS COM interface.
22
3-
Copyright (c) 2016-2018 Paulo Meira
3+
``dss`` is the main package for DSS Python. DSS Python is a compatibility layer for the DSS C-API library that mimics the official OpenDSS COM interface, with many extensions and a few limitations.
44
'''
55
from __future__ import absolute_import
66
from .v7 import *
77
from .patch_dss_com import patch_dss_com
88

9-
__version__ = '0.10.3a2'
9+
__version__ = '0.10.3'

0 commit comments

Comments
 (0)