From 7c6e1cc828cba88c4c6a962ab654acc1b41e385e Mon Sep 17 00:00:00 2001
From: Susa Giogoli <su.giogoli@icloud.com>
Date: Fri, 14 Jul 2023 18:35:15 +0200
Subject: [PATCH] all methods are commented

---
 newmodeljsonparse.py | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/newmodeljsonparse.py b/newmodeljsonparse.py
index d63336f..401d30c 100644
--- a/newmodeljsonparse.py
+++ b/newmodeljsonparse.py
@@ -411,7 +411,6 @@ def buildComponents(interfacesreturn,  jsoninterfaces, jsoncomponents, jsonmeasu
     return interfacesreturn
 
 
-
 def instantiateComponents(typesdict, interfaces, jsoncomponents, instantiatedict, eventsdict, streamsdict, componentlist, headnodeindex, variabledict):
     """
     Instantiates all components and collects events, streams and variable names on the side.
@@ -454,6 +453,13 @@ def instantiateComponents(typesdict, interfaces, jsoncomponents, instantiatedict
 
 
 def instantiate(typesdict, interfaces, jsoncomponents):
+    """
+    Instantiates the interface root and starts instantiateComponents
+    :param typesdict: Dict for objecttype node names from the format {uuid : objecttypename}.
+    :param interfaces: A list of interfaces
+    :param jsoncomponents: A list of all componentdicts
+    :return: the values from instantiateComponents
+    """
     instantiatedict = {}
     eventsdict = {}
     streamsdict ={}
@@ -476,6 +482,10 @@ def instantiate(typesdict, interfaces, jsoncomponents):
 
 
 def main():
+    """
+    Main method that collects everything and starts all writing process.
+    :return: None
+    """
     try:
         JSON_MODEL = sys.argv[1][:-5]
         if not os.path.exists(os.path.join('..', 'soil-opc-ua', f'{JSON_MODEL}.json')):
-- 
GitLab