From d090a669adb477d42bb94a16d20cf89dc241148c Mon Sep 17 00:00:00 2001
From: "Hock, Martin" <martin.hock@fst.tu-darmstadt.de>
Date: Mon, 27 Feb 2023 11:38:14 +0100
Subject: [PATCH] Push comments and TODOS

---
 functions/calculation_rules.py |  6 +++++-
 functions/classes.py           | 16 ++++++++++------
 test-classes.py                |  5 +++++
 3 files changed, 20 insertions(+), 7 deletions(-)

diff --git a/functions/calculation_rules.py b/functions/calculation_rules.py
index 7fa7396..7633378 100644
--- a/functions/calculation_rules.py
+++ b/functions/calculation_rules.py
@@ -6,11 +6,15 @@ File consists of several functions for the calculation rules of FAIR Quality KPI
 def test_function():
     print("You called the test function.")
 
-
+# Function to calculate KPIS that use sums
+# Or function to calculate the mass with sum?
 def kpi_sum(*args):
     return sum(args[0])
     # if arguments are handed over not as a list: sum(list(args))
 
+# KPI for calculating some real complicated metric
+
+
 
 if __name__ == "__main__":
     print(
diff --git a/functions/classes.py b/functions/classes.py
index 8e9a803..845ec8d 100644
--- a/functions/classes.py
+++ b/functions/classes.py
@@ -10,12 +10,16 @@ import json
 
 # TODO
 # - Docstrings
-# - Beschreibung von Teilen (-> properties)
-# - Gute String Darstellung
-# - Minimalbeispiel für KPIs
-# - Export als GraphViz
-# - Erlaube Listen bei add_component und add_assembly ?
-# - Zukunft: Erlaube Clone bei Assembly (jede Component muss durch Klon ersetzt werden)
+# - Beschreibung von Teilen (-> properties) -> Raus aus dem Konstruktor rein in ein dict. (Deep-Copy)
+# - Minimalbeispiel für KPIs -> halb umgesetzt -> mit get_components veranschaulichen
+# - Erlaube Clone bei Assembly (jedes child muss durch durch Klon ersetzt werden)
+# - Änderungen an Beispiel umsetzen
+
+# - Erlaube Listen bei add_component und add_assembly  (-> Nä Semester)
+# - Gute String Darstellung -> Ist so schon ok bisher? -> Nä Semester
+# - Export als GraphViz -> Nä Semeseter
+
+
 
 class ComponentCategory(Enum):
     BATTERY = auto()
diff --git a/test-classes.py b/test-classes.py
index 0fbc4be..dba4121 100644
--- a/test-classes.py
+++ b/test-classes.py
@@ -106,6 +106,8 @@ scooterwheel = LegoComponent("Vorderrad", ComponentCategory.WHEEL,
                             TeuresRad["Designnummer"],
                             TeuresRad["Preis [Euro]"], TeuresRad["Gewicht [g]"],
                             0)
+
+# TODO component with copy of dict from json
 # Cloning is necessary because each lego object gets a unique id so you can't use the same part twice
 scooterwheel2 = scooterwheel.clone()
 scooterwheel2.name = "Hinterrad"
@@ -130,6 +132,9 @@ for c in scooter.components:
 for a in scooter.assemblies:
     # only checking one layer deep here
     listofmasses.append(a.mass)
+
+# TODO example with get_component_list
+
 print(listofmasses)
 print(kpi_sum(listofmasses))
 
-- 
GitLab