Merge unstable into main: extension framework, extensions, and fixes - #369
Merge unstable into main: extension framework, extensions, and fixes#369jdecarolis wants to merge 80 commits into
Conversation
Sync unstable to main
avoids string interpolation just in case
* [pre-commit.ci] pre-commit autoupdate updates: - [github.com/astral-sh/uv-pre-commit: 0.11.19 → 0.11.21](astral-sh/uv-pre-commit@0.11.19...0.11.21) - [github.com/astral-sh/ruff-pre-commit: v0.15.16 → v0.15.17](astral-sh/ruff-pre-commit@v0.15.16...v0.15.17) * [pre-commit.ci] pre-commit autoupdate updates: - [github.com/astral-sh/uv-pre-commit: 0.11.21 → 0.11.23](astral-sh/uv-pre-commit@0.11.21...0.11.23) - [github.com/astral-sh/ruff-pre-commit: v0.15.17 → v0.15.18](astral-sh/ruff-pre-commit@v0.15.17...v0.15.18) * Load early retirements from previous planning periods Signed-off-by: Davey Elder <iandavidelder@gmail.com> * Adjust existing capacity for past early retirement in myopic Signed-off-by: Davey Elder <iandavidelder@gmail.com> * Fix handling of existing capacity for p0 Signed-off-by: Davey Elder <iandavidelder@gmail.com> * Pull lifetimes data for previously retired existing capacities for accounting purposes Signed-off-by: Davey Elder <iandavidelder@gmail.com> * Actually load growthrate constraints Signed-off-by: Davey Elder <iandavidelder@gmail.com> * Add a broad stress test for myopic that includes survival curves, early retirement, and growth rate constraints all together Signed-off-by: Davey Elder <iandavidelder@gmail.com> * Update test set hashes Signed-off-by: Davey Elder <iandavidelder@gmail.com> * Improve custom loader filtering for lifetime data Signed-off-by: Davey Elder <iandavidelder@gmail.com> * Update existing capacity check to specifically look for tiny dropped capacities Signed-off-by: Davey Elder <iandavidelder@gmail.com> * Try to fix python 3.12 type error Signed-off-by: Davey Elder <iandavidelder@gmail.com> * Check if output retirement table exists Signed-off-by: Davey Elder <iandavidelder@gmail.com> --------- Signed-off-by: Davey Elder <iandavidelder@gmail.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Signed-off-by: Davey Elder <iandavidelder@gmail.com>
Signed-off-by: Davey Elder <iandavidelder@gmail.com>
Signed-off-by: Davey Elder <iandavidelder@gmail.com>
Signed-off-by: Davey Elder <iandavidelder@gmail.com>
The v3->v4 migrator routed TechInputSplit and TechOutputSplit rows to the seasonal v4 tables (limit_tech_input_split / limit_tech_output_split) unconditionally. Temoa's seasonal split constraints only apply to non-annual techs, so every annual tech's split constraint silently disappeared from migrated models: the rows exist in the DB but no constraint is built from them. Fix: partition split rows by the tech's Technology.annual flag (with a tech_annual table fallback for older v3 databases) and route annual techs' rows to limit_tech_input_split_annual / limit_tech_output_split_annual. The seasonal and annual targets are column-identical, so the existing row transformation applies to both. Found migrating the Open Energy Outlook 9-region US database: 13,313 of 15,369 TechInputSplit rows belonged to annual techs (transport fuel blends, industrial fuel mixes) and were dropped from the model, letting e.g. Fischer-Tropsch synfuel run without its mandated hydrogen input. Adds regression coverage: both mock datasets now carry a seasonal-tech and an annual-tech split row, asserting placement after migration. The new v3-schema assertions fail without this fix.
Signed-off-by: Davey Elder <iandavidelder@gmail.com>
Signed-off-by: Davey Elder <iandavidelder@gmail.com>
…P models Signed-off-by: Davey Elder <iandavidelder@gmail.com>
Signed-off-by: Davey Elder <iandavidelder@gmail.com>
Signed-off-by: Davey Elder <iandavidelder@gmail.com>
Signed-off-by: Davey Elder <iandavidelder@gmail.com>
Signed-off-by: Davey Elder <iandavidelder@gmail.com>
…ctions Signed-off-by: Davey Elder <iandavidelder@gmail.com>
Signed-off-by: Davey Elder <iandavidelder@gmail.com>
Signed-off-by: Davey Elder <iandavidelder@gmail.com>
Signed-off-by: Davey Elder <iandavidelder@gmail.com>
Signed-off-by: Davey Elder <iandavidelder@gmail.com>
Signed-off-by: Davey Elder <iandavidelder@gmail.com>
Signed-off-by: Davey Elder <iandavidelder@gmail.com>
Signed-off-by: Davey Elder <iandavidelder@gmail.com>
Signed-off-by: Davey Elder <iandavidelder@gmail.com>
Add unit commitment extension
Fix v4 migrator: route annual techs' split rows to the annual split tables
📦 Dependency Canary: Upgrade all packages
Signed-off-by: Davey Elder <iandavidelder@gmail.com>
Temporarily lock pyomo to v6.9.5 due to performance regression
📦 Dependency Canary: Upgrade all packages
Clean incomplete emissions constraint handler. The original code passed (e, emission_limit) as a single tuple argument to logger.warning, when it should be two separate positional args for the %s ... %s formatting in msg to work correctly.
Signed-off-by: Davey Elder <iandavidelder@gmail.com>
Signed-off-by: Davey Elder <iandavidelder@gmail.com>
Signed-off-by: Davey Elder <iandavidelder@gmail.com>
Signed-off-by: Davey Elder <iandavidelder@gmail.com>
📦 Dependency Canary: Upgrade all packages
Fix the programmatic route to running Temoa in README
extensions, migrator/emissions/pyomo fixes, and dependency updates - Add a modular extension framework (#343) and three extensions built on it: discrete capacity (#345), economies of scale (#349), and unit commitment (#350) - Fix v4 migrator routing of annual techs' split rows (#351) - Fix emissions constraint logger.warning arg mismatch (#332) - Temporarily pin pyomo to 6.9.5 to avoid a performance regression (#359) - Rewrite the README's programmatic-usage example for the current TemoaSequencer API (#368) - Roll up ~10 dependency-canary security/dependency updates Resolves conflicts in README.md (took unstable's TemoaSequencer rewrite over main's formatting-only change) and requirements.txt / requirements-dev.txt / uv.lock (regenerated lockfiles after taking unstable's dependency state). Thanks to @idelder (#343, #345, #349, #350, #359, #368), @SutubraResearch (#351), and @DavidLikesLearning (#332) for the PRs rolled up in this merge.
|
Important Review skippedToo many files! This PR contains 136 files, which is 36 over the limit of 100. To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch. Upgrade to a paid plan to raise the limit. This review couldn't start because sufficient usage credits or metered capacity aren't available. Add credits or update usage-based reviews in the billing tab, then retry. ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Team Run ID: ⛔ Files ignored due to path filters (5)
📒 Files selected for processing (136)
You can disable this status message by setting the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
for more information, see https://pre-commit.ci
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
on it: discrete capacity (Add discrete capacity extension #345), economies of scale (Add economies of scale extension #349), and unit
commitment (Add unit commitment extension #350)
TemoaSequencer API (Fix the programmatic route to running Temoa in README #368)
Resolves conflicts in README.md (took unstable's TemoaSequencer
rewrite over main's formatting-only change) and requirements.txt /
requirements-dev.txt / uv.lock (regenerated lockfiles after taking
unstable's dependency state).
Thanks to @idelder (#343, #345, #349, #350, #359, #368),
@SutubraResearch (#351), and @DavidLikesLearning (#332) for the PRs
rolled up in this merge.