Skip to content

Commit 23b82a9

Browse files
authored
Merge branch 'feautre/restrict-numpy-2.0' into feature/vision-excel-config-update
2 parents 96ade36 + b5160b4 commit 23b82a9

File tree

9 files changed

+95
-51
lines changed

9 files changed

+95
-51
lines changed

.github/workflows/build-test-and-sonar.yml

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,10 @@ jobs:
7777
with:
7878
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
7979

80-
- name: Setup Python 3.10
80+
- name: Setup Python 3.11
8181
uses: actions/setup-python@v5
8282
with:
83-
python-version: "3.10"
83+
python-version: "3.11"
8484

8585
- name: Install in develop mode
8686
run: |
@@ -96,7 +96,7 @@ jobs:
9696
9797
- name: SonarCloud Scan
9898
if: ${{ (github.event_name == 'push') || (github.event.pull_request.head.repo.owner.login == 'PowerGridModel') }}
99-
uses: SonarSource/sonarcloud-github-action@master
99+
uses: SonarSource/sonarqube-scan-action@master
100100
env:
101101
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
102102
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
@@ -106,10 +106,7 @@ jobs:
106106
strategy:
107107
matrix:
108108
os: [ubuntu-latest, macos-latest, windows-latest]
109-
python: ["3.10", "3.11", "3.12"]
110-
exclude:
111-
- os: macos-latest
112-
python: "3.10"
109+
python: ["3.11", "3.12"]
113110
fail-fast: false
114111
runs-on: ${{ matrix.os }}
115112

@@ -140,10 +137,7 @@ jobs:
140137
strategy:
141138
matrix:
142139
os: [ubuntu-latest, macos-latest, windows-latest]
143-
python: ["3.10", "3.11", "3.12"]
144-
exclude:
145-
- os: macos-latest
146-
python: "3.10"
140+
python: ["3.11", "3.12"]
147141
fail-fast: false
148142
runs-on: ${{ matrix.os }}
149143

@@ -182,10 +176,10 @@ jobs:
182176
TWINE_PASSWORD: ${{ secrets.PYPI_PASS }}
183177
runs-on: ubuntu-latest
184178
steps:
185-
- name: Setup Python 3.10
179+
- name: Setup Python 3.11
186180
uses: actions/setup-python@v5
187181
with:
188-
python-version: "3.10"
182+
python-version: "3.11"
189183

190184
- name: Load built wheel file
191185
uses: actions/download-artifact@v4

.github/workflows/citations.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,8 @@ jobs:
3131
steps:
3232
- name: checkout
3333
uses: actions/checkout@v4
34+
- name: Install R
35+
run: |
36+
sudo apt-get update && sudo apt-get install -y r-base
3437
- name: Validate CITATION.cff
35-
uses: dieghernan/cff-validator@v3
38+
uses: dieghernan/cff-validator@v4

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ repos:
1212
hooks:
1313
- id: isort
1414
- repo: https://github.com/psf/black
15-
rev: 24.8.0
15+
rev: 25.1.0
1616
hooks:
1717
- id: black-jupyter
1818
- repo: https://github.com/pre-commit/mirrors-mypy

.readthedocs.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ sphinx:
99
configuration: docs/conf.py
1010

1111
build:
12-
os: "ubuntu-20.04"
12+
os: "ubuntu-24.04"
1313
tools:
14-
python: "3.10"
14+
python: "3.12"
1515
jobs:
1616
post_install:
1717
# Build package with doc requirements from pyproject.optional-dependencies

CITATION.cff

