Browse Source

remove unused print

nico 8 năm trước cách đây
mục cha
commit
b5d2ad83de
3 tập tin đã thay đổi với 11 bổ sung20 xóa
  1. 2 2
      brains/neurotransmitter.yml
  2. 5 11
      core/ConfigurationManager/YAMLLoader.py
  3. 4 7
      test.py

+ 2 - 2
brains/neurotransmitter.yml

@@ -1,8 +1,8 @@
 ---
   - name: "synapse1"
     neurons:
-#      - say:
-#          message: "aimez vous les frites?"
+      - say:
+          message: "aimez vous les frites?"
       - neurotransmitter:
           links:
             - synapse: "synapse2"

+ 5 - 11
core/ConfigurationManager/YAMLLoader.py

@@ -23,14 +23,6 @@ class YAMLLoader:
         Load settings file
         :return: cfg : the configuration file
         """
-        # # Load settings.
-        # __location__ = os.path.realpath(os.path.join(os.getcwd(), os.path.dirname(__file__)))
-        # try:
-        #     with open(os.path.join(__location__, yaml_file)) as ymlfile:
-        #         cfg = yaml.load(ymlfile)
-        #     return cfg
-        # except IOError:
-        #     raise YAMLFileNotFound("The file path %s does not exist" % yaml_file)
         current_dir = os.path.dirname(os.path.abspath(__file__))
         logger.debug("Current dir: %s " % current_dir)
         root_dir = os.path.join(current_dir, "../../")
@@ -71,10 +63,12 @@ class IncludeLoader(yaml.Loader):
 class IncludeImport(object):
 
     def __init__(self, file_path):
-
+        """
+        Load yaml file, with includes statement
+        :param file_path: path to the yaml file to load
+        """
         self.data = yaml.load(open(file_path, 'r'))
-
-        print "content: %s" % self.data
+        # print "content: %s" % self.data
         if isinstance(self.data, list):
             for el in self.data:
                 if "includes" in el:

+ 4 - 7
test.py

@@ -23,16 +23,13 @@ logger.setLevel(logging.DEBUG)
 
 SettingLoader.get_settings()
 
-# order = "pose moi une question"
+order = "pose moi une question"
 # order = "synapse2"
-# oa = OrderAnalyser(order=order)
-#
-# oa.start()
+oa = OrderAnalyser(order=order)
+
+oa.start()
 
-brain = BrainLoader.get_brain()
 
-for el in brain.synapses:
-    print el.name