Skip to content

Commit ae47659

Browse files
committed
Merge branch 'dev_1.10.4' of https://github.com/rte-france/grid2op into dev_1.10.4
2 parents a51c825 + 72be14e commit ae47659

File tree

90 files changed

+1289
-395
lines changed

Some content is hidden

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

90 files changed

+1289
-395
lines changed

.github/workflows/main.yml

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ jobs:
1414
container: quay.io/pypa/manylinux2014_x86_64
1515
env:
1616
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
17+
GHA_USE_NODE_20: false
1718
strategy:
1819
matrix:
1920
python:
@@ -42,11 +43,16 @@ jobs:
4243
abi: cp312,
4344
version: '3.12',
4445
}
46+
# - {
47+
# name: cp313, # issue with pandapower atm
48+
# abi: cp313,
49+
# version: '3.13',
50+
# }
4551

4652
steps:
4753

4854
- name: Checkout sources
49-
uses: actions/checkout@v1
55+
uses: actions/checkout@v3
5056
with:
5157
submodules: true
5258

@@ -120,11 +126,15 @@ jobs:
120126
name: cp312,
121127
version: '3.12',
122128
}
129+
# - { # issue with pandapower atm
130+
# name: cp313,
131+
# version: '3.13',
132+
# }
123133

124134
steps:
125135

126136
- name: Checkout sources
127-
uses: actions/checkout@v1
137+
uses: actions/checkout@v3
128138
with:
129139
submodules: true
130140

@@ -159,13 +169,13 @@ jobs:
159169
run: python setup.py sdist
160170

