Skip to content

Commit 5504e80

Browse files
committed
synch with version 0.12.0
Signed-off-by: DONNOT Benjamin <benjamin.donnot@rte-france.com>
2 parents c35c5d4 + 2b8564e commit 5504e80

File tree

157 files changed

+12774
-7553
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

157 files changed

+12774
-7553
lines changed

.circleci/config.yml

Lines changed: 257 additions & 320 deletions
Large diffs are not rendered by default.

.github/workflows/main.yml

Lines changed: 70 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,17 @@ jobs:
1111
manylinux_build:
1212
# build wheels for some linux
1313
name: Build linux ${{ matrix.python.name }} wheel on ${{ matrix.cont.name}}
14-
runs-on: ubuntu-latest
14+
runs-on: ${{matrix.cont.runner}}
1515
env:
1616
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
1717
strategy:
1818
matrix:
1919
python:
20-
- {
21-
name: cp37,
22-
abi: cp37m,
23-
version: '3.7',
24-
}
20+
# - {
21+
# name: cp37,
22+
# abi: cp37m,
23+
# version: '3.7',
24+
# }
2525
- {
2626
name: cp38,
2727
abi: cp38,
@@ -52,17 +52,24 @@ jobs:
5252
abi: cp313,
5353
version: '3.13',
5454
}
55+
- {
56+
name: cp314,
57+
abi: cp314,
58+
version: '3.14',
59+
}
5560

5661
cont:
5762
- {
5863
name: manylinux_2_28_x86_64,
5964
val: quay.io/pypa/manylinux_2_28_x86_64,
60-
arch: amd64
65+
arch: amd64,
66+
runner: ubuntu-latest
6167
}
6268
# - {
63-
# name: manylinux2014_aarch64,
64-
# val: quay.io/pypa/manylinux2014_aarch64,
65-
# arch: arm64
69+
# name: manylinux_2_28_aarch64,
70+
# val: quay.io/pypa/manylinux_2_28_aarch64,
71+
# arch: arm64,
72+
# runner: ubuntu-24.04-arm
6673
# }
6774

6875
container:
@@ -72,7 +79,7 @@ jobs:
7279

