Skip to content
This repository was archived by the owner on Mar 12, 2026. It is now read-only.

Decompose FirmInit.create into focused sub-methods#131

Merged
speedcom merged 1 commit intomainfrom
refactor/firm-init
Mar 12, 2026
Merged

Decompose FirmInit.create into focused sub-methods#131
speedcom merged 1 commit intomainfrom
refactor/firm-init

Conversation

@speedcom
Copy link
Contributor

Summary

  • create (65 lines) → 6-line orchestrator calling 7 private methods
  • enhanceNoRngfinalize + initInventory + initGreenCapital
  • assignSectors: mutable Array + var idx → pure flatMap + fill + shuffle
  • 7 magic numbers extracted to calibration constants section
  • Scaladoc with economic context (NBP M3, GUS, RNG ordering rationale)

Test plan

  • sbt compile — clean
  • sbt test — 1244 tests pass
  • sbt scalafmtAll — formatted

@speedcom speedcom force-pushed the refactor/firm-init branch from 6c7a1ed to 5aeffa2 Compare March 12, 2026 10:11
@speedcom speedcom force-pushed the refactor/firm-init branch from 5aeffa2 to 67815a1 Compare March 12, 2026 10:17
@speedcom speedcom merged commit edcf83c into main Mar 12, 2026
2 checks passed
@speedcom speedcom deleted the refactor/firm-init branch March 12, 2026 10:20
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant