Skip to content

CLAW: refactor srrs.py into python/ package with Pydantic models - #3

Merged
vishalgattani merged 7 commits into
mainfrom
feat/2-refactor-python-package
Apr 13, 2026
Merged

vishalgattani merged 7 commits into
mainfrom
feat/2-refactor-python-package

Conversation

@vishalgattani

Copy link
Copy Markdown
Owner

Closes #2

What's in this PR

Refactored the monolithic srrs.py into a clean Python package under python/.

Package structure

python/
├── models/types.py       ← RobotType, TaskType, Config, SimMode enums
├── models/robot.py       ← Robot base + Replicator/Normal/Assembler/Printer
├── models/resources.py   ← Resources model
├── simulation/config.py  ← SimulationParams Pydantic model
├── simulation/runner.py  ← Core simulation loop
├── analysis/ram.py       ← MTBF/MTTR/MDT/Aoss computation
├── analysis/stats.py     ← MC aggregation + confidence intervals
├── visualization/plots.py ← Plotly HTML (replaces chart_studio)
└── main.py               ← CLI entrypoint

Usage

python -m python.main --config CHO --mode D --timesteps 100
python -m python.main --config CHO CHE --mode MC --mc-runs 100 --plot

Notes

  • srrs.py kept for reference — delete after validation
  • chart_studio removed, Plotly local HTML to output/ (gitignored)
  • All syntax verified via py_compile

@vishalgattani
vishalgattani merged commit 9cff9b4 into main Apr 13, 2026
7 checks passed
@vishalgattani
vishalgattani deleted the feat/2-refactor-python-package branch April 13, 2026 09:08
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.

CLAW: refactor srrs.py into python/ package with Pydantic models

1 participant