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

Version 0.6.0 #150

Merged
merged 50 commits into from
Nov 29, 2023
Merged
Show file tree
Hide file tree
Changes from 49 commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
f37b854
First test
benoit9126 Aug 29, 2023
3d16187
Second test
benoit9126 Aug 29, 2023
1cf7813
Change branches
benoit9126 Aug 29, 2023
e8542c6
Merge pull request #125 from RoseauTechnologies/conda
benoit9126 Aug 29, 2023
8901aeb
Add some shortcut to the Line class
benoit9126 Sep 6, 2023
f6926fd
Changelog and doc
benoit9126 Sep 6, 2023
84c8b69
Merge pull request #128 from RoseauTechnologies/line-shortcut
benoit9126 Sep 6, 2023
2b2d901
Fix pint warnings and remove conditional import (#129)
alihamdan Sep 19, 2023
2333f91
Mark internal attributes as private (#130)
alihamdan Sep 19, 2023
293c7c6
Fix new pandas warning
alihamdan Sep 19, 2023
d730687
Update dependencies
benoit9126 Sep 13, 2023
f8fc7c8
Small bug
benoit9126 Sep 13, 2023
ce2868b
Improvement of the documentation
benoit9126 Sep 19, 2023
d1e367f
Add plot methods
benoit9126 Sep 19, 2023
369e9ed
Add tests
benoit9126 Sep 19, 2023
41e45c9
Fill the changelog
benoit9126 Sep 19, 2023
ecab3e2
Correction of the tests
benoit9126 Sep 19, 2023
48eb36d
Typo
benoit9126 Sep 19, 2023
08f28c3
Add a doc page about converters and constants (#132)
alihamdan Sep 20, 2023
a7f029f
Merge remote-tracking branch 'origin/develop' into issue127
alihamdan Sep 20, 2023
e019e23
Better missing matplotlib message, pint warnings, matplotlib warnings
alihamdan Sep 20, 2023
1abae9f
Some minor improvements
alihamdan Sep 20, 2023
46a1025
Merge pull request #131 from RoseauTechnologies/issue127
benoit9126 Sep 21, 2023
86e8306
Add q_min and q_max to flexible parameters
Saelyos Sep 20, 2023
cff7279
Fix settings
Saelyos Sep 21, 2023
b23c892
Add doc
Saelyos Sep 22, 2023
7395ca4
Improve checks and doc
Saelyos Sep 25, 2023
3686224
Update changelog
Saelyos Sep 25, 2023
4981df0
Merge pull request #133 from RoseauTechnologies/flexible-q-limits
Saelyos Sep 25, 2023
d176d80
Bump actions/checkout from 3 to 4 (#134)
dependabot[bot] Oct 2, 2023
c98e0d0
Improve catalogue printing on dark background and narrow screens (#135)
alihamdan Oct 4, 2023
ec177be
Add network constraints (limits) for load flow analysis (#138)
alihamdan Oct 9, 2023
bfb14ce
Add API reference to the models pages (#139)
alihamdan Oct 10, 2023
d6d91d8
Add python 3.12 and fix extras
alihamdan Oct 30, 2023
3e2412a
Implement networkx graphs
alihamdan Oct 30, 2023
a4bda7c
Rename method and clarify the text
alihamdan Oct 30, 2023
81a4f9d
One more clarification
alihamdan Oct 30, 2023
dcbaa65
Merge pull request #141 from RoseauTechnologies/networkx
alihamdan Oct 30, 2023
2857e43
Add voltage unbalance calculation (#142)
alihamdan Oct 30, 2023
64ee52b
Make the installation page more beginner friendly (#143)
alihamdan Nov 2, 2023
790deac
Fix typing of numpy arrays (#144)
alihamdan Nov 2, 2023
c30202a
Improve the typing of pint wrapped method (#147)
alihamdan Nov 17, 2023
57eff2a
Deprecate `LineParameters.from_name_lv` method (#148)
alihamdan Nov 17, 2023
8e658ac
Add custom pint wrapper
Saelyos Nov 17, 2023
e10880d
Update changelog
Saelyos Nov 17, 2023
94073bd
Make wrapper private, minor changes
Saelyos Nov 17, 2023
f7f6070
Merge pull request #149 from RoseauTechnologies/wrapper
Saelyos Nov 17, 2023
b29d47d
Use ruff formatter
benoit9126 Nov 28, 2023
240226f
Bump version
benoit9126 Nov 28, 2023
25aaeb6
Correction of the list of authors
benoit9126 Nov 29, 2023
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
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ jobs:

strategy:
matrix:
python-version: ["3.9", "3.10", "3.11"]
python-version: ["3.9", "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
lfs: false

Expand Down
14 changes: 8 additions & 6 deletions .github/workflows/conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
python-version: ["3.9"]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
lfs: false

Expand All @@ -47,17 +47,19 @@ jobs:
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
miniforge-variant: Mambaforge
use-mamba: true

- name: Conda Build
id: conda-build
shell: bash -l {0}
run: |
conda config --add channels conda-forge
conda config --set channel_priority strict
conda install --channel conda-forge conda-build conda-verify
mamba config --add channels conda-forge
mamba config --set channel_priority strict
mamba install --channel conda-forge conda-build conda-verify
mkdir -p dist/
conda build --output-folder dist/ conda/
echo "CONDA_ARCHIVE=$(conda build --output-folder dist/ --output conda/)" >> $GITHUB_OUTPUT
mamba build --output-folder dist/ conda/
echo "CONDA_ARCHIVE=$(mamba build --output-folder dist/ --output conda/)" >> $GITHUB_OUTPUT

- name: Upload artifact
uses: actions/upload-artifact@v3
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
sudo apt update
sudo apt -yq --no-install-suggests --no-install-recommends install pandoc make

- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
lfs: false

Expand Down Expand Up @@ -57,20 +57,20 @@ jobs:
- name: Install poetry
run: pipx install poetry

- name: Set up Python 3.11
- name: Set up Python 3.12
uses: actions/setup-python@v4
with:
python-version: "3.11"
python-version: "3.12"
cache: "poetry"

- name: Install dependencies
run: |
poetry env use "3.11"
poetry env use "3.12"
poetry install --only doc

- name: Build with Sphinx
run: |
poetry env use "3.11"
poetry env use "3.12"
cd doc && make html
env:
SPHINXBUILD: poetry run sphinx-build
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
lfs: false
- uses: actions/setup-python@v4
with:
python-version: "3.11"
python-version: "3.12"
- uses: pre-commit/action@v3.0.0
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -246,3 +246,6 @@ benchmark/*.mtx
*.log
.ruff_cache/
doc/images/*.pdf

roseau/*
!roseau/load_flow
21 changes: 10 additions & 11 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
exclude: ^.idea/|^conda/meta.yaml
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.5.0
hooks:
- id: check-builtin-literals
- id: check-json
Expand All @@ -13,28 +13,27 @@ repos:
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/python-poetry/poetry
rev: 1.6.0
rev: 1.7.0
hooks:
- id: poetry-check
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 23.7.0 # keep in sync with pyproject.toml
hooks:
- id: black-jupyter
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.0.286 # keep in sync with pyproject.toml
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.6 # keep in sync with pyproject.toml
hooks:
- id: ruff
types_or: [python, pyi, jupyter]
args: [--fix, --exit-non-zero-on-fix]
args: [--fix]
- id: ruff-format
types_or: [python, pyi, jupyter]
- repo: https://github.com/adamchainz/blacken-docs
rev: 1.16.0
hooks:
- id: blacken-docs
entry: bash -c "blacken-docs -l 90 $(find doc/ -name '*.md')"
args: [-l 90]
additional_dependencies: [black==23.7.0] # keep in sync with black above
additional_dependencies: [black==23.10.1] # keep in sync with black above
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.0.2
rev: v3.1.0
hooks:
- id: prettier
args: ["--print-width", "120"]
exclude: ^.vscode/
3 changes: 2 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
{
"recommendations": [
"charliermarsh.ruff",
"esbenp.prettier-vscode",
"ms-python.black-formatter",
"ms-python.python",
"ms-python.vscode-pylance"
"ms-python.vscode-pylance",
],
"unwantedRecommendations": [
"ms-python.flake8", // We use ruff
Expand Down
17 changes: 10 additions & 7 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,27 @@
"jupyter.notebookFileRoot": "${workspaceFolder}",
"notebook.formatOnSave.enabled": true,
"notebook.codeActionsOnSave": {
"source.organizeImports.ruff": true
"source.organizeImports.ruff": "explicit",
},

// Python
"python.analysis.diagnosticSeverityOverrides": {
"reportInvalidStringEscapeSequence": "warning",
"reportImportCycles": "warning",
"reportUnusedImport": "warning"
"reportUnusedImport": "warning",
},
"python.formatting.provider": "none",
"python.testing.pytestArgs": [],
"python.testing.unittestEnabled": false,
"python.testing.pytestEnabled": true,
"[python]": {
"editor.defaultFormatter": "ms-python.black-formatter",
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports.ruff": true
}
"source.organizeImports.ruff": "explicit",
},
},
// Prettier
"prettier.printWidth": 120,
"[markdown][yaml][html][css]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
}
}
4 changes: 3 additions & 1 deletion conda/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,6 @@ dependencies:
- pint >=0.21.0
- requests >=2.28.1
- typing-extensions >=4.6.2
- rich >=13.5.2
- rich >=13.5.1
- matplotlib >=3.7.2
- networkx >=3.0.0
4 changes: 3 additions & 1 deletion conda/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# prettier-ignore
{% set name = "roseau-load-flow" %}
{% set version = "0.5.0" %}
{% set version = "0.6.0" %}

package:
name: "{{ name|lower }}"
Expand Down Expand Up @@ -35,6 +35,8 @@ requirements:
- requests >=2.28.1
- typing-extensions >=4.6.2
- rich >=13.5.1
- matplotlib >=3.7.2
- networkx >=3.0.0

test:
imports:
Expand Down
11 changes: 11 additions & 0 deletions doc/Bibliography.bib
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,14 @@ @misc{wiki:Method_Of_Image_Charges
url = {http://en.wikipedia.org/w/index.php?title=Method\%20of\%20image\%20charges&oldid=1152888135},
note = "[Online; accessed 25-August-2023]"
}

@inproceedings{Girigoudar_2019,
author = {Girigoudar, Kshitij and Molzahn, Daniel K. and Roald, Line A.},
booktitle = {2019 North American Power Symposium (NAPS)},
title = {On The Relationships Among Different Voltage Unbalance Definitions},
year = {2019},
volume = {},
number = {},
pages = {1-6},
doi = {10.1109/NAPS46351.2019.9000231}
}
36 changes: 36 additions & 0 deletions doc/Changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,41 @@
# Changelog

## Version 0.6.0

- {gh-pr}`149` {gh-issue}`145` Add custom pint wrapper for better handling of pint arrays.
- {gh-pr}`148` {gh-issue}`122` deprecate `LineParameters.from_name_lv()` in favor of the more generic
`LineParameters.from_geometry()`. The method will be removed in a future release.
- {gh-pr}`142` {gh-issue}`136` Add `Bus.res_voltage_unbalance()` method to get the Voltage Unbalance
Factor (VUF) as defined by the IEC standard IEC 61000-3-14.
- {gh-pr}`141` {gh-issue}`137` Add `ElectricalNetwork.to_graph()` to get a `networkx.Graph` object
representing the electrical network for graph theory studies. Install with the `"graph"` extra to
get _networkx_.
`ElectricalNetwork` also gained a new `buses_clusters` property that returns a list of sets of
IDs of buses that are connected by a line or a switch. This can be useful to isolate parts of the
network for localized analysis. For example, to study a LV subnetwork of a MV feeder. Alternatively,
to get the cluster certain bus belongs to, you can use `Bus.get_connected_buses()`.
- {gh-pr}`141` Add official support for Python 3.12. This is the last release to support Python 3.9.
- {gh-pr}`138` Add network constraints for analysis of the results.
- Buses can define minimum and maximum voltages. Use `bus.res_violated` to see if the bus has
over- or under-voltage.
- Lines can define a maximum current. Use `line.res_violated` to see if the loading of any of the
line's cables is too high.
- Transformers can define a maximum power. Use `transformer.res_violated` to see if the transformer
loading is too high.
- The new fields also appear in the data frames of the network.
- {gh-pr}`133` {gh-issue}`126` Add Qmin and Qmax limits of flexible parameters.
- {gh-pr}`132` {gh-issue}`101` Document extra utilities including converters and constants.
- {gh-pr}`131` {gh-issue}`127` Improve the documentation of the flexible loads.
- Add the method `compute_powers` method to the `FlexibleParameter` class to compute the resulting flexible powers
for a given theoretical power and a list of voltage norms.
- Add the `plot_control_p`, `plot_control_q` and `plot_pq` methods to the `FlexibleParameter` class to plot the
control curves and control trajectories.
- Add the extra `plot` to install `matplotlib` alongside `roseau-load-flow`.
- {gh-pr}`131` Correction of a bug in the error message of the powers setter method.
- {gh-pr}`130` Mark some internal attributes as private, they were previously marked as public.
- {gh-pr}`128` Add the properties `z_line`, `y_shunt` and `with_shunt` to the `Line` class.
- {gh-pr}`125` Speed-up build of conda workflow using mamba.

## Version 0.5.0

- {gh-pr}`121` {gh-issue}`68` Improvements of the `LineParameters` constructor:
Expand Down
Loading
Loading