Skip to content

Commit d87c5d1

Browse files
authored
Merge pull request #715 from Grid2op/dev_1.11.1
Upgrade to 1.12.0
2 parents 6aa8500 + 3e0e0a6 commit d87c5d1

File tree

89 files changed

+2485
-802
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

89 files changed

+2485
-802
lines changed

.circleci/config.yml

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

99
python37:
@@ -14,16 +14,19 @@ executors:
1414
- image: python:3.8
1515
python39:
1616
docker:
17-
- image: python:3.9
17+
- image: cimg/python:3.9
1818
python310:
1919
docker:
20-
- image: python:3.10
20+
- image: cimg/python:3.10
2121
python311:
2222
docker:
23-
- image: python:3.11
23+
- image: cimg/python:3.11
2424
python312:
2525
docker:
2626
- image: cimg/python:3.12
27+
python313:
28+
docker:
29+
- image: cimg/python:3.13
2730

2831
jobs:
2932
test:
@@ -203,10 +206,6 @@ jobs:
203206
resource_class: small
204207
steps:
205208
- checkout
206-
- run:
207-
command: |
208-
apt-get update
209-
apt-get install -y coinor-cbc
210209
- run: python -m pip install virtualenv
211210
- run: python -m virtualenv venv_test
212211
- run:
@@ -230,10 +229,6 @@ jobs:
230229
resource_class: small
231230
steps:
232231
- checkout
233-
- run:
234-
command: |
235-
apt-get update
236-
apt-get install -y coinor-cbc
237232
- run: python -m pip install virtualenv
238233
- run: python -m virtualenv venv_test
239234
- run:
@@ -253,24 +248,22 @@ jobs:
253248
python -m unittest grid2op/tests/test_basic_env_ls.py
254249
255250
test_chronix2grid:
256-
executor: python310 # needs to be 38: whl of lightsim were not released for 3.10 at the time
251+
executor: python310
257252
resource_class: small
258253
steps:
259254
- checkout
260-
- run:
261-
command: |
262-
apt-get update
263-
apt-get install -y coinor-cbc
255+
- run: sudo apt update
256+
- run: sudo apt install -y coinor-cbc
264257
- run: python -m pip install virtualenv
265258
- run: python -m virtualenv venv_test
266259
- run:
267260
command: |
268261
source venv_test/bin/activate
269-
python -m pip install -U pip setuptools wheel "numpy==1.26.4"
262+
python -m pip install -U pip setuptools wheel
270263
- run:
271264
command: |
272265
source venv_test/bin/activate
273-
python -m pip install -e .[chronix2grid] "linopy==0.3.8" "scs==3.2.4.post1" "ecos==2.0.13" "pillow==10.3.0" "numpy==1.26.4" "xarray==2024.3.0"
266+
python -m pip install -e .[chronix2grid]
274267
pip freeze
275268
- run:
276269
command: |
@@ -283,33 +276,52 @@ jobs:
283276
resource_class: small
284277
steps:
285278
- checkout
286-
- run:
287-
command: |
288-
apt-get update
289-
apt-get install -y coinor-cbc
290279
- run: python -m pip install virtualenv
291280
- run: python -m virtualenv venv_test
292281
- run:
293282
command: |
294283
export _GRID2OP_FORCE_TEST=1
295284
source venv_test/bin/activate
296-
python -m pip install -U pip setuptools wheel "numpy>=1.20,<1.21" "pandas<2.2" "scipy==1.10.1" "pillow<10.4.0" numba
285+
python -m pip install -U pip setuptools wheel numba
297286
python -m pip uninstall -y grid2op
298287
- run:
299-
command: | # issue with previous more simple install, so I fix some versions
288+
command: | # oldest numpy version (supported by python version) is also newest supported by grid2op
300289
source venv_test/bin/activate
301-
python -m pip install "numpy>=1.20,<1.21" "pandas<2.2" "scipy==1.10.1" numba .
290+
python -m pip install "numpy>=2,<2.1" .
302291
pip freeze
303292
- run:
304293
command: |
305294
source venv_test/bin/activate
306295
export _GRID2OP_FORCE_TEST=1
307296
cd /tmp
308297
grid2op.testinstall
298+
299+
install310:
300+
executor: python310
301+
resource_class: small
302+
steps:
303+
- checkout
304+
- run: python -m pip install virtualenv
305+
- run: python -m virtualenv venv_test
309306
- run:
310307
command: |
311308
source venv_test/bin/activate
312-
python -m pip install "numpy>=1.26,<1.27" "pandas<2.2" "scipy<1.12" numba "pillow<10.4.0"
309+
python -m pip install -U pip setuptools wheel
310+
- run:
311+
command: | # oldest numpy version >= 2 supported by python 3.10
312+
source venv_test/bin/activate
313+
python -m pip install -U "numpy>=2,<2.1" numba .
314+
pip freeze
315+
- run:
316+
command: |
317+
source venv_test/bin/activate
318+
export _GRID2OP_FORCE_TEST=1
319+
cd /tmp
320+
grid2op.testinstall
321+
- run:
322+
command: | # most recent numpy version
323+
source venv_test/bin/activate
324+
python -m pip install -U numpy numba .
313325
pip freeze
314326
- run:
315327
command: |
@@ -318,26 +330,21 @@ jobs:
318330
cd /tmp
319331
grid2op.testinstall
320332
321-
install310:
322-
executor: python310
333+
install311:
334+
executor: python311
323335
resource_class: small
324336
steps:
325337
- checkout
326-
- run:
327-
command: |
328-
apt-get update
329-
apt-get install -y coinor-cbc
330338
- run: python -m pip install virtualenv
331339
- run: python -m virtualenv venv_test
332340
- run:
333341
command: |
334342
source venv_test/bin/activate
335343
python -m pip install -U pip setuptools wheel
336-
python -m pip install -U numba
337344
- run:
338-
command: |
345+
command: | # oldest numpy version >= 2 supported by python 3.11
339346
source venv_test/bin/activate
340-
python -m pip install -U "numpy>=1.21,<1.22" "pandas<2.2" "scipy<1.12" numba .
347+
python -m pip install -U "numpy>=2,<2.1" numba .
341348
pip freeze
342349
- run:
343350
command: |
@@ -346,36 +353,31 @@ jobs:
346353
cd /tmp
347354
grid2op.testinstall
348355
- run:
349-
command: |
356+
command: | # most recent numpy version
350357
source venv_test/bin/activate
351-
python -m pip install -U "numpy>=1.26,<1.27" "pandas<2.2" "scipy<1.12" numba
358+
python -m pip install -U numpy numba .
352359
pip freeze
353360
- run:
354361
command: |
355362
source venv_test/bin/activate
356363
export _GRID2OP_FORCE_TEST=1
357364
cd /tmp
358365
grid2op.testinstall
359-
360-
install311:
361-
executor: python311
366+
install312:
367+
executor: python312
362368
resource_class: small
363369
steps:
364370
- checkout
365-
- run:
366-
command: |
367-
apt-get update
368-
apt-get install -y coinor-cbc
369371
- run: python -m pip install virtualenv
370372
- run: python -m virtualenv venv_test
371373
- run:
372374
command: |
373375
source venv_test/bin/activate
374376
python -m pip install -U pip setuptools wheel
375377
- run:
376-
command: |
378+
command: | # oldest numpy version >= 2 supported by python 3.12
377379
source venv_test/bin/activate
378-
python -m pip install -U "numpy>=1.23,<1.24" "pandas<2.2" "scipy<1.12" numba .
380+
python -m pip install -U "numpy>=2,<2.1" numba .
379381
pip freeze
380382
- run:
381383
command: |
@@ -384,36 +386,42 @@ jobs:
384386
cd /tmp
385387
grid2op.testinstall
386388
- run:
387-
command: |
389+
command: | # most recent numpy version
388390
source venv_test/bin/activate
389-
python -m pip install -U "numpy>=1.26,<1.27" "pandas<2.2" "scipy<1.12" numba
391+
python -m pip install -U numpy numba .
390392
pip freeze
391393
- run:
392394
command: |
393395
source venv_test/bin/activate
394396
export _GRID2OP_FORCE_TEST=1
395397
cd /tmp
396398
grid2op.testinstall
397-
install312:
398-
executor: python312
399+
install313:
400+
executor: python313
399401
resource_class: small
400402
steps:
401403
- checkout
402-
- run:
403-
command: |
404-
sudo apt-get update
405-
sudo apt-get install -y coinor-cbc
406404
- run: python -m pip install virtualenv
407405
- run: python -m virtualenv venv_test
408406
- run:
409407
command: |
410408
source venv_test/bin/activate
411409
python -m pip install -U pip setuptools wheel
412-
# python -m pip install -U numba # not on python 3.12 at the moment
413410
- run:
414-
command: |
411+
command: | # oldest numpy version >= 2 supported by python 3.13
412+
source venv_test/bin/activate
413+
python -m pip install -U "numpy>=2.1,<2.2" .
414+
pip freeze
415+
- run:
416+
command: |
417+
source venv_test/bin/activate
418+
export _GRID2OP_FORCE_TEST=1
419+
cd /tmp
420+
grid2op.testinstall
421+
- run:
422+
command: | # most recent numpy version
415423
source venv_test/bin/activate
416-
python -m pip install -U "numpy>=1.26,<1.27" "pandas<2.2" "scipy<1.12" .
424+
python -m pip install -U numpy .
417425
pip freeze
418426
- run:
419427
command: |
@@ -438,6 +446,7 @@ workflows:
438446
- install310
439447
- install311
440448
- install312
449+
- install313
441450