7380
steps:
7481
# - name: Set up QEMU
75-
# if: matrix.cont.name == 'manylinux2014_aarch64'
82+
# if: matrix.cont.name == 'manylinux_2_28_aarch64'
7683
# uses: docker/setup-qemu-action@v2
7784
# with:
7885
# platforms: arm64
@@ -148,7 +155,7 @@ jobs:
148155
- name: Install grid2op
149156
if: matrix.python.name != 'cp313' # pandapower does not support 3.13, so grid2op does not so I cannot test that for 3.13
150157
run: |
151-
python3 -m pip install grid2op pandapower
158+
python3 -m pip install grid2op pandapower lxml # lxml missing import see https://github.com/e2nIEE/pandapower/issues/2752
152159
python3 -m pip freeze
153160
154161
- name: Check extra can be imported can be imported (with grid2op)
@@ -184,14 +191,14 @@ jobs:
184191
windows_build:
185192
# build wheels for windows
186193
name: Build windows ${{ matrix.python.name }} wheel for ${{ matrix.win_arch.msvc}}
187-
runs-on: windows-2019
194+
runs-on: windows-2022
188195
strategy:
189196
matrix:
190197
python:
191-
- {
192-
name: cp37,
193-
version: '3.7',
194-
}
198+
# - {
199+
# name: cp37,
200+
# version: '3.7',
201+
# }
195202
- {
196203
name: cp38,
197204
version: '3.8',
@@ -216,6 +223,10 @@ jobs:
216223
name: cp313,
217224
version: '3.13',
218225
}
226+
- {
227+
name: cp314,
228+
version: '3.14',
229+
}
219230
win_arch:
220231
- {
221232
name: "AMD64",
@@ -226,7 +237,7 @@ jobs:
226237
# msvc: x86
227238
# }
228239
env:
229-
RUNNER_OS: windows-2019
240+
RUNNER_OS: windows-2022
230241
PYTHON_VERSION: ${{ matrix.python.version }}
231242

232243
steps:
@@ -287,7 +298,7 @@ jobs:
287298
python3 -c "from lightsim2grid.gridmodel import GridModel"
288299
289300
- name: Check package can be imported (bare install, numpy < 2)
290-
if: matrix.python.name != 'cp37' && matrix.python.name != 'cp38' && matrix.python.name != 'cp313'
301+
if: matrix.python.name != 'cp37' && matrix.python.name != 'cp38' && matrix.python.name != 'cp313' && matrix.python.name != 'cp314'
291302
run: |
292303
python3 -m pip install "numpy<2"
293304
cd tmp_for_import_checking
@@ -298,11 +309,12 @@ jobs:
298309
python3 -c "from lightsim2grid.contingencyAnalysis import ContingencyAnalysisCPP"
299310
python3 -c "from lightsim2grid.securityAnalysis import SecurityAnalysisCPP"
300311
python3 -c "from lightsim2grid.gridmodel import GridModel"
312+
python3 -m pip install --upgrade numpy
301313
302314
- name: Check LightSimBackend can be imported (with grid2op)
303-
if: matrix.python.name != 'cp313' # pandapower does not support 3.13, so grid2op does not so I cannot test that for 3.13
315+
if: matrix.python.name != 'cp314' # pandapower does not support 3.14, so grid2op does not so I cannot test that for 3.14
304316
run: |
305-
python -m pip install grid2op
317+
python -m pip install grid2op lxml # lxml missing import see https://github.com/e2nIEE/pandapower/issues/2752
306318
cd tmp_for_import_checking
307319
python -c "from lightsim2grid import LightSimBackend"
308320
python -c "from lightsim2grid import LightSimBackend; import grid2op; env = grid2op.make('l2rpn_case14_sandbox', test=True, backend=LightSimBackend())"
@@ -313,7 +325,7 @@ jobs:
313325
python -c "from lightsim2grid.gridmodel import init_from_pandapower"
314326
315327
- name: Check LightSimBackend can be used to create env
316-
if: matrix.python.name != 'cp313' # pandapower does not support 3.13, so grid2op does not so I cannot test that for 3.13
328+
if: matrix.python.name != 'cp314' # pandapower does not support 3.14, so grid2op does not so I cannot test that for 3.14
317329
run: |
318330
cd tmp_for_import_checking
319331
python3 -v -c "from lightsim2grid import LightSimBackend; import grid2op; env = grid2op.make('l2rpn_case14_sandbox', test=True, backend=LightSimBackend())"
@@ -335,10 +347,10 @@ jobs:
335347
strategy:
336348
matrix:
337349
python:
338-
- {
339-
name: cp37,
340-
version: '3.7',
341-
}
350+
# - {
351+
# name: cp37,
352+
# version: '3.7',
353+
# }
342354
- {
343355
name: cp38,
344356
version: '3.8',
@@ -363,9 +375,13 @@ jobs:
363375
name: cp313,
364376
version: '3.13',
365377
}
378+
- {
379+
name: cp314,
380+
version: '3.14',
381+
}
366382
runner:
367383
- {
368-
name: macos-13,
384+
name: macos-15-intel,
369385
arch: x86_64
370386
}
371387
- {
@@ -440,10 +456,9 @@ jobs:
440456
python3 -c "from lightsim2grid.securityAnalysis import SecurityAnalysisCPP"
441457
python3 -c "from lightsim2grid.gridmodel import GridModel"
442458
443-
- name: Check package can be imported (bare install, numpy < 2)
444-
if: matrix.python.name != 'cp37' && matrix.python.name != 'cp38' && matrix.python.name != 'cp313'
459+
- name: Check package can be imported (bare install)
460+
if: matrix.python.name != 'cp37' && matrix.python.name != 'cp38'
445461
run: |
446-
python3 -m pip install "numpy<2"
447462
cd tmp_for_import_checking
448463
python3 -c "import lightsim2grid"
449464
python3 -c "from lightsim2grid import *"
@@ -460,13 +475,17 @@ jobs:
460475
# otherwise urllib3 v2.0 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with 'OpenSSL 1.0.2k-fips 26 Jan 2017'
461476

462477
- name: Install grid2op
463-
if: matrix.python.name != 'cp313' # pandapower does not support 3.13, so grid2op does not so I cannot test that for 3.13
478+
if: matrix.python.name != 'cp314' || matrix.runner.arch != 'x86_64'
479+
# grid2op does not work on darwin cp34 wheel on macos on x86_64
480+
# probably because of pandapower
464481
run: |
465-
python -m pip install grid2op
482+
python -m pip install grid2op lxml # lxml missing import see https://github.com/e2nIEE/pandapower/issues/2752
466483
python -m pip freeze
467484
468485
- name: Check extra can be imported can be imported (with grid2op)
469-
if: matrix.python.name != 'cp313' # pandapower does not support 3.13, so grid2op does not so I cannot test that for 3.13
486+
if: matrix.python.name != 'cp314' || matrix.runner.arch != 'x86_64'
487+
# grid2op does not work on darwin cp34 wheel on macos on x86_64
488+
# probably because of pandapower
470489
run: |
471490
cd tmp_for_import_checking
472491
python -v -c "from lightsim2grid import LightSimBackend"
@@ -477,7 +496,9 @@ jobs:
477496
python -c "from lightsim2grid.gridmodel import init_from_pandapower"
478497
479498
- name: Check LightSimBackend can be used to create env
480-
if: matrix.python.name != 'cp313' # pandapower does not support 3.13, so grid2op does not so I cannot test that for 3.13
499+
if: matrix.python.name != 'cp314' || matrix.runner.arch != 'x86_64'
500+
# grid2op does not work on darwin cp34 wheel on macos on x86_64
501+
# probably because of pandapower
481502
run: |
482503
cd tmp_for_import_checking
483504
python -v -c "from lightsim2grid import LightSimBackend; import grid2op; env = grid2op.make('l2rpn_case14_sandbox', test=True, backend=LightSimBackend())"
@@ -502,7 +523,7 @@ jobs:
502523
cibuildwheel: macos
503524
}
504525
- {
505-
name: windows-2019, # host on x86_64
526+
name: windows-2022, # host on x86_64
506527
whl_nm: windows_arm64,
507528
cibuildwheel: windows
508529
}
@@ -536,6 +557,10 @@ jobs:
536557
name: cp313,
537558
version: '3.13',
538559
}
560+
- {
561+
name: cp314,
562+
version: '3.14',
563+
}
539564
exclude:
540565
- python:
541566
name: cp310 # because already done natively above
@@ -553,10 +578,14 @@ jobs:
553578
name: cp313 # because already done natively above
554579
runner:
555580
name: macos-14
581+
- python:
582+
name: cp314 # because already done natively above
583+
runner:
584+
name: macos-14
556585
- python:
557586
name: cp38 # does not work
558587
runner:
559-
name: windows-2019
588+
name: windows-2022
560589
env:
561590
RUNNER_OS: ${{ matrix.runner.name }}
562591
PYTHON_VERSION: ${{ matrix.python.version }}
@@ -569,12 +598,12 @@ jobs:
569598

