Remove dead code and passthrough properties from data model#609
Merged
FBumann merged 1 commit intofeature/element-data-classesfrom Feb 14, 2026
Merged
Conversation
- StatusData.with_effects_per_active_hour and StatusData.with_effects_per_startup — categorization lists that were never accessed. The actual effect values (effects_per_active_hour, effects_per_startup) are applied correctly via a different path. Removed passthrough properties (components.py — StoragesModel) 9 properties eliminated, replaced with direct self.data.X at all call sites: - with_investment, with_optional_investment, with_mandatory_investment - storages_with_investment, storages_with_optional_investment - optional_investment_ids, mandatory_investment_ids - invest_params, _investment_data Kept investment_ids — it has 4 external callers in optimization.py. Removed passthrough property (elements.py — FlowsModel) - _previous_status → replaced 3 call sites with self.data.previous_states
Contributor
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
StatusDataStoragesModelthat just delegated toself.data.XFlowsModelself.data.XaccessChanges
Dead code removed (
batched.py)StatusData.with_effects_per_active_hourandStatusData.with_effects_per_startup— categorization lists that were never accessed. The actual effect values (effects_per_active_hour,effects_per_startup) are applied correctly via a different code path inFlowsModelandComponentsModel.Passthrough properties removed (
components.py— StoragesModel)9 properties eliminated, replaced with direct
self.data.Xat all call sites:with_investment,with_optional_investment,with_mandatory_investmentstorages_with_investment,storages_with_optional_investmentoptional_investment_ids,mandatory_investment_idsinvest_params,_investment_dataKept
investment_ids— it has 4 external callers inoptimization.py.Passthrough property removed (
elements.py— FlowsModel)_previous_status→ replaced 3 call sites withself.data.previous_statesTest plan
pytest tests/test_math/)🤖 Generated with Claude Code