Lines changed: 59 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ authors:
1414
given-names: "Yu"
1515
1616
affiliation: "Alliander"
17+
orcid: "https://orcid.org/0000-0001-5889-0067"
1718
- family-names: "Salemink"
1819
given-names: "Peter"
1920
@@ -22,10 +23,12 @@ authors:
2223
given-names: "Nitish"
2324
2425
affiliation: "Alliander"
26+
orcid: "https://orcid.org/0009-0007-9694-6077"
2527
- family-names: "Govers"
26-
given-names: "Martinus"
28+
given-names: "Martinus G.H."
2729
2830
affiliation: "Alliander"
31+
orcid: "https://orcid.org/0009-0008-6890-8353"
2932
- family-names: "Bogaard"
3033
name-particle: "van den"
3134
given-names: "Jonas"
@@ -37,9 +40,15 @@ authors:
3740
given-names: "Zhen"
3841
3942
affiliation: "Alliander"
43+
orcid: "https://orcid.org/0000-0003-4317-6455"
4044
- family-names: "Guo"
41-
given-names: "Jerry"
42-
45+
given-names: "Jerry Jinfeng"
46+
47+
affiliation: "Alliander"
48+
orcid: "https://orcid.org/0000-0002-8065-4084"
49+
- family-names: "Figueroa Manrique"
50+
given-names: "Santiago"
51+
4352
affiliation: "Alliander"
4453
- family-names: "Jagutis"
4554
given-names: "Laurynas"
@@ -49,14 +58,10 @@ authors:
4958
given-names: "Chenguang"
5059
5160
affiliation: "Alliander"
52-
- family-names: "Figueroa Manrique"
53-
given-names: "Santiago"
54-
55-
affiliation: "Alliander"
5661
- name: "Contributors to the LF Energy project Power Grid Model"
5762
contact:
5863
- name: "LF Energy project Power Grid Model"
59-
email: "powergridmodel+help@lists.lfenergy.org"
64+
6065

6166
references:
6267
- title: "PowerGridModel/power-grid-model"
@@ -69,18 +74,27 @@ references:
6974
given-names: "Yu"
7075
7176
affiliation: "Alliander"
77+
orcid: "https://orcid.org/0000-0001-5889-0067"
7278
- family-names: "Salemink"
7379
given-names: "Peter"
7480
7581
affiliation: "Alliander"
82+
- family-names: "Westering"
83+
name-particle: "van"
84+
given-names: "Werner"
85+
86+
affiliation: "Alliander"
87+
orcid: "https://orcid.org/0000-0002-4058-2581"
7688
- family-names: "Bharambe"
7789
given-names: "Nitish"
7890
7991
affiliation: "Alliander"
92+
orcid: "https://orcid.org/0009-0007-9694-6077"
8093
- family-names: "Govers"
81-
given-names: "Martinus"
94+
given-names: "Martinus G.H."
8295
8396
affiliation: "Alliander"
97+
orcid: "https://orcid.org/0009-0008-6890-8353"
8498
- family-names: "Bogaard"
8599
name-particle: "van den"
86100
given-names: "Jonas"
@@ -92,9 +106,15 @@ references:
92106
given-names: "Zhen"
93107
94108
affiliation: "Alliander"
109+
orcid: "https://orcid.org/0000-0003-4317-6455"
95110
- family-names: "Guo"
96-
given-names: "Jerry"
97-
111+
given-names: "Jerry Jinfeng"
112+
113+
affiliation: "Alliander"
114+
orcid: "https://orcid.org/0000-0002-8065-4084"
115+
- family-names: "Figueroa Manrique"
116+
given-names: "Santiago"
117+
98118
affiliation: "Alliander"
99119
- family-names: "Jagutis"
100120
given-names: "Laurynas"
@@ -109,10 +129,6 @@ references:
109129
given-names: "Marc"
110130
111131
affiliation: "Alliander"
112-
- family-names: "Figueroa Manrique"
113-
given-names: "Santiago"
114-
115-
affiliation: "Alliander"
116132
- name: "Contributors to the LF Energy project Power Grid Model"
117133