161171
- name: Upload wheel
162-
uses: actions/upload-artifact@v2
172+
uses: actions/upload-artifact@v4
163173
with:
164174
name: grid2op-wheel-${{ matrix.config.name }}-${{ matrix.python.name }}
165175
path: dist/*.whl
166176

167177
- name: Upload source archive
168-
uses: actions/upload-artifact@v2
178+
uses: actions/upload-artifact@v4
169179
if: matrix.config.name == 'darwin' && matrix.python.name == 'cp310'
170180
with:
171181
name: grid2op-sources
@@ -202,7 +212,7 @@ jobs:
202212
steps:
203213

204214
- name: Checkout sources
205-
uses: actions/checkout@v1
215+
uses: actions/checkout@v3
206216
with:
207217
submodules: true
208218

@@ -238,12 +248,12 @@ jobs:
238248

239249
steps:
240250
- name: Download wheels
241-
uses: actions/download-artifact@v2
251+
uses: actions/download-artifact@v4
242252
with:
243253
path: download
244254

245255
- name: Upload wheels
246-
uses: actions/upload-artifact@v2
256+
uses: actions/upload-artifact@v4
247257
with:
248258
name: grid2op-wheels
249259
path: |

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -416,6 +416,7 @@ getting_started/venv_310_ray/
416416
grid2op/tests/venv_test_autoclass/
417417
test_eduardo.py
418418
grid2op/tests/failed_test*
419+
venv_312
419420

420421
# profiling files
421422
**.prof

CHANGELOG.rst

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,26 @@ Next release
6363
- TODO in multi-mix increase the reset options with the mix the user wants
6464
- TODO L2RPN scores as reward (sum loads after the game over and have it in the final reward)
6565
- TODO on CI: test only gym, only gymnasium and keep current test for both gym and gymnasium
66+
- TODO work on the reward class (see https://github.com/rte-france/Grid2Op/issues/584)
6667

67-
[1.10.4] - 2024-xx-yy
68+
69+
[1.10.4] - 2024-10-14
6870
-------------------------
71+
- [FIXED] an issue in the backend: if the backend failed to be
72+
created the `_grid` attribute was set to `None` and not set back to
73+
- [FIXED] the `self.skip_if_needed()` was missing for one of the test suite.
74+
- [FIXED] an error in the descirption of the `educ_case14_storage` environment
75+
(wrong sign for the slack generator)
76+
- [FIXED] the environment would not load in case of an incorrect "layout.json"
77+
instead of raising a warning.
78+
- [FIXED] some issue with gym_compat module for "newest" version of
79+
gymnasium (1.0.0)
80+
- [FIXED] github ci (v1 and v2 artifact are now deprecated)
81+
- [ADDED] a code of conduct from github
82+
- [ADDED] a "CONTRIBUTING.md" files (instead of having contribution instructions
83+
in the readme)
84+
- [ADDED] numpy 2 support (now that pandapower allows it)
85+
- [IMPROVED] error message when forecasts are not correctly set-up
6986

7087

7188
[1.10.3] - 2024-07-12

CODE_OF_CONDUCT.md

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
We as members, contributors, and leaders pledge to make participation in our
6+
community a harassment-free experience for everyone, regardless of age, body
7+
size, visible or invisible disability, ethnicity, sex characteristics, gender
8+
identity and expression, level of experience, education, socio-economic status,
9+
nationality, personal appearance, race, religion, or sexual identity
10+
and orientation.
11+
12+
We pledge to act and interact in ways that contribute to an open, welcoming,
13+
diverse, inclusive, and healthy community.
14+
15+
## Our Standards
16+
17+
Examples of behavior that contributes to a positive environment for our
18+
community include:
19+
20+
* Demonstrating empathy and kindness toward other people
21+
* Being respectful of differing opinions, viewpoints, and experiences
22+
* Giving and gracefully accepting constructive feedback
23+
* Accepting responsibility and apologizing to those affected by our mistakes,
24+
and learning from the experience
25+
* Focusing on what is best not just for us as individuals, but for the
26+
overall community
27+
28+
Examples of unacceptable behavior include:
29+
30+
* The use of sexualized language or imagery, and sexual attention or
31+
advances of any kind
32+
* Trolling, insulting or derogatory comments, and personal or political attacks
33+
* Public or private harassment
34+
* Publishing others' private information, such as a physical or email
35+
address, without their explicit permission
36+
* Other conduct which could reasonably be considered inappropriate in a
37+
professional setting
38+
39+
## Enforcement Responsibilities
40+
41+
Community leaders are responsible for clarifying and enforcing our standards of
42+
acceptable behavior and will take appropriate and fair corrective action in
43+
response to any behavior that they deem inappropriate, threatening, offensive,
44+
or harmful.
45+
46+
Community leaders have the right and responsibility to remove, edit, or reject
47+
comments, commits, code, wiki edits, issues, and other contributions that are
48+
not aligned to this Code of Conduct, and will communicate reasons for moderation
49+
decisions when appropriate.
50+
51+
## Scope
52+
53+
This Code of Conduct applies within all community spaces, and also applies when
54+
an individual is officially representing the community in public spaces.
55+
Examples of representing our community include using an official e-mail address,
56+
posting via an official social media account, or acting as an appointed
57+
representative at an online or offline event.
58+
59+
## Enforcement
60+
61+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
62+
reported to the community leaders responsible for enforcement at
63+
.
64+
All complaints will be reviewed and investigated promptly and fairly.
65+
66+
All community leaders are obligated to respect the privacy and security of the
67+
reporter of any incident.
68+
69+
## Enforcement Guidelines
70+
71+
Community leaders will follow these Community Impact Guidelines in determining
72+
the consequences for any action they deem in violation of this Code of Conduct:
73+
74+
### 1. Correction
75+
76+
**Community Impact**: Use of inappropriate language or other behavior deemed
77+
unprofessional or unwelcome in the community.
78+
79+
**Consequence**: A private, written warning from community leaders, providing
80+
clarity around the nature of the violation and an explanation of why the
81+
behavior was inappropriate. A public apology may be requested.
82+
83+
### 2. Warning
84+
85+
**Community Impact**: A violation through a single incident or series
86+
of actions.
87+
88+
**Consequence**: A warning with consequences for continued behavior. No
89+
interaction with the people involved, including unsolicited interaction with
90+
those enforcing the Code of Conduct, for a specified period of time. This
91+
includes avoiding interactions in community spaces as well as external channels
92+
like social media. Violating these terms may lead to a temporary or
93+
permanent ban.
94+
95+
### 3. Temporary Ban
96+
97+
**Community Impact**: A serious violation of community standards, including
98+
sustained inappropriate behavior.
99+
100+
**Consequence**: A temporary ban from any sort of interaction or public
101+
communication with the community for a specified period of time. No public or
102+
private interaction with the people involved, including unsolicited interaction
103+
with those enforcing the Code of Conduct, is allowed during this period.
104+
Violating these terms may lead to a permanent ban.
105+
106+
### 4. Permanent Ban
107+
108+
**Community Impact**: Demonstrating a pattern of violation of community
109+
standards, including sustained inappropriate behavior, harassment of an
110+
individual, or aggression toward or disparagement of classes of individuals.
111+
112+
**Consequence**: A permanent ban from any sort of public interaction within
113+
the community.
114+
115+
## Attribution
116+
117+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118+
version 2.0, available at
119+
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
120+
121+
Community Impact Guidelines were inspired by [Mozilla's code of conduct
122+
enforcement ladder](https://github.com/mozilla/diversity).
123+
124+
[homepage]: https://www.contributor-covenant.org
125+
126+
For answers to common questions about this code of conduct, see the FAQ at
127+
https://www.contributor-covenant.org/faq. Translations are available at
128+
https://www.contributor-covenant.org/translations.

CONTRIBUTING.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Contribution
2+
3+
We welcome contributions from everyone.
4+
5+
If you want to contribute, a good starting point is to get in touch with us through:
6+
- github (discussion, issues or pull-request)
7+
- the project [discord](https://discord.gg/cYsYrPT)
8+
- mail (see current corresponding author from the grid2op package on pypi here https://pypi.org/project/Grid2Op/)
9+
10+
Contribution can take different forms:
11+
12+
- reporting bugs
13+
- improving the documentation
14+
- improving the code examples (notebooks or example in the doc)
15+
- fixing some reported issues (for example at https://github.com/rte-france/Grid2Op/issues )
16+
- adding a new functionality to grid2op (or increase its speed)
17+
- extend grid2op
18+
19+
# What to do ?
20+
21+
For smaller changes (including, but not limited to the reporting of a bug or a contribution to the explanotory notebooks or the documentations)
22+
a simple "pull request" with your modifications by detailing what you had in mind and the goal of your changes.
23+
24+
In case of a major change (or if you have a doubt on what is "a small change"), please open an issue first
25+
to discuss what you would like to change and then follow as closely as possible the guidelines below. This is to ensure
26+
first that no other contribution is this direction is being currently made but also to make sure that it
27+
does not conflicts with some core ideas of the project.
28+
29+
# Guidelines for contributing to the codebase
30+
31+
For larger contributions, you can follow the given :
32+
33+
1. fork the repository located at <https://github.com/rte-france/Grid2Op>
34+
2. synch your fork with the "latest developement branch of grid2op". For example, if the latest grid2op release
35+
on pypi is `1.10.3` you need to synch your repo with the branch named `dev_1.10.4` or `dev_1.11.0` (if
36+
the branch `dev_1.10.4` does not exist). It will be the highest number in the branches `dev_*` on
37+
grid2op official github repository.
38+
3. implement your functionality / code your modifications, add documentation or any kind of contribution
39+
4. make sure to add tests and documentation if applicable
40+
5. once it is developed, synch your repo with the last development branch again (see point 2 above) and
41+
make sure to solve any possible conflicts
42+
6. write a pull request and make sure to target the right branch (the "last development branch")
43+
44+
# When will it be merged ?
45+
46+
A contribution will be merged once approved by the maintainers (this is why it is recommended to first
47+
get in touch with the team)
48+
49+
Code in the contribution should pass all the current tests, have some dedicated tests for the new feature (if applicable)
50+
and documentation (if applicable).
51+
52+
If you contribute to some grid2op notebooks, please make sure to "clear all outputs"
53+
before making the pull request.
54+
55+
New contributions should respect the "**Code of Conduct**" of grid2op.

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,11 @@ For example, the "getting started" notebooks referenced some pages of the help.
262262

263263
## Contributing
264264

265+
Please consult the "CONTRIBUTING.md" file for extra information. This is a summary and
266+
in case of conflicting instructions, follow the one given in the `CONTRIBUTING.md` file
267+
and discard these ones.
268+
269+
265270
We welcome contributions from everyone. They can take the form of pull requests for smaller changed.
266271
In case of a major change (or if you have a doubt on what is "a small change"), please open an issue first
267272
to discuss what you would like to change.
@@ -305,6 +310,8 @@ The complete test suit is run on linux with the latest numpy version on python 3
305310

306311
### Known issues
307312

313+
314+
#### Multi processing
308315
Due to the underlying behaviour of the "multiprocessing" package on windows based python versions,
309316
the "multiprocessing" of the grid2op "Runner" is not supported on windows. This might change in the future,
310317
but it is currently not on our priorities.
@@ -316,6 +323,11 @@ Sometimes, on some configuration (python version) we do not recommend to use gri
316323
If you encounter any trouble, please downgrade to pandas<2.2. This behaviour occured in our continuous
317324
integration environment for python >=3.9 but could not be reproduced locally.
318325

326+
#### python 3.11
327+
Some version of grid2op (*eg* 1.6.3) are not compatible with python 3.10 or 3.11.
328+
329+
Either use python version 3.8 or 3.9 or upgrade grid2op (1.6.5 works) if that is the case.
330+
319331
### Perform tests locally
320332

321333
Provided that Grid2Op is installed *from source*:

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.10.3'
25+
release = '1.10.4.dev1'
2626
version = '1.10'
2727

2828

docs/data_pipeline.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@ Results are reported in the table below:
5555
============================== ================ ===================
5656
Method used memory footprint time to perform (s)
5757
============================== ================ ===================
58-
Nothing (see `Basic Usage`_) low 44.6
59-
set_chunk (see `Chunk size`_) ultra low 26.8
60-
`MultifolderWithCache`_ high 11.0
58+
Nothing (see Basic Usage ) low 44.6
59+
set_chunk (see `Chunk size`_ ) ultra low 26.8
60+
`MultifolderWithCache`_ high 11.0
6161
============================== ================ ===================
6262

6363
As you can see, the default usage uses relatively little memory but takes a while to compute (almost 45s to perform

docs/developer.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
.. toctree::
2+
:maxdepth: 1
3+
4+
developer/env_content
5+
developer/create_an_environment
6+
developer/createbackend
7+
8+
.. include:: final.rst

docs/create_an_environment.rst renamed to docs/developer/create_an_environment.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
.. |l2rpn_case14_sandbox_layout| image:: ./img/l2rpn_case14_sandbox_layout.png
2-
.. |R2_full_grid| image:: ./img/R2_full_grid.png
3-
.. |l2rpn_neurips_2020_track1_layout| image:: ./img/l2rpn_neurips_2020_track1_layout.png
4-
.. |l2rpn_neurips_2020_track2_layout| image:: ./img/l2rpn_neurips_2020_track2_layout.png
5-
.. |l2rpn_wcci_2022_layout| image:: ./img/l2rpn_wcci_2022_layout.png
1+
.. |l2rpn_case14_sandbox_layout| image:: ../img/l2rpn_case14_sandbox_layout.png
2+
.. |R2_full_grid| image:: ../img/R2_full_grid.png
3+
.. |l2rpn_neurips_2020_track1_layout| image:: ../img/l2rpn_neurips_2020_track1_layout.png
4+
.. |l2rpn_neurips_2020_track2_layout| image:: ../img/l2rpn_neurips_2020_track2_layout.png
5+
.. |l2rpn_wcci_2022_layout| image:: ../img/l2rpn_wcci_2022_layout.png
66

77

88
Possible workflow to create an environment from existing time series

0 commit comments

Comments
 (0)