Skip to content

Commit 231226f

Browse files
authored
removed duplicate job definition for network_schema (#3015)
* removed duplicate job definition for network_schema * fixed import * fixed typing using non lazy class * fixed mypy issue * updated astral-sh/setup-uv action (Node 20 deprecation)
1 parent beae1a2 commit 231226f

3 files changed

Lines changed: 15 additions & 48 deletions

File tree

.github/workflows/github_test_action.yml

Lines changed: 12 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
steps:
3737
- uses: actions/checkout@v6
3838
- name: Install uv
39-
uses: astral-sh/setup-uv@38f3f104447c67c051c4a08e39b64a148898af3a #v4.2.0
39+
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
4040
with:
4141
python-version: ${{ matrix.python-version }}
4242
- name: Install dependencies
@@ -71,7 +71,7 @@ jobs:
7171
network_schema:
7272
# This tests only the network_schema tests due to the large amount these are only tested on min/max python version
7373
runs-on: ubuntu-latest
74-
timeout-minutes: 20
74+
timeout-minutes: 30
7575
strategy:
7676
matrix:
7777
#python-version: ['3.10', '3.14']
@@ -82,20 +82,20 @@ jobs:
8282
# - uses: julia-actions/setup-julia # Update version when using this by adding commit sha!
8383
- uses: actions/checkout@v6
8484
- name: Install uv
85-
uses: astral-sh/setup-uv@38f3f104447c67c051c4a08e39b64a148898af3a #v4.2.0
85+
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
8686
with:
8787
#python-version: ${{ matrix.python-version }}
8888
python-version: '3.14'
8989
- name: Install dependencies
9090
run: |
91-
uv sync --extra dev
92-
uv pip install pytest-split
91+
uv sync --extra dev
92+
uv pip uninstall juliacall
93+
uv pip install pytest-cov pytest-split
9394
- name: List of installed packages
9495
run: |
9596
uv pip list
9697
- name: Test with pytest, Codecov and Coverage
9798
run: |
98-
uv pip install pytest-cov numpy~=1.26
9999
uv run pytest --cov=./ --cov-report=xml --splits 4 --group ${{ matrix.group }} pandapower/test/network_schema
100100
cp ./coverage.xml ./coverage-net-schema-${{ matrix.group }}.xml
101101
- name: Upload coverage as artifact
@@ -113,7 +113,7 @@ jobs:
113113
steps:
114114
- uses: actions/checkout@v6
115115
- name: Install uv
116-
uses: astral-sh/setup-uv@38f3f104447c67c051c4a08e39b64a148898af3a #v4.2.0
116+
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
117117
with:
118118
python-version: "3.14"
119119
- name: Install dependencies
@@ -168,38 +168,6 @@ jobs:
168168
name: coverage-opf
169169
path: ./coverage-opf.xml
170170

171-
network_schema:
172-
runs-on: ubuntu-latest
173-
timeout-minutes: 30
174-
strategy:
175-
matrix:
176-
group: [1, 2, 3, 4]
177-
steps:
178-
- uses: actions/checkout@v6
179-
- name: Install uv
180-
uses: astral-sh/setup-uv@38f3f104447c67c051c4a08e39b64a148898af3a #v4.2.0
181-
with:
182-
python-version: '3.14'
183-
# Reminder: when removing the support of an old python version here, then don't forget to
184-
# remove it also in pyproject.toml 'requires-python' and the release pipelines
185-
- name: Install dependencies
186-
run: |
187-
uv sync --extra dev
188-
uv pip uninstall juliacall
189-
uv pip install pytest-cov pytest-split
190-
- name: List of installed packages
191-
run: |
192-
uv pip list
193-
- name: Test with pytest, Codecov and Coverage
194-
run: |
195-
uv run pytest --cov=./ --cov-report=xml --splits 4 --group ${{ matrix.group }} pandapower/test/network_schema
196-
cp ./coverage.xml ./coverage-${{ matrix.group }}-network_schema.xml
197-
- name: Upload coverage as artifact
198-
uses: actions/upload-artifact@v7
199-
with:
200-
name: coverage-${{ matrix.group }}-network_schema
201-
path: ./coverage-${{ matrix.group }}-network_schema.xml
202-
203171
upload-coverage:
204172
runs-on: ubuntu-latest
205173
needs: [build, opf, network_schema]
@@ -249,7 +217,7 @@ jobs:
249217
steps:
250218
- uses: actions/checkout@v6
251219
- name: Install uv
252-
uses: astral-sh/setup-uv@38f3f104447c67c051c4a08e39b64a148898af3a #v4.2.0
220+
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
253221
with:
254222
python-version: ${{ matrix.python-version }}
255223
- name: Install dependencies
@@ -273,7 +241,7 @@ jobs:
273241
steps:
274242
- uses: actions/checkout@v6
275243
- name: Install uv
276-
uses: astral-sh/setup-uv@38f3f104447c67c051c4a08e39b64a148898af3a #v4.2.0
244+
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
277245
with:
278246
python-version: ${{ matrix.python-version }}
279247
- name: Install dependencies
@@ -310,7 +278,7 @@ jobs:
310278
steps:
311279
- uses: actions/checkout@v6
312280
- name: Install uv
313-
uses: astral-sh/setup-uv@38f3f104447c67c051c4a08e39b64a148898af3a #v4.2.0
281+
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
314282
with:
315283
python-version: ${{ matrix.python-version }}
316284
- name: Install dependencies
@@ -373,7 +341,7 @@ jobs:
373341
fi
374342
- uses: actions/checkout@v6
375343
- name: Install uv
376-
uses: astral-sh/setup-uv@38f3f104447c67c051c4a08e39b64a148898af3a #v4.2.0
344+
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
377345
with:
378346
python-version: ${{ matrix.python-version }}
379347
- name: Install dependencies
@@ -460,7 +428,7 @@ jobs:
460428
steps:
461429
- uses: actions/checkout@v6
462430
- name: Install uv
463-
uses: astral-sh/setup-uv@38f3f104447c67c051c4a08e39b64a148898af3a #v4.2.0
431+
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
464432
with:
465433
python-version: ${{ matrix.python-version }}
466434
- name: Install dependencies

.github/workflows/test_release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
- uses: actions/checkout@v6
3030

3131
- name: Install uv
32-
uses: astral-sh/setup-uv@38f3f104447c67c051c4a08e39b64a148898af3a #v4.2.0
32+
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
3333
with:
3434
python-version: ${{ matrix.python-version }}
3535

pandapower/results.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,13 @@
44
import numpy as np
55
import pandas as pd
66

7-
from network_structure import get_results_structure_dict
87
from pandapower.auxiliary import get_vsc_stacked_names, pandapowerNet
98
from pandapower.results_branch import _get_branch_results, _get_branch_results_3ph
109
from pandapower.results_bus import _get_bus_results, _get_bus_dc_results, _set_buses_out_of_service, \
1110
_get_shunt_results, _get_p_q_results, _get_bus_v_results, _get_bus_v_results_3ph, _get_p_q_results_3ph, \
1211
_get_bus_results_3ph, _get_bus_dc_v_results, _get_p_dc_results, _set_dc_buses_out_of_service
1312
from pandapower.results_gen import _get_gen_results, _get_gen_results_3ph, _get_dc_slack_results
14-
from pandapower.network_structure import get_structure_dict
13+
from pandapower.network_structure import get_results_structure_dict
1514

1615
BRANCH_RESULTS_KEYS = ("branch_ikss_f", "branch_ikss_t",
1716
"branch_ikss_angle_f", "branch_ikss_angle_t",
@@ -41,7 +40,7 @@ class EmptyResults(metaclass=_EmptyResultsMeta):
4140
4241
Will be created on first call, all subsequent calls will be faster
4342
"""
44-
_instance: EmptyResults = None
43+
_instance: "EmptyResults | None" = None
4544
_data: dict[str, pd.DataFrame] = {}
4645

4746
def __new__(cls):

0 commit comments

Comments
 (0)