From 42bcb204649c7bc07e3e19549477a4d13631e171 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 24 Aug 2026 09:28:07 +0000 Subject: [PATCH 1/4] release: v0.2.0 Bump version from 0.1.3 to 0.2.0 in pyproject.toml and uv.lock, and finalize the CHANGELOG for the 0.2.0 release: integer strategy and thermal heuristics, lower_bound()/upper_bound() expression operators, the configurable sequential-mode carry-over-length, the linopy >= 0.9.0 upgrade (Python >= 3.11), the optim-config parsing/validation split, and the fast-heuristic and hybrid port-type fixes that landed since 0.1.3. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01QwP1EdXwXBpTQdTqT7U5yP --- docs/CHANGELOG.md | 39 ++++++++++++++++++++++++++++++++++----- pyproject.toml | 2 +- uv.lock | 2 +- 3 files changed, 36 insertions(+), 7 deletions(-) diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 145c0872..7c8851bd 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -4,11 +4,7 @@ All notable changes to GemsPy are documented here. ## [Unreleased] -### Changed -- **Sequential mode carry-over length can now be controlled by the user through the parameter `carry-over-length` (default: `block-overlap`). This also fixes an incorrect stitching for `block-overlap >= 2`, where the previous hardcoded behaviour pinned block - *N+1*'s first timestep to block *N*'s **last** timestep — a different absolute timestep. -- **linopy upgraded to `>=0.9.0`** - the minimum supported Python version rises - to **3.11** accordingly (linopy 0.9 requires Python >= 3.11). +## [0.2.0] - 2026-08-24 ### Added - **Integer strategy and thermal heuristics** - components can now set @@ -27,7 +23,38 @@ All notable changes to GemsPy are documented here. model-build time; using them inside constraints, binding-constraints, objective contributions, or variable bounds raises a `ValueError`. +### Changed +- **Sequential mode carry-over length is now user-controlled** through the new + `resolution.carry-over-length` parameter (default: `block-overlap`), which + sets how many of the shared leading timesteps of block *N+1* are pinned to + block *N*'s already-solved values. `0` is legal and explicit (blocks overlap + for lag-constraint history, but nothing is pinned); validation requires + `0 <= carry-over-length <= block-overlap` and `0 <= block-overlap < + block-length`. Both `block-overlap` and `carry-over-length` are rejected + outside `sequential-subproblems` mode. This also fixes an incorrect stitching + for `block-overlap >= 2`, where the previous hardcoded behaviour pinned block + *N+1*'s first timestep to block *N*'s **last** timestep — a different + absolute timestep. +- **linopy upgraded to `>=0.9.0`** - the minimum supported Python version rises + to **3.11** accordingly (linopy 0.9 requires Python >= 3.11). +- **`validate_optim_config` moved to `gems_craft.optim_config.validation`** - + optim-config reading (`parsing.py`) and cross-validation (`validation.py`) + are now separate modules. The package-level import + (`from gems_craft.optim_config import validate_optim_config`) is unchanged; + only direct imports from `gems_craft.optim_config.parsing` need updating. + +### Removed +- The unused `models-design/` folder (drawio diagrams), no longer referenced + anywhere in the codebase or the docs. + ### Fixed +- **`fast` thermal heuristic with no minimum power** - `find_min_generation_fast` + no longer short-circuits to all-zero output when `min_power_per_unit` is ~0. + It now always computes `num_units_on` and returns both + `minimum_generation_power` and `maximum_generation_power`, so unit-commitment + information is kept and committed units stay available for production. The + `fast` heuristic's declared outputs gain `maximum_generation_power` + accordingly. - **Standard library parsing now accepts hybrid port-type fields** - `parse_yaml_library` (the standard, non-hybrid parser) no longer rejects `area-connection` / `thermal-capacity-connection` on port-types, so a @@ -38,6 +65,8 @@ All notable changes to GemsPy are documented here. the fields are parsed and validated but otherwise ignored outside hybrid consumers. +--- + ## [0.1.3] - 2026-07-24 ### Added diff --git a/pyproject.toml b/pyproject.toml index 552fdd6f..3a34ad65 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "gemspy" -version = "0.1.3" +version = "0.2.0" description = "Python interpreter for GEMS: modelling and simulation of complex energy systems under uncertainty" readme = "README.md" license = { file = "LICENSE" } diff --git a/uv.lock b/uv.lock index 1538ab23..0e7a115c 100644 --- a/uv.lock +++ b/uv.lock @@ -475,7 +475,7 @@ wheels = [ [[package]] name = "gemspy" -version = "0.1.3" +version = "0.2.0" source = { editable = "." } dependencies = [ { name = "antlr4-python3-runtime" }, From 6541c58ac9b44742e0f7de4c414b6caf21833759 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 24 Aug 2026 09:30:03 +0000 Subject: [PATCH 2/4] changelog: drop models-design removal note from 0.2.0 The deleted models-design/ folder was repo-internal tooling never shipped in the package, so it does not belong in the user-facing changelog. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01QwP1EdXwXBpTQdTqT7U5yP --- docs/CHANGELOG.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 7c8851bd..d04d2c02 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -43,10 +43,6 @@ All notable changes to GemsPy are documented here. (`from gems_craft.optim_config import validate_optim_config`) is unchanged; only direct imports from `gems_craft.optim_config.parsing` need updating. -### Removed -- The unused `models-design/` folder (drawio diagrams), no longer referenced - anywhere in the codebase or the docs. - ### Fixed - **`fast` thermal heuristic with no minimum power** - `find_min_generation_fast` no longer short-circuits to all-zero output when `min_power_per_unit` is ~0. From c6097e0f178e75b5b72114dff409b56c560a85f2 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 24 Aug 2026 09:30:37 +0000 Subject: [PATCH 3/4] changelog: drop fast-heuristic no-pmin entry from 0.2.0 Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01QwP1EdXwXBpTQdTqT7U5yP --- docs/CHANGELOG.md | 7 ------- 1 file changed, 7 deletions(-) diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index d04d2c02..2fb01d34 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -44,13 +44,6 @@ All notable changes to GemsPy are documented here. only direct imports from `gems_craft.optim_config.parsing` need updating. ### Fixed -- **`fast` thermal heuristic with no minimum power** - `find_min_generation_fast` - no longer short-circuits to all-zero output when `min_power_per_unit` is ~0. - It now always computes `num_units_on` and returns both - `minimum_generation_power` and `maximum_generation_power`, so unit-commitment - information is kept and committed units stay available for production. The - `fast` heuristic's declared outputs gain `maximum_generation_power` - accordingly. - **Standard library parsing now accepts hybrid port-type fields** - `parse_yaml_library` (the standard, non-hybrid parser) no longer rejects `area-connection` / `thermal-capacity-connection` on port-types, so a From 5132d527bfadb5693b3243e59dab61eae4e5884b Mon Sep 17 00:00:00 2001 From: "Antoine Oustry, PhD" <58943406+aoustry@users.noreply.github.com> Date: Mon, 24 Aug 2026 11:33:11 +0200 Subject: [PATCH 4/4] Revise CHANGELOG to be more concise --- docs/CHANGELOG.md | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 2fb01d34..ade1c908 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -19,29 +19,18 @@ All notable changes to GemsPy are documented here. expression language, usable in `extra-outputs` and port-field-definitions. Both take a bare variable identifier and return its *current* lower/upper bound post-solve — in particular reflecting mutations made by thermal heuristics (see "Integer strategy and thermal - heuristics" above), which previously had no way to be surfaced in results. Validated at - model-build time; using them inside constraints, binding-constraints, objective - contributions, or variable bounds raises a `ValueError`. + heuristics" above). ### Changed - **Sequential mode carry-over length is now user-controlled** through the new `resolution.carry-over-length` parameter (default: `block-overlap`), which sets how many of the shared leading timesteps of block *N+1* are pinned to - block *N*'s already-solved values. `0` is legal and explicit (blocks overlap - for lag-constraint history, but nothing is pinned); validation requires - `0 <= carry-over-length <= block-overlap` and `0 <= block-overlap < - block-length`. Both `block-overlap` and `carry-over-length` are rejected - outside `sequential-subproblems` mode. This also fixes an incorrect stitching + block *N*'s already-solved values. This also fixes an incorrect stitching for `block-overlap >= 2`, where the previous hardcoded behaviour pinned block *N+1*'s first timestep to block *N*'s **last** timestep — a different absolute timestep. - **linopy upgraded to `>=0.9.0`** - the minimum supported Python version rises to **3.11** accordingly (linopy 0.9 requires Python >= 3.11). -- **`validate_optim_config` moved to `gems_craft.optim_config.validation`** - - optim-config reading (`parsing.py`) and cross-validation (`validation.py`) - are now separate modules. The package-level import - (`from gems_craft.optim_config import validate_optim_config`) is unchanged; - only direct imports from `gems_craft.optim_config.parsing` need updating. ### Fixed - **Standard library parsing now accepts hybrid port-type fields** -