Skip to content

Commit fbf0fdf

Browse files
authored
Merge pull request #579 from rte-france/dev_1.9.8
Dev 1.9.8
2 parents 8bb7132 + c080214 commit fbf0fdf

39 files changed

+1203
-529
lines changed

.circleci/config.yml

Lines changed: 52 additions & 112 deletions
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,27 @@ version: 2.1
33
executors:
44
grid2op-executor:
55
docker:
6-
- image: python:3.10-buster
6+
- image: python:3.10
77
working_directory: /Grid2Op
88

99
python37:
1010
docker:
11-
- image: python:3.7-buster
11+
- image: python:3.7
1212
python38:
1313
docker:
14-
- image: python:3.8-buster
14+
- image: python:3.8
1515
python39:
1616
docker:
17-
- image: python:3.9-buster
17+
- image: python:3.9
1818
python310:
1919
docker:
20-
- image: python:3.10-buster
20+
- image: python:3.10
2121
python311:
2222
docker:
23-
- image: python:3.11-buster
23+
- image: python:3.11
2424
python312:
2525
docker:
26-
- image: cimg/python:3.12.0
26+
- image: cimg/python:3.12
2727

2828
jobs:
2929
test:
@@ -47,13 +47,17 @@ jobs:
4747
export _GRID2OP_FORCE_TEST=1
4848
cd grid2op/tests/
4949
python3 helper_list_test.py | circleci tests split > /tmp/tests_run
50+
- run:
51+
command: |
52+
source venv_test/bin/activate
53+
pip freeze
5054
- run: cat /tmp/tests_run
5155
- run:
5256
command: |
5357
source venv_test/bin/activate
5458
cd grid2op/tests/
5559
export _GRID2OP_FORCE_TEST=1
56-
python3 -m unittest $(cat /tmp/tests_run)
60+
python3 -m unittest -v $(cat /tmp/tests_run)
5761
5862
install36:
5963
executor: python36
@@ -136,37 +140,28 @@ jobs:
136140
- run:
137141
command: |
138142
source venv_test/bin/activate
139-
python -m pip install -U "numpy>=1.20,<1.21"
140-
python -m pip install -U .[test]
141-
export _GRID2OP_FORCE_TEST=1
142-
grid2op.testinstall
143+
python -m pip install -U "numpy>=1.20,<1.21" "pandas<2.2" "scipy<1.12" numba .[test]
144+
pip freeze
143145
- run:
144-
command: |
146+
command: |
145147
source venv_test/bin/activate
146-
python -m pip install -U "numpy>=1.21,<1.22"
147-
python -m pip install -U .[test]
148148
export _GRID2OP_FORCE_TEST=1
149+
cd /tmp
149150
grid2op.testinstall
150151
- run:
151152
command: |
152153
source venv_test/bin/activate
153-
python -m pip install -U "numpy>=1.22,<1.23"
154+
python -m pip install -U "numpy>=1.24,<1.25" "pandas<2.2" "scipy<1.12" numba
154155
python -m pip install -U .[test]
155-
export _GRID2OP_FORCE_TEST=1
156-
grid2op.testinstall
157156
- run:
158-
command: |
157+
command: |
159158
source venv_test/bin/activate
160-
python -m pip install -U "numpy>=1.23,<1.24"
161-
python -m pip install -U .[test]
162-
export _GRID2OP_FORCE_TEST=1
163-
grid2op.testinstall
159+
pip freeze
164160
- run:
165-
command: |
161+
command: |
166162
source venv_test/bin/activate
167-
python -m pip install -U "numpy>=1.24,<1.25"
168-
python -m pip install -U .[test]
169163
export _GRID2OP_FORCE_TEST=1
164+
cd /tmp
170165
grid2op.testinstall
171166
172167
install39:
@@ -190,56 +185,24 @@ jobs:
190185
- run:
191186
command: |
192187
source venv_test/bin/activate
193-
python -m pip install -U numba
194-
python -m pip install -U .[test]
195-
- run:
196-
command: |
197-
source venv_test/bin/activate
198-
python -m pip install -U "numpy>=1.20,<1.21"
199-
python -m pip install -U .[test]
200-
export _GRID2OP_FORCE_TEST=1
201-
grid2op.testinstall
188+
python -m pip install -U "numpy>=1.20,<1.21" "pandas<2.2" "scipy<1.12" numba .[test]
189+
pip freeze
202190
- run:
203-
command: |
204-
source venv_test/bin/activate
205-
python -m pip install -U "numpy>=1.21,<1.22"
206-
python -m pip install -U .[test]
207-
export _GRID2OP_FORCE_TEST=1
208-
grid2op.testinstall
209-
- run:
210-
command: |
211-
source venv_test/bin/activate
212-
python -m pip install -U "numpy>=1.22,<1.23"
213-
python -m pip install -U .[test]
214-
export _GRID2OP_FORCE_TEST=1
215-
grid2op.testinstall
216-
- run:
217-
command: |
218-
source venv_test/bin/activate
219-
python -m pip install -U "numpy>=1.23,<1.24"
220-
python -m pip install -U .[test]
221-
export _GRID2OP_FORCE_TEST=1
222-
grid2op.testinstall
223-
- run:
224-
command: |
191+
command: |
225192
source venv_test/bin/activate
226-
python -m pip install -U "numpy>=1.24,<1.25"
227-
python -m pip install -U .[test]
228193
export _GRID2OP_FORCE_TEST=1
194+
cd /tmp
229195
grid2op.testinstall
230196
- run:
231197
command: |
232198
source venv_test/bin/activate
233-
python -m pip install -U "numpy>=1.25,<1.26"
234-
python -m pip install -U .[test]
235-
export _GRID2OP_FORCE_TEST=1
236-
grid2op.testinstall
199+
python -m pip install -U "numpy>=1.26,<1.27" "pandas<2.2" "scipy<1.12" numba .[test]
200+
pip freeze
237201
- run:
238-
command: |
202+
command: |
239203
source venv_test/bin/activate
240-
python -m pip install -U "numpy>=1.26,<1.27"
241-
python -m pip install -U .[test]
242204
export _GRID2OP_FORCE_TEST=1
205+
cd /tmp
243206
grid2op.testinstall
244207
245208
install310:
@@ -261,44 +224,24 @@ jobs:
261224
- run:
262225
command: |
263226
source venv_test/bin/activate
264-
python -m pip install -U "numpy>=1.21,<1.22"
265-
python -m pip install -U .[test]
266-
export _GRID2OP_FORCE_TEST=1
267-
grid2op.testinstall
227+
python -m pip install -U "numpy>=1.21,<1.22" "pandas<2.2" "scipy<1.12" numba .[test]
228+
pip freeze
268229
- run:
269-
command: |
270-
source venv_test/bin/activate
271-
python -m pip install -U "numpy>=1.22,<1.23"
272-
python -m pip install -U .[test]
273-
export _GRID2OP_FORCE_TEST=1
274-
grid2op.testinstall
275-
- run:
276-
command: |
277-
source venv_test/bin/activate
278-
python -m pip install -U "numpy>=1.23,<1.24"
279-
python -m pip install -U .[test]
280-
export _GRID2OP_FORCE_TEST=1
281-
grid2op.testinstall
282-
- run:
283-
command: |
230+
command: |
284231
source venv_test/bin/activate
285-
python -m pip install -U "numpy>=1.24,<1.25"
286-
python -m pip install -U .[test]
287232
export _GRID2OP_FORCE_TEST=1
233+
cd /tmp
288234
grid2op.testinstall
289235
- run:
290236
command: |
291237
source venv_test/bin/activate
292-
python -m pip install -U "numpy>=1.25,<1.26"
293-
python -m pip install -U .[test]
294-
export _GRID2OP_FORCE_TEST=1
295-
grid2op.testinstall
238+
python -m pip install -U "numpy>=1.26,<1.27" "pandas<2.2" "scipy<1.12" numba .[test]
239+
pip freeze
296240
- run:
297-
command: |
241+
command: |
298242
source venv_test/bin/activate
299-
python -m pip install -U "numpy>=1.26,<1.27"
300-
python -m pip install -U .[test]
301243
export _GRID2OP_FORCE_TEST=1
244+
cd /tmp
302245
grid2op.testinstall
303246
304247
install311:
@@ -316,34 +259,27 @@ jobs:
316259
command: |
317260
source venv_test/bin/activate
318261
python -m pip install -U pip setuptools wheel
319-
python -m pip install -U numba
320262
- run:
321263
command: |
322264
source venv_test/bin/activate
323-
python -m pip install -U "numpy>=1.23,<1.24"
324-
python -m pip install -U .[test]
325-
export _GRID2OP_FORCE_TEST=1
326-
grid2op.testinstall
265+
python -m pip install -U "numpy>=1.23,<1.24" "pandas<2.2" "scipy<1.12" numba .[test]
266+
pip freeze
327267
- run:
328-
command: |
268+
command: |
329269
source venv_test/bin/activate
330-
python -m pip install -U "numpy>=1.24,<1.25"
331-
python -m pip install -U .[test]
332270
export _GRID2OP_FORCE_TEST=1
271+
cd /tmp
333272
grid2op.testinstall
334273
- run:
335274
command: |
336275
source venv_test/bin/activate
337-
python -m pip install -U "numpy>=1.25,<1.26"
338-
python -m pip install -U .[test]
339-
export _GRID2OP_FORCE_TEST=1
340-
grid2op.testinstall
276+
python -m pip install -U "numpy>=1.26,<1.27" "pandas<2.2" "scipy<1.12" numba .[test]
277+
pip freeze
341278
- run:
342-
command: |
279+
command: |
343280
source venv_test/bin/activate
344-
python -m pip install -U "numpy>=1.26,<1.27"
345-
python -m pip install -U .[test]
346281
export _GRID2OP_FORCE_TEST=1
282+
cd /tmp
347283
grid2op.testinstall
348284
install312:
349285
executor: python312
@@ -364,9 +300,13 @@ jobs:
364300
- run:
365301
command: |
366302
source venv_test/bin/activate
367-
python -m pip install -U "numpy>=1.26,<1.27"
368-
python -m pip install -U .[test]
303+
python -m pip install -U "numpy>=1.26,<1.27" "pandas<2.2" "scipy<1.12" .[test]
304+
pip freeze
305+
- run:
306+
command: |
307+
source venv_test/bin/activate
369308
export _GRID2OP_FORCE_TEST=1
309+
cd /tmp
370310
grid2op.testinstall
371311
372312
workflows:
@@ -380,4 +320,4 @@ workflows:
380320
- install39
381321
- install310
382322
- install311
383-
# - install312 # failing because of dependencies of numba, torch etc. Tired of it so ignoring it !
323+
- install312

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -397,6 +397,8 @@ grid2op/tests/test_failing_simulator.txt
397397
old_pyproject.toml
398398
pp_bug_gen_alone.py
399399
test_dunder.py
400+
grid2op/tests/test_fail_ci.txt
401+
saved_multiepisode_agent_36bus_DN_4/
400402

