diff --git a/docs/demos/connecting_new_consumer.ipynb b/docs/demos/connecting_new_consumer.ipynb index 7a22c293..4e537fcb 100644 --- a/docs/demos/connecting_new_consumer.ipynb +++ b/docs/demos/connecting_new_consumer.ipynb @@ -73,8 +73,9 @@ "\n", "grid.set_feeder_ids()\n", "\n", - "grid.node.x_coor = np.random.uniform(100, 500, len(grid.node))\n", - "grid.node.y_coor = np.random.uniform(100, 500, len(grid.node))" + "rng = np.random.default_rng()\n", + "grid.node.x_coor = rng.uniform(100, 500, len(grid.node))\n", + "grid.node.y_coor = rng.uniform(100, 500, len(grid.node))" ] }, { @@ -250,7 +251,7 @@ "source": [ "for _ in range(10):\n", " new_consumer, new_consumer_load = create_new_consumer_arrays(\n", - " 10_500, np.random.uniform(0, 500), np.random.uniform(0, 500), 1_000_000, 200_000\n", + " 10_500, rng.uniform(0, 500), rng.uniform(0, 500), 1_000_000, 200_000\n", " )\n", " connect_new_consumer(grid, new_consumer, new_consumer_load)\n", "update_grid(grid)\n", diff --git a/pyproject.toml b/pyproject.toml index aad9396e..e277d0ec 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -115,8 +115,49 @@ select = [ # "SIM", # isort "I", - # Numpy 2.0 downstream : https://numpy.org/devdocs/numpy_2_0_migration_guide.html - "NPY201", + "YTT", + "BLE", + "PERF", + "Q", + #"ICN", + #"ISC", + #"G", + #"LOG", + "EXE", + "FA", + "FURB", + "FLY", + "SLOT", + # pylint + #"PL", + # Numpy-specific rules + "NPY", + # Warning + "W", + # use pathlib + #"PTH", + # tidy imports + "TID", + # unused arguments + #"ARG", + # Return + #"RET", + # pie + "PIE", + # self + #"SLF", + # raise + "RSE", + # ruff sepcific rules + #"RUF", + # bandit + #"S", + # boolean positional value in call + #"FBT003", + # raise vanilla args + "TRY002", + # pytest-style + #"PT", ] # Allow fix for all enabled rules (when `--fix`) is provided. fixable = ["ALL"] diff --git a/src/power_grid_model_ds/_core/model/grids/_modify.py b/src/power_grid_model_ds/_core/model/grids/_modify.py index 67516d8c..c9eee775 100644 --- a/src/power_grid_model_ds/_core/model/grids/_modify.py +++ b/src/power_grid_model_ds/_core/model/grids/_modify.py @@ -8,6 +8,7 @@ import numpy as np +from power_grid_model_ds._core.model.arrays.base.array import FancyArray from power_grid_model_ds.arrays import ( ApplianceArray, Branch3Array, @@ -15,8 +16,6 @@ NodeArray, ) -from ..arrays.base.array import FancyArray - if TYPE_CHECKING: from .base import Grid