Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ jobs:
strategy:
matrix:
python:
- {
name: cp38,
abi: cp38,
version: '3.8',
}
# - {
# name: cp38,
# abi: cp38,
# version: '3.8',
# }
- {
name: cp39,
abi: cp39,
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,9 @@ Native multi agents support:
--------------------
- [FIXED] license issues in the documentation
- [IMPROVED] tests splitting to reduce the duration on circle ci
- [IMPROVED] handling of redispatching as a separate module now
(grid2op/Environment/dispatch)
- [IMPROVED] remove the use of "assert" block in the main codebase

[1.12.4] - 2026-04-28
----------------------
Expand Down
2 changes: 1 addition & 1 deletion grid2op/Chronics/fromNPY.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@
"""
MULTI_CHRONICS = False

def __init__(

Check failure on line 119 in grid2op/Chronics/fromNPY.py

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Refactor this function to reduce its Cognitive Complexity from 16 to the 15 allowed.

See more on https://sonarcloud.io/project/issues?id=Grid2op_grid2op&issues=AZ4rIHwEFTun5az_h1YK&open=AZ4rIHwEFTun5az_h1YK&pullRequest=757
self,
load_p: np.ndarray,
load_q: np.ndarray,
Expand Down Expand Up @@ -374,7 +374,7 @@
prod_v,
)

def check_validity(

Check failure on line 377 in grid2op/Chronics/fromNPY.py

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Refactor this function to reduce its Cognitive Complexity from 36 to the 15 allowed.

See more on https://sonarcloud.io/project/issues?id=Grid2op_grid2op&issues=AZ4rIHwEFTun5az_h1YL&open=AZ4rIHwEFTun5az_h1YL&pullRequest=757
self, backend: Optional["Backend"]
) -> None:
if self._load_p.shape[0] != self._load_q.shape[0]:
Expand All @@ -386,7 +386,7 @@
raise ChronicsError("Loads P and gen v (as it is provided) must have the same number of timesteps / rows")

if self.hazards is not None:
if self.hazards.shape[1] != self.n_line:

Check warning on line 389 in grid2op/Chronics/fromNPY.py

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Merge this if statement with the enclosing one.

See more on https://sonarcloud.io/project/issues?id=Grid2op_grid2op&issues=AZ4rIHwEFTun5az_h1YJ&open=AZ4rIHwEFTun5az_h1YJ&pullRequest=757
raise ChronicsError("Loads P and hazards (as it is provided) must have the same number of timesteps / rows")

if self.maintenance is not None:
Expand Down Expand Up @@ -417,7 +417,7 @@
if self._prod_p.shape[0] != self._forecasts._prod_p.shape[0]:
raise ChronicsError("self._prod_p.shape[0] != self._forecasts._prod_p.shape[0]")
if self._prod_v is not None and self._forecasts._prod_v is not None:
if self._prod_v.shape[0] == self._forecasts._prod_v.shape[0]:
if self._prod_v.shape[0] != self._forecasts._prod_v.shape[0]:
raise ChronicsError("self._prod_v.shape[0] != self._forecasts._prod_v.shape[0]")
self._forecasts.check_validity(backend=backend)

Expand Down
Loading
Loading