401403
# profiling files
402404
**.prof

.readthedocs.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
1-
version: 2
1+
version: "2"
2+
3+
build:
4+
os: "ubuntu-22.04"
5+
tools:
6+
python: "3.10"
7+
8+
sphinx:
9+
configuration: docs/conf.py
210

311
python:
4-
version: 3.8
512
install:
613
- method: pip
714
path: .

CHANGELOG.rst

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,29 @@ Change Log
3232
- [???] properly model interconnecting powerlines
3333

3434

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

MANIFEST.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
recursive-include grid2op/data *.bz2 *.json *.zip prods_charac.csv *.py .multimix storage_units_charac.csv start_datetime.info time_interval.info
1+
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
22
global-exclude */__pycache__/*
33
global-exclude *.pyc
44
global-exclude grid2op/data_test/*

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,10 @@ but it is currently not on our priorities.
312312
A quick fix that is known to work include to set the `experimental_read_from_local_dir` when creating the
313313
environment with `grid2op.make(..., experimental_read_from_local_dir=True)` (see doc for more information)
314314

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

317321
Provided that Grid2Op is installed *from source*:

docs/action.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ you want to perform on the grid. For more information you can consult the help o
8585

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

9090
.. _action-module-examples:
9191

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
author = 'Benjamin Donnot'
2323

2424
# The full version, including alpha/beta/rc tags
25-
release = '1.9.7'
25+
release = '1.9.8.dev1'
2626
version = '1.9'
2727

2828

docs/environment.rst

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

106106
.. _environment-module-chronics-info:
107107

0 commit comments

Comments
 (0)