From 798abe0ce29a911981aa60ab2fd55f3c6b046d67 Mon Sep 17 00:00:00 2001
From: speckhard <dts@stanford.edu>
Date: Tue, 25 Jun 2019 15:42:39 +0200
Subject: [PATCH] Added comments.

---
 common/python/nomadcore/local_backend.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/common/python/nomadcore/local_backend.py b/common/python/nomadcore/local_backend.py
index 030f47f..7afbefe 100644
--- a/common/python/nomadcore/local_backend.py
+++ b/common/python/nomadcore/local_backend.py
@@ -65,6 +65,8 @@ class LocalBackend(object):
         self.debug = debug
         self.store = store
 
+        # metaInfoEnv.infoKinds.items() gives a dictionary with keys meta_info
+        # and the associated value a nomadcore.local_meta_info.InfoKindEl object.
         for ikNames, ik in metaInfoEnv.infoKinds.items():
             if ik.kindStr == "type_section":
                 parentS = list(metaInfoEnv.firstAncestorsByType(ik.name).get("type_section", [[]])[0])
@@ -72,8 +74,10 @@ class LocalBackend(object):
                 self.sectionManagers[ik.name] = SectionManager(
                     metaInfo=ik,
                     parentSectionNames=parentS, debug=self.debug)
+        # We go through each key, value in the dictionary of meta infos
         for ikNames, ik in metaInfoEnv.infoKinds.items():
             if ik.kindStr == "type_document_content" or ik.kindStr == "type_dimension":
+                # Now we find out what the supersections are of this meta_info
                 superSectionNames = metaInfoEnv.firstAncestorsByType(ik.name).get("type_section", [[]])[0]
                 if not superSectionNames:
                     raise Exception("MetaInfo of conrete value %s is not in any superSection" % ik.name)
-- 
GitLab