Skip to content

feat: update all to python3.14#533

Open
LeonHilf wants to merge 2 commits into
mainfrom
feat/update_python_314
Open

feat: update all to python3.14#533
LeonHilf wants to merge 2 commits into
mainfrom
feat/update_python_314

Conversation

@LeonHilf

@LeonHilf LeonHilf commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator

Checklist

Please check if the PR fulfills these requirements:

  • PR Title follows conventional commit messages
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • All commits in this PR are DCO signed-off (see CONTRIBUTING.md)

Does this PR already have an issue describing the problem?

Fixes #

What is the new behavior (if this is a feature change)?

Does this PR introduce a breaking change?

  • Yes
  • No

Signed-off-by: Leonard Hilfrich <Leonard.Hilfrich@50Hertz.com>
Copilot AI review requested due to automatic review settings June 9, 2026 08:09

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the ToOp monorepo to target Python 3.14 across tooling, packaging metadata, and the devcontainer/Docker image, while also updating several core dependencies (notably Pandera, JAX/Equinox/Flax, QDAX, Pandapower) and adjusting code/tests to match the newer APIs.

Changes:

  • Bump Python version metadata/configuration to 3.14 across Sonar, docs, Docker/dev setup, and package requires-python.
  • Update key scientific/optimization dependencies (e.g., JAX/Equinox/Flax, QDAX, Pandera, Pandapower/Numba) and adapt code to API changes (Pandera schemas/fields/checks, Pandapower converter imports, QDAX repertoire/emitter compatibility).
  • Adjust tests and small runtime logic to reflect new behavior (threading order nondeterminism, schema validation, temp path handling, load model fields).

Reviewed changes