118134
- title: "Power grid model: A high-performance distribution grid calculation library"
@@ -121,6 +137,7 @@ references:
121137
given-names: "Yu"
122138
123139
affiliation: "Alliander"
140+
orcid: "https://orcid.org/0000-0001-5889-0067"
124141
- family-names: "Salemink"
125142
given-names: "Peter"
126143
@@ -131,12 +148,39 @@ references:
131148
given-names: "Nitish"
132149
133150
affiliation: "Alliander"
151+
orcid: "https://orcid.org/0009-0007-9694-6077"
134152
- family-names: "Westering"
135153
name-particle: "van"
136154
given-names: "Werner"
155+
156+
affiliation: "Alliander"
157+
orcid: "https://orcid.org/0000-0002-4058-2581"
137158
conference:
138159
name: "CIRED 2023 - The 27th International Conference and Exhibition on Electricity Distribution"
139160
type: conference-paper
140161
year: 2023
141162
volume: 2023
142163
pages: "1-5"
164+
165+
- title: "PowerGridModel/power-grid-model-ds"
166+
repository-code: "https://github.com/PowerGridModel/power-grid-model-ds"
167+
doi: "10.5281/zenodo.14825565"
168+
license: "MPL-2.0"
169+
type: software-code
170+
authors:
171+
- family-names: "Schouten"
172+
given-names: "Jaap"
173+
174+
affiliation: "Alliander"
175+
- family-names: "Baaijen"
176+
given-names: "Thijs"
177+
178+
affiliation: "Alliander"
179+
- family-names: "Koppen"
180+
given-names: "Vincent"
181+
182+
- family-names: "Voort"
183+
name-particle: "van der"
184+
given-names: "Sven"
185+
186+
- name: "Contributors to the LF Energy project Power Grid Model"

README.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -74,27 +74,29 @@ If you are using Power Grid Model IO in your research work, please consider citi
7474

7575
```bibtex
7676
@software{Xiang_PowerGridModel_power-grid-model-io,
77-
author = {Xiang, Yu and Salemink, Peter and Bharambe, Nitish and Govers, Martinus and van den Bogaard, Jonas and Stoeller, Bram and Wang, Zhen and Guo, Jerry and Jagutis, Laurynas and Wang, Chenguang and {Contributors to the LF Energy project Power Grid Model}},
77+
author = {Xiang, Yu and Salemink, Peter and Bharambe, Nitish and Govers, Martinus G.H. and van den Bogaard, Jonas and Stoeller, Bram and Wang, Zhen and Guo, Jerry Jinfeng and Figueroa Manrique, Santiago and Jagutis, Laurynas and Wang, Chenguang and {Contributors to the LF Energy project Power Grid Model}},
7878
doi = {10.5281/zenodo.8059257},
7979
license = {MPL-2.0},
8080
title = {{PowerGridModel/power-grid-model-io}},
8181
url = {https://github.com/PowerGridModel/power-grid-model-io}
8282
}
8383
@software{Xiang_PowerGridModel_power-grid-model,
84-
author = {Xiang, Yu and Salemink, Peter and Bharambe, Nitish and Govers, Martinus and van den Bogaard, Jonas and Stoeller, Bram and Wang, Zhen and Guo, Jerry and Jagutis, Laurynas and Wang, Chenguang and van Raalte, Marc and {Contributors to the LF Energy project Power Grid Model}},
84+
author = {Xiang, Yu and Salemink, Peter and van Westering, Werner and Bharambe, Nitish and Govers, Martinus G.H. and van den Bogaard, Jonas and Stoeller, Bram and Wang, Zhen and Guo, Jerry Jinfeng and Figueroa Manrique, Santiago and Jagutis, Laurynas and Wang, Chenguang and van Raalte, Marc and {Contributors to the LF Energy project Power Grid Model}},
8585
doi = {10.5281/zenodo.8054429},
8686
license = {MPL-2.0},
8787
title = {{PowerGridModel/power-grid-model}},
8888
url = {https://github.com/PowerGridModel/power-grid-model}
8989
}
9090
@inproceedings{Xiang2023,
9191
author = {Xiang, Yu and Salemink, Peter and Stoeller, Bram and Bharambe, Nitish and van Westering, Werner},
92-
booktitle = {CIRED 2023 - The 27th International Conference and Exhibition on Electricity Distribution},
93-
title = {Power grid model: A high-performance distribution grid calculation library},
94-
year = {2023},
92+
booktitle={27th International Conference on Electricity Distribution (CIRED 2023)},
93+
title={Power grid model: a high-performance distribution grid calculation library},
94+
year={2023},
9595
volume={2023},
96-
number = {},
97-
pages={1-5}
96+
number={},
97+
pages={1089-1093},
98+
keywords={},
99+
doi={10.1049/icp.2023.0633}
98100
}
99101
```
100102

