Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Class iterators #78

Merged
merged 46 commits into from
Feb 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
ba76a0b
Merge classes (WIP), remove CmathLib (not useful) and DSSEvents (empty)
PMeira Jul 2, 2023
a3eb020
Add `__name__` to the new classes
PMeira Jul 2, 2023
719e61a
Adjust tests and init. Some classes still missing.
PMeira Jul 2, 2023
b81ed45
Readd Iterable
PMeira Jul 2, 2023
4ae9eef
Minor adjustments; increment version to 0.8.0.dev
PMeira Jul 2, 2023
29e9529
Migrate Parallel and YMatrix to classes
PMeira Jul 2, 2023
a50be1b
Fix YMatrix, migrate Properties to class
PMeira Jul 2, 2023
c99ef1d
Migrate CktElement to class, removing deprecated params
PMeira Jul 2, 2023
b7ddbdd
Migrate DSSimComs to class (maybe we should just remove this one)
PMeira Jul 2, 2023
1bf0714
Migrate Basic to class
PMeira Jul 2, 2023
ef44f4f
Migrate Monitors to class
PMeira Jul 2, 2023
9977c96
Clean up imports
PMeira Jul 2, 2023
9350053
Update docs
PMeira Jul 2, 2023
75978c5
Rebased and updated: use GR API, port various functions and docstring…
PMeira Jul 2, 2023
c830b11
Remove DSSimComs, never seen anyone use it at all
PMeira Jul 2, 2023
df0dd83
Various small fixes; temporarily install DSS-Python from branch oddpy…
PMeira Jul 3, 2023
5b04241
Tests: add "Sensor" in Load and PVSystems tests; `Sensors.Currents()`…
PMeira Jul 3, 2023
aa548be
Use `dss_python==0.15.0b1` to enable full tests
PMeira Jul 3, 2023
0dec1eb
Reapply old numpy.complex fix
PMeira Jul 3, 2023
ee885c5
Adjust tests and CI to include NumPy active; fix regression for strings.
PMeira Jul 3, 2023
1756c55
Add support for DSSContexts and some other small changes.
PMeira Jul 4, 2023
f5978bf
Remove opendssdirect.dss as a module to allow callable ctx, add tests.
PMeira Jul 4, 2023
6d44633
Handle new property capitalization, adjust tests to be case insensitive
PMeira Oct 10, 2023
645bc76
Tests: handle NumPy arrays in our new _assert_dict_equal
PMeira Dec 13, 2023
c8f9312
Tests: workaround spurious messages from the faulthandler, enabled in…
PMeira Dec 13, 2023
d14f79f
Expose SetPropertyNameStyle
PMeira Dec 14, 2023
7e2120c
`dss(cmds)`: use single CommandBlock now that it's optimized in DSS C…
PMeira Dec 14, 2023
ee99195
For better compatibility, expose the `utils` module in DSSContext; im…
PMeira Dec 14, 2023
9793291
Enums: import from dss_python_backend
PMeira Dec 15, 2023
1341dc5
Packaging: migrate to `pyproject.toml` and Hatch
PMeira Jan 24, 2024
e35ca5f
Update docs and examples (WIP)
PMeira Jan 30, 2024
1235108
Classes: disallow plain setattr; point that we don't use Python prope…
PMeira Feb 1, 2024
5ecefdc
Handle DSS-Python and AltDSS integration.
PMeira Feb 1, 2024
b17a59a
Handle the default instance vs. submodules better, including NumPy su…
PMeira Feb 2, 2024
533a863
Sync with DSS-Python (for docstrings), adjust formatting.
PMeira Feb 2, 2024
664fb72
General docstring, docs, and imports update
PMeira Feb 7, 2024
fa20480
Rename Iterable.py to Bases.py; use `_check_for_error` instead of `Ch…
PMeira Feb 7, 2024
7851d93
Add missing enum imports
PMeira Feb 8, 2024
59fd7a4
Avoid comparing types
PMeira Feb 8, 2024
753f0a5
LineGeometries: remove the matrices from `_columns`
PMeira Feb 8, 2024
28c40b3
Tests: enable the multithreaded test
PMeira Feb 8, 2024
3c626c4
Meters: remove several items from `_columns` that require an active s…
PMeira Feb 8, 2024
af8fd87
CI: updates for Python 3.12 and new packaging style; remove AppVeyor.
PMeira Feb 8, 2024
d7ec602
NewContext: ensure NumPy preference is propagated to new contexts.
PMeira Feb 9, 2024
4c57a5b
Docs: various updates:
PMeira Feb 9, 2024
76046c5
dss_python==0.15.0
PMeira Feb 8, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 0 additions & 47 deletions .appveyor.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
You can use the following block of code to find the version of OpenDSSDirect.py that you are using

```python
import opendssdirect as dss
from opendssdirect import dss
print(dss.__version__)
```

Expand Down
11 changes: 9 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
os: [ubuntu-latest, windows-latest, macos-latest]

runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
Expand All @@ -24,7 +25,8 @@ jobs:
run: |
python -m pip install --upgrade pip
python -m pip install pandas matplotlib pytest
python -m pip install -e .[extras]
git fetch --unshallow
python -m pip install .[extras]
- name: Test
run: |
Expand All @@ -34,3 +36,8 @@ jobs:
if: runner.os == 'Linux'
run: |
DSS_EXTENSIONS_DEBUG=1 pytest -vv
- name: Test (activate NumPy on Linux only)
if: runner.os == 'Linux'
run: |
OPENDSSDIRECT_PY_USE_NUMPY=1 pytest -vv
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v1.2.3
rev: v4.5.0
hooks:
- id: trailing-whitespace
- id: check-ast
- id: check-merge-conflict
- repo: https://github.com/ambv/black
rev: stable
- repo: https://github.com/psf/black
rev: 23.12.1
hooks:
- id: black
args: [--line-length=88, --safe]
python_version: python3.6
args: [--line-length=88, --safe, -S]
python_version: python3.7

50 changes: 0 additions & 50 deletions .travis.yml

This file was deleted.

21 changes: 14 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,24 @@
[![PyPI](https://img.shields.io/pypi/v/OpenDSSDirect.py.svg)](https://pypi.python.org/pypi/OpenDSSDirect.py/)
[![Documentation](https://img.shields.io/badge/docs-ready-blue.svg)](http://dss-extensions.org/OpenDSSDirect.py)

OpenDSSDirect.py is a cross-platform Python package implements a "direct" library interface [our customized implementation](https://github.com/dss-extensions/dss_capi) of [OpenDSS](http://smartgrid.epri.com/SimulationTool.aspx) using [DSS-Python](https://github.com/dss-extensions/dss_python/).
OpenDSSDirect.py is a cross-platform Python package implements a "direct" library interface to [our customized implementation](https://github.com/dss-extensions/dss_capi) of [OpenDSS](http://smartgrid.epri.com/SimulationTool.aspx) using [DSS-Python](https://github.com/dss-extensions/dss_python/).
OpenDSS is an open-source distribution system simulator. See [OpenDSSDirect.jl](https://github.com/dss-extensions/OpenDSSDirect.jl) for a similar package in Julia, and for more context about this project and its components (including alternatives in MATLAB, C++ and C#/.NET), please check [https://dss-extensions.org/](https://dss-extensions.org/) and our hub repository at [dss-extensions/dss-extensions](https://github.com/dss-extensions/dss-extensions) for more documentation, discussions and the [FAQ](https://github.com/dss-extensions/dss-extensions#faq).


<p align="center">
<img alt="Overview of related projects" src="https://github.com/dss-extensions/dss-extensions/blob/main/images/repomap.png?raw=true">
</p>


*As a reminder, although very compatible, this project is not supported by EPRI.*

**This package is available for Windows, Mac and Linux, including ARM and x86 variants.**

### Documentation
## Documentation

The documentation for this package can be found [here](http://dss-extensions.org/OpenDSSDirect.py).

### Installation
## Installation

**Recommended**: Install Python using Miniconda or Anaconda

Expand All @@ -26,17 +32,18 @@ Open a command line interface and type the following.
pip install 'OpenDSSDirect.py[extras]'
```

See [installation](https://dss-extensions.org/OpenDSSDirect.py/notebooks/Installation.html) instructions for more information.
See the [installation](https://dss-extensions.org/OpenDSSDirect.py/notebooks/Installation.html) instructions for more information.

Updating from pre-v0.9 versions? [See the upgrade guide for recommendations.](https://dss-extensions.org/OpenDSSDirect.py/updating_to_0.9.html)

### Troubleshooting
## Troubleshooting

It is recommended to use `conda` to install pandas, which is currently a dependency of this package.
This package interfaces with OpenDSS using the "direct" library interface, so a good understanding of OpenDSS will help troubleshooting.
There are plenty of useful resources located [here](https://sourceforge.net/p/electricdss/code/HEAD/tree/trunk/Doc/).

If you are having issues using this Python interface, feel free to open an Issue on GitHub [here](https://github.com/dss-extensions/OpenDSSDirect.py/issues/new).

### Thanks
## Thanks

Thanks to @tshort, Davis, @temcdrm, @GordStephen, @Muxelmann and @PMeira for their contributions, as well as all the users for their valuable feedback.

Expand Down
Binary file added docs/_static/dssx.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading