Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
Squash of the remove-deprecated-api branch. Removes everything that outlived its promised removal deadline (announced for v6/v7): - Optimization / SegmentedOptimization / Results classes - FlowSystem.sel/isel/resample/coords, plot_network and the network app wrappers, topology.plot_legacy() and the pyvis renderer (pyvis dependency dropped) - normalize_weights parameter, the deprecated-kwarg rename bridge, from_old_results(), tests/deprecated and the deprecated_api marker Kept: FlowSystem.from_old_dataset() + io conversion helpers as the supported pre-v5 file migration path, with real-file regression tests (sunset: v9). Adds docs/user-guide/migration-guide-v8.md and the CHANGELOG Unreleased section. BREAKING CHANGE: see the v8 migration guide for the complete removed-> replacement table. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Squash of the element-data-classes work rebased onto the v8 removals.
Batched/vectorized model building — up to 67x faster for large systems:
type-level FlowsModel/StoragesModel/BusesModel replace per-element loops,
*Data containers pre-compute element parameters as element-dimensioned
DataArrays, variables use linopy masks, and the solution uses batched
naming ('flow|rate' with a flow dim instead of per-element variables).
v7 compatibility layer (CONFIG.Legacy.solution_access, default on for the
v8 transition, sunset v9):
- LegacySolutionWrapper translates old solution keys (flows, storages,
effects, component status family) with DeprecationWarnings attributed to
user code; membership checks translate too
- LegacyElementAccess keeps Dataset-style stats patterns working:
flow_rates['Boiler(Q_th)'], .items(), .data_vars
- verified against real v7 result files: load, raw access and re-optimize
work; stats accessors need one re-optimize
Also: clustered-storage investment effects fixed (dead collect_effects path),
intercluster sizes included in stats.sizes, docs notebooks adapted to the
batched idioms, expansion machinery reconciled with the tsam_xarray world.
BREAKING CHANGE: solution and linopy variables use batched names; statistics
accessors return element-dimensioned DataArrays. The legacy access layer
bridges common v7 patterns during the transition.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
544K of tests that never ran (ignored via addopts since the accessor redesign). The v8 branch is the place to stop carrying them. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The post-solve validation in _create_effects_dataset compared ds[effect].sum(...) against solution[label] via np.allclose on the raw .values. When the two arrays carry the same dims in a different order -- e.g. a clustered system expanded back yields (scenario, period) while the computed total is (period, scenario) -- numpy cannot broadcast (3,2) against (2,3) and raises ValueError, turning a soft warning into a hard crash. Align the two label-aware before comparing: warn on a genuine dimension-set mismatch, otherwise transpose solution[label] to the computed dim order. Applies to both copies of the check (StatisticsAccessor and Results). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
# Conflicts: # flixopt/results.py # flixopt/statistics_accessor.py # tests/test_effects_dataset_validation.py
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
main → v8 sync after #746 is done: merged main at bc18a54 (includes #745/#746), reverted the revert (06eddd7) so #739 stays on v8, and adapted the new clustered-roundtrip test from main to the batched stats API (a7df344). 🤖 Generated with Claude Code |
What this is
The
v8integration branch — the collection point for every breaking change destined for v8.0.0. Policy: main stays fully v7-compatible (see #746); anything breaking lands here via PRs based onv8, and main → v8 syncs keep it current. This PR is the final gate: one review, one merge, one v8.0.0 release.Already collected
LegacySolutionWrapper,LegacyElementAccess, default-on with DeprecationWarnings)tests/supersededremoval (harsh-cleanup)Still to collect
label→id, addIdList[T], redesignFlowconstructor #610 —label→idrename,IdList[T], Flow constructor redesign (restack ontov8)from_old_dataset) — currently kept with real-file regression tests, scheduled for v9; the harsh option is dropping it hereLegacy.solution_accesssunset (v9)Sync discipline
Full suite on
v8: 1454 passed, 0 failed; all fast docs notebooks execute.🤖 Generated with Claude Code