Skip to content

Commit 31ee87c

Browse files
committed
still trying to coverage grid2op
Signed-off-by: DONNOT Benjamin <[email protected]>
1 parent 97925e3 commit 31ee87c

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ jobs:
8484
if: matrix.python.name == 'cp312'
8585
run: |
8686
python -m pip install --upgrade coverage
87-
python -m pip install --use-wheel --no-index --find-links=dist/ grid2op[test]
87+
python -m pip install --find-links=dist/ grid2op[test]
8888
cd grid2op/tests
8989
coverage run -m unittest discover
9090
coverage xml -i

CHANGELOG.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@ Native multi agents support:
175175
- [ADDED] possibility to set the initial time stamp of the observation in the `env.reset`
176176
kwargs by using `env.reset(..., options={"init datetime": XXX})`
177177
- [ADDED] the `ChangeNothing` time series class now supports forecast
178+
- [ADDED] test coverage on the CI
178179
- [IMPROVED] possibility to set the injections values with names
179180
to be consistent with other way to set the actions (*eg* set_bus)
180181
- [IMPROVED] error messages when creating an action which changes the injections

grid2op/tests/test_BackendAction.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -452,10 +452,11 @@ def test_get_bus_global(self):
452452
assert (type(self.env).local_bus_to_global(local, type(self.env).shunt_to_subid) == global_).all()
453453

454454
# other
455-
for attr_nm in ["storages", "lines_ex", "lines_or", "gens_bus", "loads"]:
456-
global_ = getattr(self.env._backend_action, f"get_{attr_nm}_bus_global")()
457-
local_ = getattr(self.env._backend_action, f"get_{attr_nm}_bus")()
458-
# TODO
455+
for attr_nm, attr_nm_env in zip(["storages", "lines_ex", "lines_or", "gens", "loads"],
456+
["storage", "line_ex", "line_or", "gen", "load"]):
457+
global_ = getattr(self.env._backend_action, f"get_{attr_nm}_bus_global")().values
458+
local_ = getattr(self.env._backend_action, f"get_{attr_nm}_bus")().values
459+
assert (type(self.env).local_bus_to_global(local_, getattr(type(self.env), f"{attr_nm_env}_to_subid")) == global_).all()
459460

460461

461462

0 commit comments

Comments
 (0)