Schritte 1-3 aus doc/SCL_Templates.md (neu: Konzept, Wertklassen je Zeile,
Namensregeln, Tests, Migrationsplan, Vertrag fuer den CSV->SCL-Workflow).
- Golden-Files (tests/test_scl_skeleton_golden.py, tests/fixtures/scl/):
komplette FB_Main-Ausgabe von mubea und HundM05 byte-genau festgeschrieben,
Zeitstempel maskiert; gewollte Aenderung per SKEL_UPDATE_GOLDEN=1
- lib/scl_context.py (neu): alles, was scl_skeleton aus der TRO-JSON ableitet
(Reihenfolge, Separator-/Weichen-/Scanner-Bloecke, Staubereiche, Ziellisten,
Namen) als pydantic-Kontext SclFile/SclTro; Namen als SclName (Wert +
todo-Merker) als Andockstelle fuer die Namensregeln (Schritt 4).
scl_skeleton schreibt nur noch Text; Ausgabe byte-identisch (Golden-Files,
zusaetzlich dematic/showroom mit und ohne --start alt/neu verglichen)
- lib/scl_templates/ (neu, Jinja2): _macros.scl.j2 + Pilot
FB_ILS_MTRO_1Sep1Swi.scl.j2 nach der realen Aufrufstelle TRO107
(PriorityManagerDir2, stInSenJam<n>, xInCarouselRun1, xInRelease TRUE,
Separatorzeiten 100/50 ms). Ortsgebundene Zeilen als Vorschlag umgesetzt,
jede offene Stelle mit TODO(E-Planung) - Bestaetigung durch SPS steht aus
- scl_skeleton: --templates [DIR] (opt-in, ohne Schalter Ausgabe unveraendert),
--strict (Exit 1 ohne SCL, wenn ein FB-Typ kein Template hat); Kopf und
Zusammenfassung nennen Template-/generische Typen; Templatefehler
(StrictUndefined) -> Exit 1 ohne SCL
- tests/test_scl_templates.py: Rundlauf Template mit Referenzwerten ==
Referenz-REGION (normalisiert); jede Platzhalterzeile traegt den TODO-Marker
- requirements.txt: jinja2 >= 3.1 (bestehende .venv: pip install -r requirements.txt)
- Doku: SCL_Templates.md, Python_Scripts.md §5b, Commandlines.md §2.5, CLAUDE.md
Befunde: xInCarouselRun1 laesst sich nicht aus der TRO-JSON ableiten (Kanten-
art "umlauf" kommt praktisch nicht vor) -> immer als TODO; nTo1Destinations
ist in der Referenz 3 bei 2 Abgaengen (zaehlt evtl. Ziele) -> "pruefen".
Mit --templates nur die 1Sep1Swi-REGIONs (+ Kopf) anders als generisch;
32 Tests gruen.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- lib/model.py (neu, pydantic): TroBase -> DerivedTro, Connection, OpenPoint,
Analysis (aus tro_flow verschoben), TroDocument = TRO-JSON (Schema
sps_skel-tro-v2). items/fbType werden immer ueber den Typ aus tro_catalog
gelesen, nie gespeichert; abweichende Werte in einer JSON sind ein Fehler.
JSON-Schluessel wie bisher (id, type, fbType ...), extra="forbid".
- tro_flow: Tro/Analysis aus model.py; neuer Schalter --json schreibt
<name>_tro.json (TroDocument)
- scl_skeleton: liest die JSON ueber TroDocument statt per Dict-Zugriff,
Bauteile ueber TroItem-Konstanten; ungueltige JSON -> Exit 1 ohne SCL,
alte tro_extract-JSON (v1) mit Hinweis auf tro_flow --json
- tro_annotate: nur noch Ansicht; derselbe analyse_tros-Aufruf wie tro_flow
(inkl. sepliste-Gegenprobe), damit Zeichnung und JSON uebereinstimmen
- tro_extract: geparkt (unveraendert)
- tests/test_model.py + conftest.py, pytest in requirements.txt aktiviert
- Doku: Python_Scripts.md (§6b model.py), Commandlines.md, CLAUDE.md,
Aufrufkommentare in bin/ (scl_skeleton.bat zeigte tro_flow-Aufrufe)
Geprueft: alle tro_flow/tro_annotate-Ausgaben (8 CSVs) bis auf Zeitstempel
identisch zum vorherigen Stand; scl_skeleton alt/neu auf derselben JSON
byte-identisch (export, mubea, HundM05); 10 Tests gruen.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
lib/scl_skeleton.py and lib/tro_extract.py already run the pipeline
end-to-end (annotated DXF -> TRO-JSON -> FB_Main SCL skeleton), but
CLAUDE.md and README.md still described these as unwritten tools
(tro_export.py / scl_gen.py). Update the current-state docs:
- CLAUDE.md: project purpose, reading order, roadmap section, and
standard-template notes now describe the built pipeline plus the
parts still open (full layout JSON schema, other per-controller
blocks, timing defaults, --skip-json).
- README.md: bin/ tree and usage examples for tro_extract/scl_skeleton.
- doc/Python_Scripts.md: intro counts (8 modules / 5 CLI tools),
header date, pipeline diagram, and tro_overrides.py in the lib list.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add a Roadmap section to README.md and CLAUDE.md describing the two
still-to-be-written lib/ tools (tro_export.py, scl_gen.py) that will
turn the annotated CAD drawing into a JSON layout model and then into
TIA-Portal-importable SCL, including the --skip-json shortcut.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Add doc/Python_Scripts.md covering material_flow.py, tro_flow.py,
tro_annotate.py, tro_catalog.py and dxf_registration.py: purpose, CLI
switches, outputs and exit codes.
Update CLAUDE.md, which still described lib/ and doc/ as empty
design-phase scaffolding: reflect the working tooling, the doc/
reorganization (HundM/, 500573_Mubea/, TRO_Katalog/), the moved SCL
templates, and the now-accepted bin/<tool>.bat+.sh wrapper convention.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>