Copilot reviewed 46 out of 53 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
sonar-project.properties Update Sonar Python version target.
README.md Update advertised Python version and prerequisites.
pyproject.toml Update root Python requirement/classifiers and CI dependency constraint.
packages/topology_optimizer_pkg/tests/ac/test_ac_scoring_functions.py Make concurrency-related assertion order-insensitive.
packages/topology_optimizer_pkg/src/toop_engine_topology_optimizer/interfaces/models/base_storage.py Adjust SQLModel PK typing for newer SQLModel/Pydantic behavior.
packages/topology_optimizer_pkg/src/toop_engine_topology_optimizer/dc/repertoire/discrete_me_repertoire.py Remove Static typing usage and add select for newer QDAX compatibility.
packages/topology_optimizer_pkg/src/toop_engine_topology_optimizer/dc/ga_helpers.py Add jitted emit override compatible with newer QDAX emitter expectations.
packages/topology_optimizer_pkg/src/toop_engine_topology_optimizer/ac/scoring_functions.py Defensive copy of topology objects when scoring across threads.
packages/topology_optimizer_pkg/pyproject.toml Bump Python requirement and update core optimizer dependencies (QDAX/JAX/SQLModel/etc.).
packages/interfaces_pkg/tests/test_nminus1_definition.py Fix tmp_path_factory usage (no context manager).
packages/interfaces_pkg/tests/test_interface_helpers.py Update Pandera model field declarations and monkeypatching for schema/index tests.
packages/interfaces_pkg/src/toop_engine_interfaces/loadflow_results.py Pandera 0.26 migration: pandas backend import, Field usage, and temporary builtin-check registration.
packages/interfaces_pkg/src/toop_engine_interfaces/interface_helpers.py Switch to pandera.pandas imports for Pandera 0.26+.
packages/interfaces_pkg/pyproject.toml Bump Python requirement and update Pandera/Numpy/Pandapower/Jaxtyping versions.
packages/importer_pkg/tests/test_init_pandera_fix.py Update Pandera patch test guard to new version ceiling.
packages/importer_pkg/tests/pypowsybl_import/test_preprocessing.py Update constant-Z load expectations to new Pandapower column naming.
packages/importer_pkg/tests/pandapower/test_pp_masks.py Reference mask annotations from the type rather than instance.
packages/importer_pkg/tests/network_graph/test_data_classes.py Tighten schema error assertion to check for the failing field.
packages/importer_pkg/src/toop_engine_importer/pypowsybl_import/merge_ucte_cgmes/merge_ucte_cgmes.py Pandera field declarations updated for newer Pandera behavior.
packages/importer_pkg/src/toop_engine_importer/pypowsybl_import/contingency_from_file/contingency_file_models.py Pandera Field usage for schema definitions.
packages/importer_pkg/src/toop_engine_importer/pandapower_import/preprocessing.py Support both legacy and new Pandapower constant-Z load column names.
packages/importer_pkg/src/toop_engine_importer/network_graph/network_graph.py Use Pydantic v2 model_fields and safer attribute access for connection info updates.
packages/importer_pkg/src/toop_engine_importer/network_graph/data_classes.py Pandera backend import migration; add custom check for tuple-valued node fields.
packages/importer_pkg/src/toop_engine_importer/contingency_from_power_factory/power_factory_data_class.py Pandera backend import migration and builtin-check compatibility registration.
packages/importer_pkg/pyproject.toml Bump Python requirement and update Pandapower/Numba + add lxml constraint.
packages/grid_helpers_pkg/tests/conftest.py Update Pandapower Matpower converter import path.
packages/grid_helpers_pkg/src/toop_engine_grid_helpers/powsybl/powsybl_helpers.py Use new Matpower converter import path and call site.
packages/grid_helpers_pkg/src/toop_engine_grid_helpers/pandapower/pandapower_helpers.py Update converter imports and PPC conversion call for newer Pandapower.
packages/grid_helpers_pkg/pyproject.toml Bump Python requirement and update Numpy/Jaxtyping/Pandapower/Numba constraints.
packages/dc_solver_pkg/tests/test_init.py Update Pandera patch test guard to new version ceiling.
packages/dc_solver_pkg/tests/jax/test_inputs.py Extend static information assertions for newly optional dynamic fields.
packages/dc_solver_pkg/src/toop_engine_dc_solver/preprocess/powsybl/powsybl_helpers.py Pandera Field usage updates in schemas.
packages/dc_solver_pkg/src/toop_engine_dc_solver/preprocess/pandapower/pandapower_backend.py Update PPC conversion path and handle new const_* percent columns.
packages/dc_solver_pkg/src/toop_engine_dc_solver/postprocess/realize_assignment.py Make JAX indexing explicit (avoid Python range inside indexed updates).
packages/dc_solver_pkg/src/toop_engine_dc_solver/jax/types.py Remove Static[...] typing in favor of eqx.field(static=True) typing.
packages/dc_solver_pkg/src/toop_engine_dc_solver/jax/contingency_analysis.py Remove Static[...] typing in favor of eqx.field(static=True) typing.
packages/dc_solver_pkg/src/toop_engine_dc_solver/export/dgs_v7_definitions.py Pandera backend import migration + temporary builtin-check compatibility registration.
packages/dc_solver_pkg/pyproject.toml Bump Python requirement and update scientific stack dependencies (JAX/Equinox/Flax/Pandera/etc.).
packages/contingency_analysis_pkg/tests/test_init.py Update Pandera patch test guard to new version ceiling.
packages/contingency_analysis_pkg/src/toop_engine_contingency_analysis/pypowsybl/powsybl_helpers_polars.py Improve null/NaN handling for translated name columns.
packages/contingency_analysis_pkg/src/toop_engine_contingency_analysis/pandapower/pandapower_helpers/schemas.py Pandera backend import migration and builtin-check compatibility registration.
packages/contingency_analysis_pkg/pyproject.toml Bump Python requirement and update Pandera/Numpy/Pandapower/Numba constraints.
docs/index.md Update native setup prerequisites for Python 3.14.
docs/contribution_guide.md Add Python 3.14 native venv instructions/prerequisites.
Dockerfile Switch base image to Python 3.14.x for container build.
.github/copilot-instructions.md Update guidance examples to drop Static[...] typing in favor of eqx.field(static=True).

Comment on lines +56 to +57
"pandapower (>=3.4.0,<4.0.0)",
"equinox (>=0.13.8,<0.14.0)"
Comment on lines +40 to +42
assert tuple(map(int, pandera.__version__.split(".")[:2])) < (0, 27), (
"Remove the temporary Pandera builtin-check registration once Pandera >= 0.27 is supported."
)
Comment on lines +54 to +56
assert tuple(map(int, pandera.__version__.split(".")[:2])) < (0, 27), (
"Remove the temporary Pandera builtin-check registration once Pandera >= 0.27 is supported."
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants