def setUp(self): self.settings = Settings(u'settings.json') self.display = ParseDisplayOutput(u"trace-display.output") self.cmdgen = CommandGenerator(self.display, self.settings) self.trace(4, u'setup done') print self.cmdgen.add_indv(u'csta')
def __init__(self, program_name, argv: [str], settings: 'Settings' = None) -> None: self.command_line = CommandLineParser(program_name, argv) self.settings = settings or Main.find_settings( self.command_line.settings_file) self.parsed_display = ParseDisplayOutput("") self.command_generator = CommandGenerator(self.parsed_display, self.settings)
def set_parsed_display(self, val): self.parsed_display = val self.command_generator = CommandGenerator(val, self.settings)
def connect_components(self): for data_source in self.data_sources: print 'connecting data sources:' data_source > self.alligator (self.alligator > self.logic_validator > command_generator > self.dependency_checker > self.command_executor) if __name__ == '__main__': etl_pipeline = ETLPipeline() ontology.instantiate_data_sources() alligator = Alligator() logic_validator = LogicValidator() dependency_checker = DependencyChecker() command_generator = CommandGenerator() command_executor = CommandExecutor() data_stores_dict = get_data_stores_dict() etl_pipeline.add(alligator) etl_pipeline.add(logic_validator) etl_pipeline.add(dependency_checker) etl_pipeline.add(command_generator) etl_pipeline.add(command_executor) etl_pipeline.add(alligator) for data_source in ontology.SOURCES_STORE.itervalues(): etl_pipeline.add(data_source) for data_store in data_stores_dict.itervalues(): etl_pipeline.add(data_store)