Skip to content

Commit

Permalink
refacto to remove pandapower requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
BDonnot committed Jul 25, 2024
1 parent c598d78 commit 6a2483f
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 10 deletions.
27 changes: 19 additions & 8 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,12 @@ jobs:
resource_class: small
steps:
- checkout
- run: apt-get update && apt-get install python3-full python3-dev python3-pip python3-virtualenv git -y
- run: python3 -m virtualenv venv_test
- run: apt-get update && apt-get install python3.10-full python3.10-dev python3.10-pip python3.10-virtualenv git -y
- run: python3.12 -m virtualenv venv_test
- run:
name: Get python version
command:
python3.12 --version
- run:
name: "Set up virtual environment"
command: |
Expand Down Expand Up @@ -201,9 +205,12 @@ jobs:
resource_class: medium
steps:
- checkout
- run: apt-get update && apt-get install python3-full python3-dev python3-pip python3-virtualenv git -y
# - run: python3 -m pip install virtualenv
- run: python3 -m virtualenv venv_test
- run: apt-get update && apt-get install python3.12-full python3.12-dev python3.12-pip python3.12-virtualenv git -y
- run:
name: Get python version
command:
python3.12 --version
- run: python3.12 -m virtualenv venv_test
- run:
name: "Install grid2op from source"
command: |
Expand Down Expand Up @@ -406,8 +413,12 @@ jobs:
resource_class: medium
steps:
- checkout
- run: apt-get update && apt-get install python3-full python3-dev python3-pip python3-virtualenv git -y
- run: python3 -m virtualenv venv_test
- run: apt-get update && apt-get install python3.12-full python3.12-dev python3.12-pip python3.12-virtualenv git -y
- run:
name: Get python version
command:
python3.12 --version
- run: python3.12 -m virtualenv venv_test
- run:
name: "Install grid2op from source"
command: |
Expand Down Expand Up @@ -474,7 +485,7 @@ jobs:
command: |
.\venv_test\Scripts\activate
cd lightsim2grid\tests
# python -m unittest discover -v
python -m unittest discover -v
workflows:
version: 2.1
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ TODO HVDC in Jacobian (see pandapower)
- TODO test for clang 18 and gcc 14
- TODO : numpy 2. compat (includes a mode without pandapower)

- [BREAKING] the way to initialize lightsim2grid `GridModel` now does not require
pandapower (you can initialize it with pypowsybl if you want). To make it both
cleaner and clearer the function `lightsim2grid.gridmodel.init` has been removed.
Please use `lightsim2grid.gridmodel.init_from_pandapower` or
`lightsim2grid.gridmodel.init_from_pypowsybl` from now on
- [BREAKING] the previous `gridmodel.get_ptdf()` function was wrongly labeled with the
"solver" bus id and not the `grid` bus id which could cause issue when applying
topological changes. It has now been fixed (so the `gridmodel.get_ptdf` returns the
Expand Down
9 changes: 7 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,8 +318,13 @@
# before pandapower 2.8 scipy was forced to be <= 1.6 which does not work with
# python 3.10+
req_pkgs = [
"pandapower" if sys.version_info < (3, 10) else "pandapower>=2.8",
"pytest", # for pandapower see https://github.com/e2nIEE/pandapower/issues/1988
"setuptools",
"pip",
"pybind11",
"scipy",
"numpy"
# "pandapower" if sys.version_info < (3, 10) else "pandapower>=2.8",
# "pytest", # for pandapower see https://github.com/e2nIEE/pandapower/issues/1988
]
if sys.version_info < (3, 11):
req_pkgs.append("typing_extensions")
Expand Down

0 comments on commit 6a2483f

Please sign in to comment.