Skip to content

Commit

Permalink
Merge pull request #579 from rte-france/dev_1.9.8
Browse files Browse the repository at this point in the history
Dev 1.9.8
  • Loading branch information
BDonnot authored Jan 26, 2024
2 parents 8bb7132 + c080214 commit fbf0fdf
Show file tree
Hide file tree
Showing 39 changed files with 1,203 additions and 529 deletions.
164 changes: 52 additions & 112 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,27 @@ version: 2.1
executors:
grid2op-executor:
docker:
- image: python:3.10-buster
- image: python:3.10
working_directory: /Grid2Op

python37:
docker:
- image: python:3.7-buster
- image: python:3.7
python38:
docker:
- image: python:3.8-buster
- image: python:3.8
python39:
docker:
- image: python:3.9-buster
- image: python:3.9
python310:
docker:
- image: python:3.10-buster
- image: python:3.10
python311:
docker:
- image: python:3.11-buster
- image: python:3.11
python312:
docker:
- image: cimg/python:3.12.0
- image: cimg/python:3.12

jobs:
test:
Expand All @@ -47,13 +47,17 @@ jobs:
export _GRID2OP_FORCE_TEST=1
cd grid2op/tests/
python3 helper_list_test.py | circleci tests split > /tmp/tests_run
- run:
command: |
source venv_test/bin/activate
pip freeze
- run: cat /tmp/tests_run
- run:
command: |
source venv_test/bin/activate
cd grid2op/tests/
export _GRID2OP_FORCE_TEST=1
python3 -m unittest $(cat /tmp/tests_run)
python3 -m unittest -v $(cat /tmp/tests_run)
install36:
executor: python36
Expand Down Expand Up @@ -136,37 +140,28 @@ jobs:
- run:
command: |
source venv_test/bin/activate
python -m pip install -U "numpy>=1.20,<1.21"
python -m pip install -U .[test]
export _GRID2OP_FORCE_TEST=1
grid2op.testinstall
python -m pip install -U "numpy>=1.20,<1.21" "pandas<2.2" "scipy<1.12" numba .[test]
pip freeze
- run:
command: |
command: |
source venv_test/bin/activate
python -m pip install -U "numpy>=1.21,<1.22"
python -m pip install -U .[test]
export _GRID2OP_FORCE_TEST=1
cd /tmp
grid2op.testinstall
- run:
command: |
source venv_test/bin/activate
python -m pip install -U "numpy>=1.22,<1.23"
python -m pip install -U "numpy>=1.24,<1.25" "pandas<2.2" "scipy<1.12" numba
python -m pip install -U .[test]
export _GRID2OP_FORCE_TEST=1
grid2op.testinstall
- run:
command: |
command: |
source venv_test/bin/activate
python -m pip install -U "numpy>=1.23,<1.24"
python -m pip install -U .[test]
export _GRID2OP_FORCE_TEST=1
grid2op.testinstall
pip freeze
- run:
command: |
command: |
source venv_test/bin/activate
python -m pip install -U "numpy>=1.24,<1.25"
python -m pip install -U .[test]
export _GRID2OP_FORCE_TEST=1
cd /tmp
grid2op.testinstall
install39:
Expand All @@ -190,56 +185,24 @@ jobs:
- run:
command: |
source venv_test/bin/activate
python -m pip install -U numba
python -m pip install -U .[test]
- run:
command: |
source venv_test/bin/activate
python -m pip install -U "numpy>=1.20,<1.21"
python -m pip install -U .[test]
export _GRID2OP_FORCE_TEST=1
grid2op.testinstall
python -m pip install -U "numpy>=1.20,<1.21" "pandas<2.2" "scipy<1.12" numba .[test]
pip freeze
- run:
command: |
source venv_test/bin/activate
python -m pip install -U "numpy>=1.21,<1.22"
python -m pip install -U .[test]
export _GRID2OP_FORCE_TEST=1
grid2op.testinstall
- run:
command: |
source venv_test/bin/activate
python -m pip install -U "numpy>=1.22,<1.23"
python -m pip install -U .[test]
export _GRID2OP_FORCE_TEST=1
grid2op.testinstall
- run:
command: |
source venv_test/bin/activate
python -m pip install -U "numpy>=1.23,<1.24"
python -m pip install -U .[test]
export _GRID2OP_FORCE_TEST=1
grid2op.testinstall
- run:
command: |
command: |
source venv_test/bin/activate
python -m pip install -U "numpy>=1.24,<1.25"
python -m pip install -U .[test]
export _GRID2OP_FORCE_TEST=1
cd /tmp
grid2op.testinstall
- run:
command: |
source venv_test/bin/activate
python -m pip install -U "numpy>=1.25,<1.26"
python -m pip install -U .[test]
export _GRID2OP_FORCE_TEST=1
grid2op.testinstall
python -m pip install -U "numpy>=1.26,<1.27" "pandas<2.2" "scipy<1.12" numba .[test]
pip freeze
- run:
command: |
command: |
source venv_test/bin/activate
python -m pip install -U "numpy>=1.26,<1.27"
python -m pip install -U .[test]
export _GRID2OP_FORCE_TEST=1
cd /tmp
grid2op.testinstall
install310:
Expand All @@ -261,44 +224,24 @@ jobs:
- run:
command: |
source venv_test/bin/activate
python -m pip install -U "numpy>=1.21,<1.22"
python -m pip install -U .[test]
export _GRID2OP_FORCE_TEST=1
grid2op.testinstall
python -m pip install -U "numpy>=1.21,<1.22" "pandas<2.2" "scipy<1.12" numba .[test]
pip freeze
- run:
command: |
source venv_test/bin/activate
python -m pip install -U "numpy>=1.22,<1.23"
python -m pip install -U .[test]
export _GRID2OP_FORCE_TEST=1
grid2op.testinstall
- run:
command: |
source venv_test/bin/activate
python -m pip install -U "numpy>=1.23,<1.24"
python -m pip install -U .[test]
export _GRID2OP_FORCE_TEST=1
grid2op.testinstall
- run:
command: |
command: |
source venv_test/bin/activate
python -m pip install -U "numpy>=1.24,<1.25"
python -m pip install -U .[test]
export _GRID2OP_FORCE_TEST=1
cd /tmp
grid2op.testinstall
- run:
command: |
source venv_test/bin/activate
python -m pip install -U "numpy>=1.25,<1.26"
python -m pip install -U .[test]
export _GRID2OP_FORCE_TEST=1
grid2op.testinstall
python -m pip install -U "numpy>=1.26,<1.27" "pandas<2.2" "scipy<1.12" numba .[test]
pip freeze
- run:
command: |
command: |
source venv_test/bin/activate
python -m pip install -U "numpy>=1.26,<1.27"
python -m pip install -U .[test]
export _GRID2OP_FORCE_TEST=1
cd /tmp
grid2op.testinstall
install311:
Expand All @@ -316,34 +259,27 @@ jobs:
command: |
source venv_test/bin/activate
python -m pip install -U pip setuptools wheel
python -m pip install -U numba
- run:
command: |
source venv_test/bin/activate
python -m pip install -U "numpy>=1.23,<1.24"
python -m pip install -U .[test]
export _GRID2OP_FORCE_TEST=1
grid2op.testinstall
python -m pip install -U "numpy>=1.23,<1.24" "pandas<2.2" "scipy<1.12" numba .[test]
pip freeze
- run:
command: |
command: |
source venv_test/bin/activate
python -m pip install -U "numpy>=1.24,<1.25"
python -m pip install -U .[test]
export _GRID2OP_FORCE_TEST=1
cd /tmp
grid2op.testinstall
- run:
command: |
source venv_test/bin/activate
python -m pip install -U "numpy>=1.25,<1.26"
python -m pip install -U .[test]
export _GRID2OP_FORCE_TEST=1
grid2op.testinstall
python -m pip install -U "numpy>=1.26,<1.27" "pandas<2.2" "scipy<1.12" numba .[test]
pip freeze
- run:
command: |
command: |
source venv_test/bin/activate
python -m pip install -U "numpy>=1.26,<1.27"
python -m pip install -U .[test]
export _GRID2OP_FORCE_TEST=1
cd /tmp
grid2op.testinstall
install312:
executor: python312
Expand All @@ -364,9 +300,13 @@ jobs:
- run:
command: |
source venv_test/bin/activate
python -m pip install -U "numpy>=1.26,<1.27"
python -m pip install -U .[test]
python -m pip install -U "numpy>=1.26,<1.27" "pandas<2.2" "scipy<1.12" .[test]
pip freeze
- run:
command: |
source venv_test/bin/activate
export _GRID2OP_FORCE_TEST=1
cd /tmp
grid2op.testinstall
workflows:
Expand All @@ -380,4 +320,4 @@ workflows:
- install39
- install310
- install311
# - install312 # failing because of dependencies of numba, torch etc. Tired of it so ignoring it !
- install312
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,8 @@ grid2op/tests/test_failing_simulator.txt
old_pyproject.toml
pp_bug_gen_alone.py
test_dunder.py
grid2op/tests/test_fail_ci.txt
saved_multiepisode_agent_36bus_DN_4/

