Skip to content

Commit

Permalink
test backward compat for many grid2op versions
Browse files Browse the repository at this point in the history
  • Loading branch information
BDonnot committed Jul 25, 2024
1 parent 31dd9a1 commit 4b7184e
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,11 @@ jobs:
command: |
source venv_test/bin/activate
pip install --upgrade pip setuptools wheel gym "numpy<2" grid2op==1.0.0
pip install -U pybind11
git submodule init
git submodule update
make
CC=gcc python setup.py build
python -m pip install -U .
python -m pip install -e .
pip freeze
- run:
name: legacy test (grid2op 1.0.0)
Expand All @@ -95,36 +94,48 @@ jobs:
command: |
source venv_test/bin/activate
python -m pip install grid2op~=1.1
sed -i -e 's/np.int)/np.int32)/g' venv_test/lib/python3.*/site-packages/grid2op/Backend/PandaPowerBackend.py
sed -i -e 's/np.bool/np.bool_/g' venv_test/lib/python3.*/site-packages/grid2op/dtypes.py
python -m unittest lightsim2grid/tests/test_compat_legacy_grid2op.py
- run:
name: legacy test (grid2op ~1.2)
command: |
source venv_test/bin/activate
python -m pip install grid2op~=1.2
sed -i -e 's/np.int)/np.int32)/g' venv_test/lib/python3.*/site-packages/grid2op/Backend/PandaPowerBackend.py
sed -i -e 's/np.bool/np.bool_/g' venv_test/lib/python3.*/site-packages/grid2op/dtypes.py
python -m unittest lightsim2grid/tests/test_compat_legacy_grid2op.py
- run:
name: legacy test (grid2op ~1.3)
command: |
source venv_test/bin/activate
python -m pip install grid2op~=1.3
sed -i -e 's/np.int)/np.int32)/g' venv_test/lib/python3.*/site-packages/grid2op/Backend/PandaPowerBackend.py
sed -i -e 's/np.bool/np.bool_/g' venv_test/lib/python3.*/site-packages/grid2op/dtypes.py
python -m unittest lightsim2grid/tests/test_compat_legacy_grid2op.py
- run:
name: legacy test (grid2op ~1.4)
command: |
source venv_test/bin/activate
python -m pip install grid2op~=1.4
sed -i -e 's/np.int)/np.int32)/g' venv_test/lib/python3.*/site-packages/grid2op/Backend/PandaPowerBackend.py
sed -i -e 's/np.bool/np.bool_/g' venv_test/lib/python3.*/site-packages/grid2op/dtypes.py
python -m unittest lightsim2grid/tests/test_compat_legacy_grid2op.py
- run:
name: legacy test (grid2op ~1.5)
command: |
source venv_test/bin/activate
python -m pip install grid2op~=1.5
sed -i -e 's/np.int)/np.int32)/g' venv_test/lib/python3.*/site-packages/grid2op/Backend/PandaPowerBackend.py
sed -i -e 's/np.bool/np.bool_/g' venv_test/lib/python3.*/site-packages/grid2op/dtypes.py
python -m unittest lightsim2grid/tests/test_compat_legacy_grid2op.py
- run:
name: legacy test (grid2op ~1.6)
command: |
source venv_test/bin/activate
python -m pip install grid2op~=1.6
sed -i -e 's/np.int)/np.int32)/g' venv_test/lib/python3.*/site-packages/grid2op/Backend/PandaPowerBackend.py
sed -i -e 's/np.bool/np.bool_/g' venv_test/lib/python3.*/site-packages/grid2op/dtypes.py
python -m unittest lightsim2grid/tests/test_compat_legacy_grid2op.py
- run:
name: legacy test (grid2op ~1.7)
Expand Down Expand Up @@ -155,12 +166,16 @@ jobs:
command: |
source venv_test/bin/activate
python -m pip install grid2op==0.9.1.post1
sed -i -e 's/np.int)/np.int32)/g' venv_test/lib/python3.*/site-packages/grid2op/Backend/PandaPowerBackend.py
sed -i -e 's/np.bool/np.bool_/g' venv_test/lib/python3.*/site-packages/grid2op/dtypes.py
python -m unittest lightsim2grid/tests/test_compat_legacy_grid2op.py
- run:
name: legacy test (grid2op 1.2.2 - l2rpn neurips 2020)
command: |
source venv_test/bin/activate
python -m pip install grid2op==1.2.2
sed -i -e 's/np.int)/np.int32)/g' venv_test/lib/python3.*/site-packages/grid2op/Backend/PandaPowerBackend.py
sed -i -e 's/np.bool/np.bool_/g' venv_test/lib/python3.*/site-packages/grid2op/dtypes.py
python -m unittest lightsim2grid/tests/test_compat_legacy_grid2op.py
- run:
name: legacy test (grid2op 1.6.3 - l2rpn Icaps 2021)
Expand Down

0 comments on commit 4b7184e

Please sign in to comment.