Esempio n. 1
0
 def run(self, args):
     """checking arguments and run project"""
     if not args:
         print(self.help())
         return 1
     with fix_import_path(args):
         project = project_from_files(
             args,
             project_name=self.config.project,
             black_list=self.config.ignore_list,
         )
     linker = Linker(project, tag=True)
     handler = DiadefsHandler(self.config)
     diadefs = handler.get_diadefs(project, linker)
     writer.DiagramWriter(self.config).write(diadefs)
     return 0
Esempio n. 2
0
 def run(self, args):
     """checking arguments and run project"""
     if not args:
         print(self.help())
         return 1
     # insert current working directory to the python path to recognize
     # dependencies to local modules even if cwd is not in the PYTHONPATH
     sys.path.insert(0, os.getcwd())
     try:
         project = project_from_files(
             args,
             project_name=self.config.project,
             black_list=self.config.ignore_list,
         )
         linker = Linker(project, tag=True)
         handler = DiadefsHandler(self.config)
         diadefs = handler.get_diadefs(project, linker)
     finally:
         sys.path.pop(0)
     writer.DiagramWriter(self.config).write(diadefs)
     return 0