Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
8e85339
ENH: Remove pin on RLFE
benoit9126 Sep 3, 2025
d540b1d
ENH: Add tombi tool
benoit9126 Sep 9, 2025
3516d82
Merge pull request #410 from RoseauTechnologies/tombi
benoit9126 Sep 9, 2025
d0ac48f
Fix ruff settings with removed rule
alihamdan Sep 23, 2025
df6ff0d
Improve performance of single setters
Saelyos Sep 25, 2025
0001f48
Merge pull request #411 from RoseauTechnologies/single-setter-perf
Saelyos Sep 26, 2025
a1e7059
Bump actions/setup-python from 5 to 6
dependabot[bot] Oct 1, 2025
d938430
Merge pull request #412 from RoseauTechnologies/dependabot/github_act…
benoit9126 Oct 1, 2025
8835ebf
Restore bus and line in interactive map layer control (#413)
alihamdan Oct 31, 2025
0a5dae2
Bump astral-sh/setup-uv from 6 to 7
dependabot[bot] Nov 1, 2025
2df22bb
Bump actions/upload-artifact from 4 to 5
dependabot[bot] Nov 1, 2025
f34fef8
Merge pull request #414 from RoseauTechnologies/dependabot/github_act…
benoit9126 Nov 2, 2025
240813b
Merge pull request #415 from RoseauTechnologies/dependabot/github_act…
benoit9126 Nov 2, 2025
9cb7b36
Replace mention of entire french network by representative networks (…
alihamdan Nov 3, 2025
1a7966b
Run tests on dev and free-threaded pythons
alihamdan Aug 11, 2025
041321b
Fix catalogue filter with compiled regex
alihamdan Nov 26, 2025
fbf5134
Merge pull request #404 from RoseauTechnologies/test-new
alihamdan Nov 26, 2025
7020cbe
Bump actions/checkout from 5 to 6
dependabot[bot] Dec 1, 2025
c8bfb95
Fix pre-commit
alihamdan Dec 2, 2025
54c9416
Merge pull request #417 from RoseauTechnologies/dependabot/github_act…
alihamdan Dec 2, 2025
0dc4e9b
Improve interactive map plots (#418)
alihamdan Dec 3, 2025
5882f29
Drop support for Python 3.11 (#419)
alihamdan Dec 5, 2025
ab5446c
Simplify finding external modules for warnings (#420)
alihamdan Dec 5, 2025
b2ff4a2
Improve voltage propagation involving delta sources (#421)
alihamdan Dec 8, 2025
f578b2f
Factorize results plotting in preparation for voltage profiles (#424)
alihamdan Dec 22, 2025
791ef6b
Enforce some deprecations (#425)
alihamdan Dec 23, 2025
ded01e6
Interactive map plotting with results (#426)
alihamdan Dec 24, 2025
cf1fe69
Add missing transformer tap to the networkx graph (#427)
alihamdan Dec 24, 2025
0490688
Make unit wrapped functions more ty friendly (#428)
alihamdan Dec 25, 2025
00c49be
Add voltage profile plotting (#429)
alihamdan Dec 29, 2025
9009189
Remove spurious private method and fix a comment
alihamdan Dec 29, 2025
46d7653
Bump actions/upload-artifact from 5 to 6 (#432)
dependabot[bot] Jan 1, 2026
85c77c7
Bump actions/cache from 4 to 5 (#431)
dependabot[bot] Jan 1, 2026
146460a
ENH: Reduce file size (#433)
benoit9126 Jan 6, 2026
afb9841
Add LV cables to the catalogue (#434)
alihamdan Jan 7, 2026
d31b1dc
Optional Kron reduction when converting to symmetrical components (#436)
alihamdan Jan 12, 2026
4d06c26
Simplify rlfs line parameters (#437)
alihamdan Jan 12, 2026
8382f43
ENH: Update dependencies
benoit9126 Jan 21, 2026
0696882
Bump version
benoit9126 Jan 21, 2026
b628220
Fix tests with pandas 3.0
alihamdan Jan 21, 2026
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
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
*.ico filter=lfs diff=lfs merge=lfs -text
*.pfd filter=lfs diff=lfs merge=lfs -text
.vscode/*.json linguist-language=jsonc
*.webp filter=lfs diff=lfs merge=lfs -text
2 changes: 2 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ updates:
target-branch: "develop"
schedule:
interval: "monthly"
cooldown:
default-days: 7
17 changes: 7 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,15 @@ jobs:
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
python-version: ["3.11", "3.12", "3.13"] #, "3.13t", "3.14-dev"] # waiting for pyproj support
python-version: ["3.12", "3.13", "3.13t", "3.14", "3.14t"]

permissions:
contents: read

steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
with:
lfs: false
persist-credentials: false
Expand All @@ -42,7 +43,7 @@ jobs:
run: git lfs ls-files -l | cut -d' ' -f1 | sort > .lfs-assets-id

- name: Cache git LFS
uses: actions/cache@v4
uses: actions/cache@v5
with:
path: .git/lfs
key: git-lfs-v1-${{ matrix.python-version }}-${{ hashFiles('.lfs-assets-id') }}
Expand All @@ -58,13 +59,9 @@ jobs:
git lfs prune --verify-remote

- name: Install uv
uses: astral-sh/setup-uv@v6
uses: astral-sh/setup-uv@v7
with:
enable-cache: true

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
Expand All @@ -73,12 +70,12 @@ jobs:

- name: Test with pytest
run: |
uv run pytest -vv -n=auto --durations=25 --cov --cov-report=html roseau
uv run pytest -vv --durations=25 --cov --cov-report=html roseau
env:
ROSEAU_LOAD_FLOW_LICENSE_KEY: ${{ secrets.ROSEAU_LOAD_FLOW_LICENSE_KEY }}

- name: Archive code coverage results
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v6
if: ${{ always() }}
with:
name: code-coverage-report-${{ runner.os }}-python-${{ matrix.python-version }}
Expand Down
25 changes: 23 additions & 2 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,32 @@ jobs:
permissions:
contents: read
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
with:
lfs: false
persist-credentials: false
- uses: actions/setup-python@v5

- name: Create LFS file list
run: git lfs ls-files -l | cut -d' ' -f1 | sort > .lfs-assets-id

- name: Cache git LFS
uses: actions/cache@v5
with:
path: .git/lfs
key: git-lfs-v1-${{ matrix.python-version }}-${{ hashFiles('.lfs-assets-id') }}
restore-keys: |
git-lfs-v1-${{ matrix.python-version }}
git-lfs-v1
git-lfs

- name: Git LFS
run: |
git lfs checkout
git lfs pull
git lfs prune --verify-remote

- uses: actions/setup-python@v6
with:
python-version: "3.13"

- uses: pre-commit/action@v3.0.1
28 changes: 19 additions & 9 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,40 +11,40 @@ repos:
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/astral-sh/uv-pre-commit
rev: 0.8.14
rev: 0.9.26
hooks:
- id: uv-lock
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.33.3
rev: 0.36.0
hooks:
- id: check-github-workflows
- id: check-dependabot
- id: check-readthedocs
- repo: https://github.com/adhtruong/mirrors-typos
# See https://github.com/crate-ci/typos/issues/390
# repo: https://github.com/crate-ci/typos
rev: v1.36.0
rev: v1.42.1
hooks:
- id: typos
args: [--force-exclude]
- repo: https://github.com/woodruffw/zizmor-pre-commit
rev: v1.12.1
rev: v1.22.0
hooks:
- id: zizmor
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.12.11
rev: v0.14.13
hooks:
- id: ruff-check
args: [--fix]
- id: ruff-format
- repo: https://github.com/adamchainz/blacken-docs
rev: 1.19.1
rev: 1.20.0
hooks:
- id: blacken-docs
files: ^doc/.*\.md$
args: [-l 90]
- repo: https://github.com/executablebooks/mdformat
rev: 0.7.22
rev: 1.0.0
hooks:
- id: mdformat
additional_dependencies:
Expand All @@ -57,7 +57,7 @@ repos:
- mdformat-deflist
exclude: ^.github/.*\.md$
- repo: https://github.com/rbubley/mirrors-prettier
rev: v3.6.2
rev: v3.8.0
hooks:
- id: prettier
args: ["--print-width", "120"]
Expand All @@ -69,8 +69,18 @@ repos:
- id: latexindent
args: [-l, -m, -s, -wd]
- repo: https://github.com/biomejs/pre-commit
rev: v2.2.2
rev: v2.3.11
hooks:
- id: biome-check
types_or: [json, html, css]
files: ".*" # Override default files regex that excludes html, rely on `types_or` instead
- repo: https://github.com/tombi-toml/tombi-pre-commit
rev: v0.7.19
hooks:
- id: tombi-format
- id: tombi-lint
- repo: https://github.com/oxipng/oxipng
rev: v10.0.0
hooks:
- id: oxipng
args: ["-o", "4", "--strip", "safe", "--alpha"]
2 changes: 0 additions & 2 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
{
"recommendations": [
"charliermarsh.ruff",
"esbenp.prettier-vscode",
"ms-python.python",
"ms-python.vscode-pylance",
],
}
18 changes: 12 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ In addition to the following **unique** set of features:

<!-- end rlf-pitch -->

This project is compatible with Python version 3.11 and newer. The
This project is compatible with Python version 3.12 and newer. The
[installation instructions](https://roseau-load-flow.roseautechnologies.com/en/latest/Installation.html) will guide you
through the installation process. If you are new to _Roseau Load Flow_, we recommend you start with the
[getting started tutorial](https://roseau-load-flow.roseautechnologies.com/en/latest/usage/Getting_Started.html). You
Expand All @@ -51,15 +51,21 @@ Read more at [License](https://roseau-load-flow.roseautechnologies.com/en/latest
_Roseau Load Flow_ ships with a sample of 20 low-voltage and 20 medium-voltage feeder networks. Each network is provided
with its summer and winter load points.

To go further, you can also use
[these 150 distribution networks](https://www.data.gouv.fr/fr/datasets/departs-hta-representatifs-pour-lanalyse-des-reseaux-de-distribution-francais/),
published by [Mines Paris Tech](https://www.minesparis.psl.eu/) in _Roseau Load Flow_ format. Supplied with their
respective coefficients, these representative networks can be used to simulate the entire French distribution network.
<!-- start representative-networks -->

We also maintain a set of 150 MV feeders representative of the French distribution system at
https://github.com/RoseauTechnologies/Representative_French_Power_Grids. Each feeder is modeled with its downstream LV
networks. The repository also contains the cluster size that indicates how representative is each network of the French
distribution system. These networks are the result of the study
[Representative MV feeders for the analysis of French distribution networks](https://www.roseautechnologies.com/en/electrical-model-of-the-french-distribution-network/),
made and published by [Mines Paris Tech](https://www.minesparis.psl.eu/).

<!-- end representative-networks -->

<!-- end rlf-networks -->

<div align="center">
<img alt="Catalogue of networks" src="https://github.com/RoseauTechnologies/Roseau_Load_Flow/blob/main/doc/_static/Network/Catalogue.png?raw=True" />
<img alt="Catalogue of networks" src="https://github.com/RoseauTechnologies/Roseau_Load_Flow/blob/main/doc/_static/Network/Catalogue.webp?raw=True" />
</div>

## Bug reports / Feature requests
Expand Down
7 changes: 5 additions & 2 deletions biome.jsonc
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"$schema": "https://biomejs.dev/schemas/2.2.2/schema.json",
"$schema": "https://biomejs.dev/schemas/2.3.11/schema.json",
"vcs": {
"enabled": false,
"clientKind": "git",
"useIgnoreFile": false
},
"files": {
"ignoreUnknown": false,
"maxSize": 2097152 // 2 MiB to accommodate the networks Catalogue.html file (1.6 MiB)
"includes": ["**", "!doc/_static/**/*.html"]
},
"formatter": {
"enabled": true,
Expand Down Expand Up @@ -38,6 +38,9 @@
"html": {
"formatter": {
"enabled": true // Enable experimental HTML formatting
},
"linter": {
"enabled": false // Disable linting generated HTML files
}
}
}
60 changes: 60 additions & 0 deletions doc/Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,66 @@ og:description: See what's new in the latest release of Roseau Load Flow !

# Changelog

## Version 0.14.0

- {gh-pr}`435` {gh-issue}`436` Add `rlf.converters.kron_reduction` function to perform Kron reduction on any nxn matrix
reducing it to an (n-1)x(n-1) matrix by eliminating the last row and column. Also add `eliminate_neutral` parameter to
`rlf.LineParameters.to_sym` to optionally eliminate the neutral conductor using Kron's reduction when converting line
parameters to symmetrical components.

- {gh-pr}`434` {gh-issue}`422` Add LV line parameters to the catalogue (e.g. `U_AL_3x150+70`). You can get all added LV
lines with `rlf.LineParameters.get_catalogue(r"^[UOT]_[A-Z]+_3x(\d+)\+(\d+(?:\.\d+)?)$")`.

- {gh-pr}`429` {gh-issue}`298` Add `rlf.plotting.voltage_profile` function to plot the voltage profile of a network. The
function returns an object with `plot_matplotlib()` and `plot_plotly()` methods to create plots using Matplotlib or
Plotly respectively.

- {gh-pr}`427` Add missing transformer tap to the edge data in the graph generated by `ElectricalNetwork.to_graph`.

- {gh-pr}`426` Add `rlf.plotting.plot_results_interactive_map` for plotting a network with load flow results on an
interactive map. Buses are colored according to their voltage levels and lines are colored according to their loading
levels.

- {gh-pr}`425` Enforce the following deprecations:

- The `side` parameter of `rlf.GroundConnection`, `rlf.plotting.plot_voltage_phasors` and
`rlf.plotting.plot_symmetrical_voltages` is removed. Pass a branch side directly instead (e.g.
`rlf.GroundConnection(ground=ground, element=transformer.side_hv)`).
- The `potentials` attribute and constructor parameter of `Bus` is removed. Use `initial_potentials` instead.
- The `bus` of a disconnected load or source no longer returns `None`. Use the new `is_disconnected` property to check
if the load or source is disconnected.
- The `phase` parameter of `rlf.PotentialRef` is removed. Use `phases` instead.
- The `res_voltages_hv` and `res_voltages_lv` attributes of `rlf.Transformer` are removed. Use `<side>.res_voltages`
instead.
- Deprecated names in `rlf.constants`, `rlf.types` and `rlf.sym` modules are removed.
- Deprecated modules in the `rlf.utils` package are removed. This package is for internal use only and should not be
considered stable.

- {gh-pr}`421` Improve initial voltage guesses in the Newton algorithm for networks involving delta connected sources.

- {gh-pr}`419` {gh-pr}`420` Require Python 3.12 or newer and bump the minimum supported versions of some dependencies
per [SPEC-0](https://scientific-python.org/specs/spec-0000/).

- {gh-pr}`418` Many improvements to the styles of interactive map plots:

- Different voltage levels are represented with different marker sizes and line widths. Nominal voltages are used to
determine the voltage levels automatically. If nominal voltages are not available, they are inferred from the
transformers and sources
- Underground lines are dashed while other lines are solid including lines with unknown line type
- Transformers are now represented with a square icon with a divider in the middle and with both HV and LV buses
information in the tooltip and popup
- Sourcers are represented with a bigger square icon
- If the new parameter `fit_bounds` is set to `True` (default), the bounds of the map will be automatically adjusted
using `folium.FitOverlays` to fit the network elements.

Note that the markers of buses, transformers and sources now use the `folium.DivIcon` icon which means the style
function must now return a style dictionary of the form `{'html': ...}` for these elements.

- {gh-pr}`413` Restore bus and layers to the layer control in the interactive map plot. This was broken in version
0.13.0.

- {gh-pr}`404` Fix filtering catalogues using compiled regular expressions with newer versions of pandas.

## Version 0.13.1

- Fix a bug where license validation failed when the English (US) language was not installed on the system (observed on
Expand Down
4 changes: 2 additions & 2 deletions doc/License.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ section. Create a new variable called `ROSEAU_LOAD_FLOW_LICENSE_KEY`, with the v
variable is personal to you, and the toggle will allow you to enable access to the license key for notebooks of your
choice.

```{image} /_static/2024_09_16_Google_Colab_Environment_Variable.png
```{image} /_static/2024_09_16_Google_Colab_Environment_Variable.webp
---
alt: Google Colab environment variable
align: center
Expand Down Expand Up @@ -148,7 +148,7 @@ this file when you run your code (including when using Jupyter Notebooks in VS C
If you are using [PyCharm](https://www.jetbrains.com/pycharm/), you can add the environment variable to your _Python
Console_ settings as indicated in the screenshot below:

```{image} /_static/2024_01_12_Pycharm_Console_Environment_Variable.png
```{image} /_static/2024_01_12_Pycharm_Console_Environment_Variable.webp
---
alt: Pycharm Console environment variable
align: center
Expand Down

This file was deleted.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 0 additions & 3 deletions doc/_static/2024_09_16_Google_Colab_Environment_Variable.png

This file was deleted.

3 changes: 3 additions & 0 deletions doc/_static/2024_09_16_Google_Colab_Environment_Variable.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 0 additions & 3 deletions doc/_static/Advanced/Floating_Neutral_Auto.png

This file was deleted.

3 changes: 3 additions & 0 deletions doc/_static/Advanced/Floating_Neutral_Auto.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 0 additions & 3 deletions doc/_static/Advanced/Floating_Neutral_Manual.png

This file was deleted.

3 changes: 3 additions & 0 deletions doc/_static/Advanced/Floating_Neutral_Manual.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 0 additions & 3 deletions doc/_static/Advanced/Floating_Neutral_Transformer.png

This file was deleted.

3 changes: 3 additions & 0 deletions doc/_static/Advanced/Floating_Neutral_Transformer.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading