How chueh-ermon/automate-arbin-schedule-file-creation works
Project type and purpose
• This is an open-source, command-line Python tool whose sole purpose is to automate generation of Arbin cycler schedule files (.sdu) and batch mapping files (.bth) from human-readable input (CSV policies and template files).
• Key use-cases:
• Generate standardized charging/discharge/rest sequences (“schedule files”) based on policy CSV.
• Generate batch files that assign schedules to instrument channels.
File structure
• Top-level scripts:
• automate_4step.py – reads policies_all.csv (or user CSV) + template_4step.sdu to emit multiple .sdu files.
• automate_batchfile.py / automate_batchfile_validation.py – read a set of .sdu files plus batch_template.bth to produce .bth files.
• Data directories:
• “OED schedule files/” – stores all generated .sdu files (both historical and validation sets).
• old/ – legacy scripts (3-step version and raw templates).
• Configuration and templates:
• template_4step.sdu, batch_template.bth
• policies_all.csv – primary input policy definitions.
• No external microservices or databases—everything is filesystem-based.
README for additional insights
• Clarifies that the scripts perform simple text substitution on templates.
• Mentions an external GitHub data source for batch assignments (battery-parameter-spaces), which could be drawn as an external dependency.
a. Main components
• Input Layer
– Policy CSV(s) (policies_all.csv or user-supplied)
– Template files (.sdu and .bth)
• Processing Layer
– Python generator modules:
· automate_4step.py
· automate_batchfile.py / validation version
• Output Layer
– Generated schedule files folder (OED schedule files/…)
– Generated batch files (.bth)
• External Data Source (optional)
– GitHub repo of battery-parameter-spaces for random policy assignment
b. Relationships / data flow
1. Policy CSV → automate_4step.py → text-substitution engine + template_4step.sdu → new .sdu files → write to “OED schedule files/”
2. Generated .sdu files + channel assignments → automate_batchfile.py → text-substitution on batch_template.bth → output .bth files
3. Optionally, automate_batchfile.py fetches or references external data source for random assignments.
c. Architectural patterns / design principles
• Modular scripts separated by function (schedule vs batch generation).
• Template-driven code generation (simple templating pattern).
• Filesystem-centric pipeline: no database or web layer.
d. Relevant technologies
• Python 3.x – core scripting language
• CSV I/O (standard library)
• Filesystem operations (read/write templates and outputs)
Detailed capture
• Legacy path (old/ folder) if it matters for versioning discussions.
• File names next to components to make it concrete.
• Both automate_4step and automate_batchfile flows side by side, then converge on the final outputs.