442451
# gather_test_report:
443452
# requires:

.github/workflows/main.yml

Lines changed: 16 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@ jobs:
4343
abi: cp312,
4444
version: '3.12',
4545
}
46-
# - {
47-
# name: cp313, # issue with pandapower atm
48-
# abi: cp313,
49-
# version: '3.13',
50-
# }
46+
- {
47+
name: cp313, # issue with pandapower atm
48+
abi: cp313,
49+
version: '3.13',
50+
}
5151

5252
steps:
5353

@@ -118,7 +118,7 @@ jobs:
118118
}
119119
- {
120120
name: windows,
121-
os: windows-2019,
121+
os: windows-2022,
122122
}
123123
python:
124124
- {
@@ -141,10 +141,10 @@ jobs:
141141
name: cp312,
142142
version: '3.12',
143143
}
144-
# - { # issue with pandapower atm
145-
# name: cp313,
146-
# version: '3.13',
147-
# }
144+
- { # issue with pandapower atm
145+
name: cp313,
146+
version: '3.13',
147+
}
148148

149149
steps:
150150

@@ -197,7 +197,7 @@ jobs:
197197
path: dist/*.tar.gz
198198

199199
auto_class_in_file:
200-
name: Test ${{ matrix.config.name }} OS can handle automatic class generation
200+
name: Test ${{ matrix.config.name }} OS can handle automatic class generation for python ${{matrix.python.version}}
201201
runs-on: ${{ matrix.config.os }}
202202
strategy:
203203
matrix:
@@ -208,7 +208,7 @@ jobs:
208208
}
209209
# - {
210210
# name: windows,
211-
# os: windows-2019,
211+
# os: windows-2022,
212212
# }
213213
- {
214214
name: ubuntu,
@@ -220,8 +220,8 @@ jobs:
220220
version: '3.9',
221221
}
222222
- {
223-
name: cp312,
224-
version: '3.12',
223+
name: cp313,
224+
version: '3.13',
225225
}
226226

227227
steps:
@@ -238,10 +238,7 @@ jobs:
238238

239239
- name: Install Python dependencies
240240
run: |
241-
python -m pip install --upgrade pip
242-
python -m pip install --upgrade wheel
243-
python -m pip install --upgrade setuptools
244-
python -m pip install --upgrade gymnasium "numpy<2"
241+
python -m pip install --upgrade pip wheel setuptools gymnasium
245242
246243
- name: Build wheel
247244
run: python setup.py bdist_wheel
@@ -254,7 +251,7 @@ jobs:
254251
255252
- name: Test the automatic generation of classes in the env folder
256253
run: |
257-
python -m unittest grid2op/tests/automatic_classes.py -f
254+
python -m unittest grid2op/tests/automatic_classes.py -v -f
258255
259256
package:
260257
name: Test install

CHANGELOG.rst

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,22 @@ Native multi agents support:
100100
- add detachment
101101
- add change_bus / set_bus
102102

103+
[1.12.0] - 2025-07-24
104+
--------------------------
105+
- [BREAKING] the `info` returned argument of `env.step(...)` function
106+
does not have the unclear `is_redispatching_illegal` key. This key has been
107+
replaced (without any change to its signification) with `failed_redispatching`
108+
- [FIXED] issue 713
109+
- [FIXED] pandapower 3 compatibility
110+
- [ADDED] compatibility with numpy 2, scipy >= 1.14 and python 3.13
111+
- [ADDED] some examples showing how grid2op can be use to solve some specific
112+
kind of problem (related to N-1 safety and phase shift transformer).
113+
- [IMPROVED] clarity of the `failed_redispatching` key of the `info` returned value
114+
of the `env.step` function (previously called `is_redispatching_illegal` which
115+
was not clear)
116+
- [IMPROVED] way to load back class stored in json format
117+
- [IMPROVED] the way the Observation class can be overriden
118+
103119
[1.11.0] - 2025-04-14
104120
-----------------------
105121
- [BREAKING] Change for `FromMultiEpisodeData` that disables the caching by default

0 commit comments

Comments
 (0)