570599
- name: Set up QEMU
571600
if: runner.os == 'Linux'
572-
uses: docker/setup-qemu-action@v3
601+
uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3.7.0
573602
with:
574603
platforms: all
575604

576605
- name: Compile with cibuildwheel
577-
uses: pypa/cibuildwheel@v2.22.0
606+
uses: pypa/cibuildwheel@63fd63b352a9a8bdcc24791c9dbee952ee9a8abc # v3.3.0
578607
env:
579608
CIBW_PLATFORM: "${{ matrix.runner.cibuildwheel}}"
580609
CIBW_BUILD: "${{ matrix.python.name}}-*"
@@ -583,7 +612,7 @@ jobs:
583612
CIBW_ARCHS_WINDOWS: ARM64
584613
CIBW_ENVIRONMENT: __O3_OPTIM=1
585614
CIBW_BEFORE_ALL: python -m pip install --upgrade setuptools wheel pybind11 pip && python -m pip install "numpy>=2; python_version >= '3.9'" "numpy; python_version < '3.9'"
586-
CIBW_BEFORE_BUILD_MACOS: make clean && make CC=clang CXX=clang++ # no need to cross compile this because host is already arm64 based
615+
CIBW_BEFORE_BUILD_MACOS: make clean && CC=clang CXX=clang++ make # no need to cross compile this because host is already arm64 based
587616
CIBW_BEFORE_BUILD_LINUX: make clean && make # maybe we need to cross compile this (host x64) but maybe not (qemu) ?
588617
CIBW_BEFORE_BUILD_WINDOWS: >
589618
cd build_cmake &&
@@ -593,8 +622,8 @@ jobs:
593622
cmake -DCMAKE_INSTALL_PREFIX=..\built -DCMAKE_BUILD_TYPE=Release -DCMAKE_GENERATOR_PLATFORM=arm64 .. &&
594623
cmake --build . --config Release &&
595624
cmake --install . --prefix ..\built
596-
CIBW_TEST_REQUIRES: grid2op pandapower "numpy<2"
597-
CIBW_TEST_SKIP: "cp312-* *-macosx_arm64 *-win_arm64 cp313-*" # to silence warning "While arm64 wheels can be built on x86_64, they cannot be tested."
625+
CIBW_TEST_REQUIRES: grid2op pandapower
626+
CIBW_TEST_SKIP: "*-macosx_arm64 *-win_arm64" # to silence warning "While arm64 wheels can be built on x86_64, they cannot be tested."
598627
CIBW_TEST_COMMAND: >
599628
python -c "import lightsim2grid" &&
600629
python -c "from lightsim2grid import *" &&

.gitignore

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,3 +288,20 @@ lightsim2grid/tests/venv_test_pp/
288288
venv_legacy_311/
289289
venv_test
290290
lightsim2grid/gridmodel/from_pypowsybl/pypowsybl.ipynb
291+
_superlu/
292+
benchmarks/gauss_seidel_graph.ipynb
293+
benchmarks/res_gauss_seidel.pickle
294+
benchmarks/res_gauss_seidel_nb_iters.pickle
295+
benchmarks/venv_bench312/
296+
debug_grid_iidm/
297+
debug_olf_ls.py
298+
lightsim2grid/tests/output_pandapower.py
299+
pypowsybl-1.9.0.dev1-cp39-cp39-linux_x86_64.whl
300+
pypowsybl2grid-0.1.0-py3-none-any.whl
301+
pypowsybl2grid-wheels.zip
302+
read_iidm_sub.py
303+
res_olf_lightsim.csv
304+
venv_ls/
305+
venv_ls_glop/
306+
venv_old_glop/
307+
venv_pypobk/

0 commit comments

Comments
 (0)