pyproject.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ classifiers=[
2626
"Operating System :: MacOS",
2727
"Topic :: Scientific/Engineering :: Physics",
2828
]
29-
requires-python = ">=3.10"
29+
requires-python = ">=3.11"
3030
dependencies = [
31-
"numpy>=1.20",
31+
"numpy>=1.20, <2.0",
3232
"openpyxl",
3333
"pandas",
3434
"power_grid_model>=1.8",
@@ -40,7 +40,7 @@ dynamic = ["version"]
4040

4141
[project.optional-dependencies]
4242
dev = [
43-
"pandapower>2.11.1",
43+
"pandapower>2.11.1, <3.0",
4444
"pre-commit",
4545
"pylint",
4646
"pytest",
@@ -50,7 +50,7 @@ dev = [
5050
]
5151
examples = [
5252
"power-grid-model>1.9.80",
53-
"pandapower>2.11.1",
53+
"pandapower>2.11.1, <3.0",
5454
"pyarrow", # Pyarrow support for Python 3.12 scheduled for 14.0.0: https://github.com/apache/arrow/issues/37880
5555
]
5656
doc = [
@@ -85,7 +85,7 @@ addopts = ["--cov=power_grid_model_io", "--cov-report=term", "--cov-report=html:
8585

8686
[tool.black]
8787
line-length = 120
88-
target-version = ["py310", "py311"]
88+
target-version = ["py311", "py312", "py313"]
8989

9090
[tool.isort]
9191
profile = "black"

src/power_grid_model_io/functions/filters.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ def exclude_value(row: pd.Series, col: str, value: Union[float, str]) -> bool:
3131
if col not in row:
3232
raise ValueError(f"The column: '{col}' cannot be found for the filter")
3333
result = row[col] != value
34-
if isinstance(result, pd.Series):
34+
# Sonar cloud false positive (S2583): result can be a pd.Series of bool
35+
if isinstance(result, pd.Series): # NOSONAR
3536
return result.item()
3637
return result
3738

src/power_grid_model_io/utils/uuid_excel_cvtr.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
# SPDX-License-Identifier: MPL-2.0
44

55
"""
6-
This is a stand-alone conversion script that converts the GUID based Vision
7-
excel files to a number based format. The script is designed to be used as
8-
a light weight tool to run before running the PGM-IO conversion scripts.
9-
Example usage:
6+
This is a stand-alone conversion script that converts the GUID based Vision
7+
excel files to a number based format. The script is designed to be used as
8+
a light weight tool to run before running the PGM-IO conversion scripts.
9+
Example usage:
1010
11-
new_file = convert_guid_vision_excel("vision_97_en.xlsx", number="Number", {"N1": "Grounding1"})
12-
nieuw_bestand = convert_guid_vision_excel("vision_97_nl.xlsx", number="Nummer", {"N1": "Arding1"})
11+
new_file = convert_guid_vision_excel("vision_97_en.xlsx", number="Number", {"N1": "Grounding1"})
12+
nieuw_bestand = convert_guid_vision_excel("vision_97_nl.xlsx", number="Nummer", {"N1": "Arding1"})
1313
1414
"""
1515

0 commit comments

Comments
 (0)