Skip to content

Remove dead code and passthrough properties from data model#609

Merged
FBumann merged 1 commit intofeature/element-data-classesfrom
feature/element-data-classes+simplifications
Feb 14, 2026
Merged

Remove dead code and passthrough properties from data model#609
FBumann merged 1 commit intofeature/element-data-classesfrom
feature/element-data-classes+simplifications

Conversation

@FBumann
Copy link
Member

@FBumann FBumann commented Feb 14, 2026

Summary

  • Remove unused categorization properties from StatusData
  • Remove 9 passthrough properties from StoragesModel that just delegated to self.data.X
  • Remove 1 passthrough property from FlowsModel
  • Replace all internal call sites with direct self.data.X access

Changes

Dead code removed (batched.py)

  • 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 code path in FlowsModel and ComponentsModel.

Passthrough properties removed (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.

Passthrough property removed (elements.py — FlowsModel)

  • _previous_status → replaced 3 call sites with self.data.previous_states

Test plan

  • All 402 math tests pass (pytest tests/test_math/)

🤖 Generated with Claude Code

  - 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
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 14, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/element-data-classes+simplifications

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@FBumann FBumann changed the title Removed dead code (batched.py) Remove dead code and passthrough properties from data model Feb 14, 2026
@FBumann FBumann merged commit 35dbf4f into feature/element-data-classes Feb 14, 2026
8 checks passed
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.

1 participant