# profiling files
**.prof
11 changes: 9 additions & 2 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
version: 2
version: "2"

build:
os: "ubuntu-22.04"
tools:
python: "3.10"

sphinx:
configuration: docs/conf.py

python:
version: 3.8
install:
- method: pip
path: .
Expand Down
23 changes: 23 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,29 @@ Change Log
- [???] properly model interconnecting powerlines


[1.9.8] - 2024-01-26
----------------------
- [FIXED] the `backend.check_kirchoff` function was not correct when some elements were disconnected
(the wrong columns of the p_bus and q_bus was set in case of disconnected elements)
- [FIXED] `PandapowerBackend`, when no slack was present
- [FIXED] the "BaseBackendTest" class did not correctly detect divergence in most cases (which lead
to weird bugs in failing tests)
- [FIXED] an issue with imageio having deprecated the `fps` kwargs (see https://github.com/rte-france/Grid2Op/issues/569)
- [FIXED] adding the "`loads_charac.csv`" in the package data
- [FIXED] a bug when using grid2op, not "utils.py" script could be used (see
https://github.com/rte-france/Grid2Op/issues/577). This was caused by the modification of
`sys.path` when importing the grid2op test suite.
- [ADDED] A type of environment that does not perform the "emulation of the protections"
for some part of the grid (`MaskedEnvironment`) see https://github.com/rte-france/Grid2Op/issues/571
- [ADDED] a "gym like" API for reset allowing to set the seed and the time serie id directly when calling
`env.reset(seed=.., options={"time serie id": ...})`
- [IMPROVED] the CI speed: by not testing every possible numpy version but only most ancient and most recent
- [IMPROVED] Runner now test grid2op version 1.9.6 and 1.9.7
- [IMPROVED] refacto `gridobj_cls._clear_class_attribute` and `gridobj_cls._clear_grid_dependant_class_attributes`
- [IMPROVED] the bahviour of the generic class `MakeBackend` used for the test suite.
- [IMPROVED] re introducing python 12 testing
- [IMPROVED] error messages in the automatic test suite (`AAATestBackendAPI`)

[1.9.7] - 2023-12-01
----------------------
- [BREAKING] removal of the `grid2op/Exceptions/PowerflowExceptions.py` file and move the
Expand Down
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
recursive-include grid2op/data *.bz2 *.json *.zip prods_charac.csv *.py .multimix storage_units_charac.csv start_datetime.info time_interval.info
recursive-include grid2op/data *.bz2 *.json *.zip loads_charac.csv prods_charac.csv *.py .multimix storage_units_charac.csv start_datetime.info time_interval.info
global-exclude */__pycache__/*
global-exclude *.pyc
global-exclude grid2op/data_test/*
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,10 @@ but it is currently not on our priorities.
A quick fix that is known to work include to set the `experimental_read_from_local_dir` when creating the
environment with `grid2op.make(..., experimental_read_from_local_dir=True)` (see doc for more information)

Sometimes, on some configuration (python version) we do not recommend to use grid2op with pandas>=2.2
If you encounter any trouble, please downgrade to pandas<2.2. This behaviour occured in our continuous
integration environment for python >=3.9 but could not be reproduced locally.

### Perform tests locally

Provided that Grid2Op is installed *from source*:
Expand Down
2 changes: 1 addition & 1 deletion docs/action.rst
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ you want to perform on the grid. For more information you can consult the help o

To avoid extremely verbose things, as of grid2op 1.5.0, we introduced some convenience functions to allow
easier action construction. You can now do `act.load_set_bus = ...` instead of the previously way
more verbose `act.update({"set_bus": {"loads_id": ...}}`
more verbose `act.update({"set_bus": {"loads_id": ...}})`

.. _action-module-examples:

Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
author = 'Benjamin Donnot'

# The full version, including alpha/beta/rc tags
release = '1.9.7'
release = '1.9.8.dev1'
version = '1.9'


Expand Down
2 changes: 1 addition & 1 deletion docs/environment.rst
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ be equivalent to starting into the "middle" of a video game. If that is the case
Finally, you might have noticed that each call to "env.reset" might take a while. This can dramatically
increase the training time, especially at the beginning. This is due to the fact that each time
`env.reset` is called, the whole chronics is read from the hard drive. If you want to lower this
impact then you might consult the `Optimize the data pipeline`_ section.
impact then you might consult the :ref:`environment-module-data-pipeline` page of the doc.

.. _environment-module-chronics-info:

Expand Down
Loading

0 comments on commit fbf0fdf

Please sign in to comment.