Bezeichnung statt Name bei ILS KReisel und Eckrad verwendet. Eigene Spalte für Bezeichnung im Sivas Export dazu gebaut

This commit is contained in:
2026-07-20 16:46:16 +02:00
parent d4ea049918
commit 903e086e7f
5 changed files with 43 additions and 24 deletions
+8 -8
View File
@@ -6,7 +6,7 @@
"block_handle": "11A",
"insert_point": [500, 500, 2500],
"actual_attributes": {
"NAME": "Kreisel1",
"Bezeichnung": "Kreisel1",
"DREHRICHTUNG": "UZS",
"N_SEPARATOREN": "2",
"KREISELART": "STANDARD",
@@ -27,7 +27,7 @@
"block_handle": "14A",
"insert_point": [-500, 500, 2500],
"actual_attributes": {
"NAME": "Kreisel2",
"Bezeichnung": "Kreisel2",
"DREHRICHTUNG": "UZS",
"N_SEPARATOREN": "2",
"KREISELART": "STANDARD",
@@ -48,7 +48,7 @@
"block_handle": "17A",
"insert_point": [-500, -500, 2500],
"actual_attributes": {
"NAME": "Kreisel3",
"Bezeichnung": "Kreisel3",
"DREHRICHTUNG": "UZS",
"N_SEPARATOREN": "2",
"KREISELART": "STANDARD",
@@ -69,7 +69,7 @@
"block_handle": "1AA",
"insert_point": [500, -500, 2500],
"actual_attributes": {
"NAME": "Kreisel4",
"Bezeichnung": "Kreisel4",
"DREHRICHTUNG": "UZS",
"N_SEPARATOREN": "2",
"KREISELART": "STANDARD",
@@ -90,7 +90,7 @@
"block_handle": "1DA",
"insert_point": [3000, 3000, 3000],
"actual_attributes": {
"NAME": "Kreisel5",
"Bezeichnung": "Kreisel5",
"DREHRICHTUNG": "UZS",
"N_SEPARATOREN": "2",
"KREISELART": "STANDARD",
@@ -111,7 +111,7 @@
"block_handle": "20F",
"insert_point": [500, 6000, 1500],
"actual_attributes": {
"NAME": "Kreisel6",
"Bezeichnung": "Kreisel6",
"DREHRICHTUNG": "UZS",
"N_SEPARATOREN": "2",
"KREISELART": "PIN",
@@ -132,7 +132,7 @@
"block_handle": "243",
"insert_point": [-500, 6500, 1500],
"actual_attributes": {
"NAME": "Kreisel7",
"Bezeichnung": "Kreisel7",
"DREHRICHTUNG": "UZS",
"N_SEPARATOREN": "2",
"KREISELART": "PIN",
@@ -153,7 +153,7 @@
"block_handle": "277",
"insert_point": [3000, 8000, 1500],
"actual_attributes": {
"NAME": "Kreisel8",
"Bezeichnung": "Kreisel8",
"DREHRICHTUNG": "UZS",
"N_SEPARATOREN": "2",
"KREISELART": "PIN",
+5 -5
View File
@@ -289,7 +289,7 @@ class TestFoerdererExportSivas:
def test_header_felder(self):
"""Sivas-CSV-Header muss korrekte Spalten haben."""
expected = ["Nr", "TeileArt", "SivasNummer",
expected = ["Nr", "TeileArt", "SivasNummer", "Bezeichnung",
"Dispogruppe", "Anzahl", "Laenge[mm]", "Hoehe[m]", "details"]
for i, name in enumerate(expected):
assert self.header[i] == name, (
@@ -317,10 +317,10 @@ class TestFoerdererExportSivas:
def test_details_sind_valides_json(self):
"""details-Spalte muss valides JSON enthalten."""
for i, row in enumerate(self.rows):
if len(row) < 8:
if len(row) < 9:
continue
try:
json.loads(row[7])
json.loads(row[8])
except json.JSONDecodeError as e:
pytest.fail(f"Zeile {i + 2}: details ist kein valides JSON: {e}")
@@ -330,10 +330,10 @@ class TestFoerdererExportSivas:
"Laengen aller Variofoerderer",
"Anzahl aller Separatoren"}
for row in self.rows:
if len(row) < 8:
if len(row) < 9:
continue
if row[1].strip('"') == "ILS 2.0 Automation und Pneumatik - Gesamtanlage":
details = json.loads(row[7])
details = json.loads(row[8])
missing = required - set(details.keys())
assert not missing, (
f"Automation-details: fehlende Felder: {missing}"