From 940dc0ae066ddeed9e642a99b507e4dcc245844a Mon Sep 17 00:00:00 2001 From: DONNOT Benjamin Date: Thu, 28 Nov 2024 15:24:01 +0100 Subject: [PATCH 01/11] fix an issue that prevent to retrieve theta information when loading from pypowsybl Signed-off-by: DONNOT Benjamin --- CHANGELOG.rst | 5 +++++ docs/conf.py | 2 +- lightsim2grid/__init__.py | 2 +- lightsim2grid/lightSimBackend.py | 4 +++- lightsim2grid/tests/test_backend_pypowsybl.py | 2 ++ setup.py | 2 +- 6 files changed, 13 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 7ddf4ad..5beaee2 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -26,6 +26,11 @@ TODO: in `main.cpp` check the returned policy of pybind11 and also the `py::call TODO: a cpp class that is able to compute (DC powerflow) ContingencyAnalysis and TimeSeries using PTDF and LODF TODO: integration test with pandapower (see `pandapower/contingency/contingency.py` and import `lightsim2grid_installed` and check it's True) +[0.9.2.post2] 2024-11-28 +-------------------------- +- [FIXED] The attribute `can_output_theta` (of base `Backend` class) + was not set to `True` if using the pypowsybl loader. + [0.9.2.post1] 2024-11-28 -------------------------- - [FIXED] There is still a bug with the pypowsybl 1.8.1 version with the diff --git a/docs/conf.py b/docs/conf.py index 6002417..93f2a29 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -22,7 +22,7 @@ author = 'Benjamin DONNOT' # The full version, including alpha/beta/rc tags -release = "0.9.2.post1" +release = "0.9.2.post2" version = '0.9' # -- General configuration --------------------------------------------------- diff --git a/lightsim2grid/__init__.py b/lightsim2grid/__init__.py index 7b02000..d1c3abe 100644 --- a/lightsim2grid/__init__.py +++ b/lightsim2grid/__init__.py @@ -6,7 +6,7 @@ # SPDX-License-Identifier: MPL-2.0 # This file is part of LightSim2grid, LightSim2grid implements a c++ backend targeting the Grid2Op platform. -__version__ = "0.9.2.post1" +__version__ = "0.9.2.post2" __all__ = ["newtonpf", "SolverType", "ErrorType", "solver", "compilation_options"] diff --git a/lightsim2grid/lightSimBackend.py b/lightsim2grid/lightSimBackend.py index 9bde6e9..8fe4ce3 100644 --- a/lightsim2grid/lightSimBackend.py +++ b/lightsim2grid/lightSimBackend.py @@ -156,6 +156,9 @@ def __init__(self, if not hasattr(self, "_can_be_copied"): self._can_be_copied = can_be_copied + #: I can output the voltage angle + self.can_output_theta = True + #: .. versionadded:: 0.8.0 #: #: Which type of grid format can be read by your backend. @@ -836,7 +839,6 @@ def _load_grid_pandapower(self, path=None, filename=None): self._aux_init_pandapower() def _aux_init_pandapower(self): - self.can_output_theta = True # i can compute the "theta" and output it to grid2op from lightsim2grid.gridmodel import init_from_pandapower self._grid = init_from_pandapower(self.init_pp_backend._grid) self.__nb_bus_before = self.init_pp_backend.get_nb_active_bus() diff --git a/lightsim2grid/tests/test_backend_pypowsybl.py b/lightsim2grid/tests/test_backend_pypowsybl.py index e52033f..9490def 100644 --- a/lightsim2grid/tests/test_backend_pypowsybl.py +++ b/lightsim2grid/tests/test_backend_pypowsybl.py @@ -71,6 +71,7 @@ def test_runpf(self): # DC powerflow conv, exc_ = backend.runpf(is_dc=True) assert conv + assert backend.can_output_theta class BackendTester2(unittest.TestCase): """issue is still not replicated and these tests pass""" @@ -101,6 +102,7 @@ def test_runpf(self): # DC powerflow conv, exc_ = backend.runpf(is_dc=True) assert conv + assert backend.can_output_theta if CAN_DO_TEST_SUITE: dir_path = os.path.dirname(os.path.realpath(__file__)) diff --git a/setup.py b/setup.py index 066687f..8667f7c 100644 --- a/setup.py +++ b/setup.py @@ -14,7 +14,7 @@ from pybind11.setup_helpers import Pybind11Extension, build_ext -__version__ = "0.9.2.post1" +__version__ = "0.9.2.post2" KLU_SOLVER_AVAILABLE = False # Try to link against SuiteSparse (if available) From 6355c4e56e7116c9a112adf1f1acf73eb0fea506 Mon Sep 17 00:00:00 2001 From: DONNOT Benjamin Date: Thu, 28 Nov 2024 15:59:43 +0100 Subject: [PATCH 02/11] improve CI and add python 3.13 Signed-off-by: DONNOT Benjamin --- .github/workflows/main.yml | 27 +++++++++++++++++++++++---- CHANGELOG.rst | 4 +++- 2 files changed, 26 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c61337e..585ad01 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -47,6 +47,11 @@ jobs: abi: cp312, version: '3.12', } + - { + name: cp313, + abi: cp313, + version: '3.13', + } cont: - { @@ -163,7 +168,7 @@ jobs: - name: Upload wheel uses: actions/upload-artifact@v4 # v4 broken with: - name: lightsim2grid-wheel-linux-${{ matrix.python.name }}-${{ matrix.cont.name }} + name: lightsim2grid-wheel-linux-${{ matrix.python.name }}-${{ matrix.cont.name }}.* path: wheelhouse/*.whl - name: Upload source archive @@ -204,6 +209,10 @@ jobs: name: cp312, version: '3.12', } + - { + name: cp313, + version: '3.13', + } win_arch: - { name: "AMD64", @@ -306,7 +315,7 @@ jobs: - name: Upload wheel uses: actions/upload-artifact@v3 with: - name: lightsim2grid-wheel-win-${{ matrix.python.name }}-${{ matrix.win_arch.msvc}} + name: lightsim2grid-wheel-win-${{ matrix.python.name }}-${{ matrix.win_arch.msvc}}.* path: dist/*.whl macos_build_37_: @@ -340,6 +349,10 @@ jobs: name: cp312, version: '3.12', } + - { + name: cp313, + version: '3.13', + } runner: - { name: macos-13, @@ -459,7 +472,7 @@ jobs: - name: Upload wheel uses: actions/upload-artifact@v3 with: - name: lightsim2grid-wheel-darwin-${{ matrix.python.name }}-${{ matrix.runner.arch}} + name: lightsim2grid-wheel-darwin-${{ matrix.python.name }}-${{ matrix.runner.arch}}.* path: dist/*.whl exotic_build: @@ -506,6 +519,10 @@ jobs: name: cp312, version: '3.12', } + - { + name: cp313, + version: '3.13', + } exclude: - python: name: cp310 # because already done natively above @@ -517,6 +534,8 @@ jobs: name: macos-14 - python: name: cp312 # because already done natively above + - python: + name: cp313 # because already done natively above runner: name: macos-14 - python: @@ -574,7 +593,7 @@ jobs: - name: Upload wheel uses: actions/upload-artifact@v3 with: - name: lightsim2grid-wheel-${{ matrix.runner.whl_nm}}-${{ matrix.python.name }} + name: lightsim2grid-wheel-${{ matrix.runner.whl_nm}}-${{ matrix.python.name }}.* path: ./wheelhouse/*.whl package: diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 5beaee2..1849890 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -26,10 +26,12 @@ TODO: in `main.cpp` check the returned policy of pybind11 and also the `py::call TODO: a cpp class that is able to compute (DC powerflow) ContingencyAnalysis and TimeSeries using PTDF and LODF TODO: integration test with pandapower (see `pandapower/contingency/contingency.py` and import `lightsim2grid_installed` and check it's True) -[0.9.2.post2] 2024-11-28 +[0.9.2.post2] 2024-11-29 -------------------------- - [FIXED] The attribute `can_output_theta` (of base `Backend` class) was not set to `True` if using the pypowsybl loader. +- [FIXED] the github CI to work properly on many linux buit image +- [IMPROVED] build on python 3.13 [0.9.2.post1] 2024-11-28 -------------------------- From e0feeb6e67d9c4c4f1e815e496dea2fa5037fa70 Mon Sep 17 00:00:00 2001 From: DONNOT Benjamin Date: Thu, 28 Nov 2024 16:09:54 +0100 Subject: [PATCH 03/11] fix CI Signed-off-by: DONNOT Benjamin --- .github/workflows/main.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 585ad01..de73dbe 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -127,7 +127,7 @@ jobs: python3 -c "from lightsim2grid.gridmodel import GridModel" - name: Check package can be imported (bare install, numpy < 2) - if: matrix.python.name != 'cp37' && matrix.python.name != 'cp38' + if: matrix.python.name != 'cp37' && matrix.python.name != 'cp38' && matrix.python.name != 'cp3.13' run: | python3 -m pip install "numpy<2" cd tmp_for_import_checking @@ -284,7 +284,7 @@ jobs: python3 -c "from lightsim2grid.gridmodel import GridModel" - name: Check package can be imported (bare install, numpy < 2) - if: matrix.python.name != 'cp37' && matrix.python.name != 'cp38' + if: matrix.python.name != 'cp37' && matrix.python.name != 'cp38' && matrix.python.name != 'cp313' run: | python3 -m pip install "numpy<2" cd tmp_for_import_checking @@ -431,7 +431,7 @@ jobs: python3 -c "from lightsim2grid.gridmodel import GridModel" - name: Check package can be imported (bare install, numpy < 2) - if: matrix.python.name != 'cp37' && matrix.python.name != 'cp38' + if: matrix.python.name != 'cp37' && matrix.python.name != 'cp38' && matrix.python.name != 'cp313' run: | python3 -m pip install "numpy<2" cd tmp_for_import_checking From 841d8ea6a164573ea329f30ee4e494bc7bbd34e2 Mon Sep 17 00:00:00 2001 From: DONNOT Benjamin Date: Thu, 28 Nov 2024 16:54:14 +0100 Subject: [PATCH 04/11] still trying with python 3.13 Signed-off-by: DONNOT Benjamin --- .github/workflows/main.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index de73dbe..83cdcdc 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -166,13 +166,13 @@ jobs: python3 -v -c "from lightsim2grid import LightSimBackend; import grid2op; env = grid2op.make('l2rpn_case14_sandbox', test=True, backend=LightSimBackend())" - name: Upload wheel - uses: actions/upload-artifact@v4 # v4 broken + uses: actions/upload-artifact@v4 with: - name: lightsim2grid-wheel-linux-${{ matrix.python.name }}-${{ matrix.cont.name }}.* + # name: lightsim2grid-wheel-linux-${{ matrix.python.name }}-${{ matrix.cont.name }}.* path: wheelhouse/*.whl - name: Upload source archive - uses: actions/upload-artifact@v4 # v4 broken + uses: actions/upload-artifact@v4 if: matrix.python.name == 'cp311' with: name: lightsim2grid-sources @@ -313,9 +313,9 @@ jobs: # python -m unittest lightsim2grid.tests.test_n1contingencyrewards.TestN1ContingencyReward_Base.test_do_nothing - name: Upload wheel - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: - name: lightsim2grid-wheel-win-${{ matrix.python.name }}-${{ matrix.win_arch.msvc}}.* + # name: lightsim2grid-wheel-win-${{ matrix.python.name }}-${{ matrix.win_arch.msvc}}.* path: dist/*.whl macos_build_37_: @@ -470,9 +470,9 @@ jobs: python -v -c "from lightsim2grid import LightSimBackend; import grid2op; env = grid2op.make('l2rpn_case14_sandbox', test=True, backend=LightSimBackend())" - name: Upload wheel - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: - name: lightsim2grid-wheel-darwin-${{ matrix.python.name }}-${{ matrix.runner.arch}}.* + # name: lightsim2grid-wheel-darwin-${{ matrix.python.name }}-${{ matrix.runner.arch}}.* path: dist/*.whl exotic_build: @@ -579,7 +579,7 @@ jobs: cmake --build . --config Release && cmake --install . --prefix ..\built CIBW_TEST_REQUIRES: grid2op pandapower "numpy<2" - CIBW_TEST_SKIP: "cp312-* *-macosx_arm64 *-win_arm64" # to silence warning "While arm64 wheels can be built on x86_64, they cannot be tested." + 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." CIBW_TEST_COMMAND: > python -c "import lightsim2grid" && python -c "from lightsim2grid import *" && @@ -591,9 +591,9 @@ jobs: python -c "from lightsim2grid import LightSimBackend" && python -c "from lightsim2grid.physical_law_checker import PhysicalLawChecker" - name: Upload wheel - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: - name: lightsim2grid-wheel-${{ matrix.runner.whl_nm}}-${{ matrix.python.name }}.* + # name: lightsim2grid-wheel-${{ matrix.runner.whl_nm}}-${{ matrix.python.name }}.* path: ./wheelhouse/*.whl package: @@ -603,12 +603,12 @@ jobs: steps: - name: Download wheels - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: path: download - name: Upload wheels - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: lightsim2grid-wheels path: | From fee6b04eb5715f3d100555876994e6f743a5f723 Mon Sep 17 00:00:00 2001 From: DONNOT Benjamin Date: Fri, 29 Nov 2024 09:03:39 +0100 Subject: [PATCH 05/11] try to fix CI build Signed-off-by: DONNOT Benjamin --- .github/workflows/main.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 83cdcdc..4f811cb 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -168,12 +168,12 @@ jobs: - name: Upload wheel uses: actions/upload-artifact@v4 with: - # name: lightsim2grid-wheel-linux-${{ matrix.python.name }}-${{ matrix.cont.name }}.* + name: lightsim2grid-wheel-linux-${{ matrix.python.name }}-${{ matrix.cont.name }} path: wheelhouse/*.whl - name: Upload source archive uses: actions/upload-artifact@v4 - if: matrix.python.name == 'cp311' + if: matrix.python.name == 'cp312' with: name: lightsim2grid-sources path: dist/*.tar.gz @@ -315,7 +315,7 @@ jobs: - name: Upload wheel uses: actions/upload-artifact@v4 with: - # name: lightsim2grid-wheel-win-${{ matrix.python.name }}-${{ matrix.win_arch.msvc}}.* + name: lightsim2grid-wheel-win-${{ matrix.python.name }}-${{ matrix.win_arch.msvc}} path: dist/*.whl macos_build_37_: @@ -472,7 +472,7 @@ jobs: - name: Upload wheel uses: actions/upload-artifact@v4 with: - # name: lightsim2grid-wheel-darwin-${{ matrix.python.name }}-${{ matrix.runner.arch}}.* + name: lightsim2grid-wheel-darwin-${{ matrix.python.name }}-${{ matrix.runner.arch}} path: dist/*.whl exotic_build: @@ -559,7 +559,7 @@ jobs: platforms: all - name: Compile with cibuildwheel - uses: pypa/cibuildwheel@v2.17.0 + uses: pypa/cibuildwheel@v2.22.0 env: CIBW_PLATFORM: "${{ matrix.runner.cibuildwheel}}" CIBW_BUILD: "${{ matrix.python.name}}-*" @@ -593,7 +593,7 @@ jobs: - name: Upload wheel uses: actions/upload-artifact@v4 with: - # name: lightsim2grid-wheel-${{ matrix.runner.whl_nm}}-${{ matrix.python.name }}.* + name: lightsim2grid-wheel-exotic-${{ matrix.runner.whl_nm}}-${{ matrix.python.name }} path: ./wheelhouse/*.whl package: From 60c525aba8decea81df642484fd2a01910d7643d Mon Sep 17 00:00:00 2001 From: DONNOT Benjamin Date: Fri, 29 Nov 2024 10:35:47 +0100 Subject: [PATCH 06/11] finally a working CI ? Signed-off-by: DONNOT Benjamin --- .github/workflows/main.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4f811cb..10fe68c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -151,6 +151,7 @@ jobs: python3 -m pip freeze - name: Check extra can be imported can be imported (with grid2op) + if: matrix.python.name != 'cp3.13' # pandapower does not support 3.13, so grid2op does not so I cannot test that for 3.13 run: | cd tmp_for_import_checking python3 -v -c "from lightsim2grid import LightSimBackend" @@ -161,6 +162,7 @@ jobs: python3 -c "from lightsim2grid.gridmodel import init_from_pandapower" - name: Check LightSimBackend can be used to create env + if: matrix.python.name != 'cp3.13' # pandapower does not support 3.13, so grid2op does not so I cannot test that for 3.13 run: | cd tmp_for_import_checking python3 -v -c "from lightsim2grid import LightSimBackend; import grid2op; env = grid2op.make('l2rpn_case14_sandbox', test=True, backend=LightSimBackend())" @@ -297,6 +299,7 @@ jobs: python3 -c "from lightsim2grid.gridmodel import GridModel" - name: Check LightSimBackend can be imported (with grid2op) + if: matrix.python.name != 'cp3.13' # pandapower does not support 3.13, so grid2op does not so I cannot test that for 3.13 run: | python -m pip install grid2op cd tmp_for_import_checking @@ -308,6 +311,12 @@ jobs: python -c "from lightsim2grid.securityAnalysis import SecurityAnalysis" python -c "from lightsim2grid.gridmodel import init_from_pandapower" + - name: Check LightSimBackend can be used to create env + if: matrix.python.name != 'cp3.13' # pandapower does not support 3.13, so grid2op does not so I cannot test that for 3.13 + run: | + cd tmp_for_import_checking + python3 -v -c "from lightsim2grid import LightSimBackend; import grid2op; env = grid2op.make('l2rpn_case14_sandbox', test=True, backend=LightSimBackend())" + # - name: Debug windows CI # run: | # python -m unittest lightsim2grid.tests.test_n1contingencyrewards.TestN1ContingencyReward_Base.test_do_nothing @@ -455,6 +464,7 @@ jobs: python -m pip freeze - name: Check extra can be imported can be imported (with grid2op) + if: matrix.python.name != 'cp3.13' # pandapower does not support 3.13, so grid2op does not so I cannot test that for 3.13 run: | cd tmp_for_import_checking python -v -c "from lightsim2grid import LightSimBackend" @@ -465,6 +475,7 @@ jobs: python -c "from lightsim2grid.gridmodel import init_from_pandapower" - name: Check LightSimBackend can be used to create env + if: matrix.python.name != 'cp3.13' # pandapower does not support 3.13, so grid2op does not so I cannot test that for 3.13 run: | cd tmp_for_import_checking python -v -c "from lightsim2grid import LightSimBackend; import grid2op; env = grid2op.make('l2rpn_case14_sandbox', test=True, backend=LightSimBackend())" From b74d400bfcfe237a3ba9282f18cc69eb76b146f8 Mon Sep 17 00:00:00 2001 From: DONNOT Benjamin Date: Fri, 29 Nov 2024 10:49:16 +0100 Subject: [PATCH 07/11] finally a working CI ? Signed-off-by: DONNOT Benjamin --- .github/workflows/main.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 10fe68c..e4558f2 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -127,7 +127,7 @@ jobs: python3 -c "from lightsim2grid.gridmodel import GridModel" - name: Check package can be imported (bare install, numpy < 2) - if: matrix.python.name != 'cp37' && matrix.python.name != 'cp38' && matrix.python.name != 'cp3.13' + if: matrix.python.name != 'cp37' && matrix.python.name != 'cp38' && matrix.python.name != 'cp313' run: | python3 -m pip install "numpy<2" cd tmp_for_import_checking @@ -151,7 +151,7 @@ jobs: python3 -m pip freeze - name: Check extra can be imported can be imported (with grid2op) - if: matrix.python.name != 'cp3.13' # pandapower does not support 3.13, so grid2op does not so I cannot test that for 3.13 + if: matrix.python.name != 'cp313' # pandapower does not support 3.13, so grid2op does not so I cannot test that for 3.13 run: | cd tmp_for_import_checking python3 -v -c "from lightsim2grid import LightSimBackend" @@ -162,7 +162,7 @@ jobs: python3 -c "from lightsim2grid.gridmodel import init_from_pandapower" - name: Check LightSimBackend can be used to create env - if: matrix.python.name != 'cp3.13' # pandapower does not support 3.13, so grid2op does not so I cannot test that for 3.13 + if: matrix.python.name != 'cp313' # pandapower does not support 3.13, so grid2op does not so I cannot test that for 3.13 run: | cd tmp_for_import_checking python3 -v -c "from lightsim2grid import LightSimBackend; import grid2op; env = grid2op.make('l2rpn_case14_sandbox', test=True, backend=LightSimBackend())" @@ -299,7 +299,7 @@ jobs: python3 -c "from lightsim2grid.gridmodel import GridModel" - name: Check LightSimBackend can be imported (with grid2op) - if: matrix.python.name != 'cp3.13' # pandapower does not support 3.13, so grid2op does not so I cannot test that for 3.13 + if: matrix.python.name != 'cp313' # pandapower does not support 3.13, so grid2op does not so I cannot test that for 3.13 run: | python -m pip install grid2op cd tmp_for_import_checking @@ -312,11 +312,11 @@ jobs: python -c "from lightsim2grid.gridmodel import init_from_pandapower" - name: Check LightSimBackend can be used to create env - if: matrix.python.name != 'cp3.13' # pandapower does not support 3.13, so grid2op does not so I cannot test that for 3.13 + if: matrix.python.name != 'cp313' # pandapower does not support 3.13, so grid2op does not so I cannot test that for 3.13 run: | cd tmp_for_import_checking python3 -v -c "from lightsim2grid import LightSimBackend; import grid2op; env = grid2op.make('l2rpn_case14_sandbox', test=True, backend=LightSimBackend())" - + # - name: Debug windows CI # run: | # python -m unittest lightsim2grid.tests.test_n1contingencyrewards.TestN1ContingencyReward_Base.test_do_nothing @@ -464,7 +464,7 @@ jobs: python -m pip freeze - name: Check extra can be imported can be imported (with grid2op) - if: matrix.python.name != 'cp3.13' # pandapower does not support 3.13, so grid2op does not so I cannot test that for 3.13 + if: matrix.python.name != 'cp313' # pandapower does not support 3.13, so grid2op does not so I cannot test that for 3.13 run: | cd tmp_for_import_checking python -v -c "from lightsim2grid import LightSimBackend" @@ -475,7 +475,7 @@ jobs: python -c "from lightsim2grid.gridmodel import init_from_pandapower" - name: Check LightSimBackend can be used to create env - if: matrix.python.name != 'cp3.13' # pandapower does not support 3.13, so grid2op does not so I cannot test that for 3.13 + if: matrix.python.name != 'cp313' # pandapower does not support 3.13, so grid2op does not so I cannot test that for 3.13 run: | cd tmp_for_import_checking python -v -c "from lightsim2grid import LightSimBackend; import grid2op; env = grid2op.make('l2rpn_case14_sandbox', test=True, backend=LightSimBackend())" From 8398e499cf0785689cd8af4619ff36805c961094 Mon Sep 17 00:00:00 2001 From: DONNOT Benjamin Date: Fri, 29 Nov 2024 10:58:52 +0100 Subject: [PATCH 08/11] finally a working CI ? Signed-off-by: DONNOT Benjamin --- .github/workflows/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e4558f2..25f4dd7 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -146,6 +146,7 @@ jobs: # 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' - name: Install grid2op + if: matrix.python.name != 'cp313' # pandapower does not support 3.13, so grid2op does not so I cannot test that for 3.13 run: | python3 -m pip install grid2op pandapower python3 -m pip freeze From 1046d8e316ebe04d8492be2f306bc7cfbbea06c5 Mon Sep 17 00:00:00 2001 From: DONNOT Benjamin Date: Fri, 29 Nov 2024 11:05:50 +0100 Subject: [PATCH 09/11] adding support for 3.13 in the readme [skip ci] Signed-off-by: DONNOT Benjamin --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index b8a9d7f..7d966d2 100644 --- a/README.md +++ b/README.md @@ -88,6 +88,7 @@ Pypi packages are available for linux (`x86_64` cpu architecture), windows (`x86 - 3.10 (lightsim2grid >= 0.6.1) - 3.11 (lightsim2grid >= 0.7.1) - 3.12 (lightsim2grid >= 0.7.5) +- 3.13 (lightsim2grid >= 0.9.2.post2) As from version 0.8.2, we also distribute windows `arm64` and macos `arm64` binaries of lightsim2grid that can be installed From 40a2f8488323da44b5ff098d59b0c00db11ca30b Mon Sep 17 00:00:00 2001 From: DONNOT Benjamin Date: Fri, 29 Nov 2024 11:10:59 +0100 Subject: [PATCH 10/11] finally a working CI ? ... Signed-off-by: DONNOT Benjamin --- .github/workflows/main.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 25f4dd7..616b61b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -106,7 +106,7 @@ jobs: auditwheel repair dist/*.whl - name: Build source archive - if: matrix.python.name == 'cp311' + if: matrix.python.name == 'cp312' run: python3 setup.py sdist - name: Install lightsim2grid wheel @@ -460,6 +460,7 @@ jobs: # 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' - name: Install grid2op + if: matrix.python.name != 'cp313' # pandapower does not support 3.13, so grid2op does not so I cannot test that for 3.13 run: | python -m pip install grid2op python -m pip freeze From af4d62ef68269700a0468839efd1229d0f2db51d Mon Sep 17 00:00:00 2001 From: DONNOT Benjamin Date: Fri, 29 Nov 2024 11:37:17 +0100 Subject: [PATCH 11/11] missing cp312 arm64 windows build... Signed-off-by: DONNOT Benjamin --- .github/workflows/main.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 616b61b..90fa4a9 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -547,6 +547,8 @@ jobs: name: macos-14 - python: name: cp312 # because already done natively above + runner: + name: macos-14 - python: name: cp313 # because already done natively above runner: