def _pipeline_step(self): """ Step #1 User can choose which pipeline to clone and if not skipped - where. Then pipeline will be copied in requested directory """ self.__sep("Pipeline templates") opts = list(utils.pipelines.URL.keys()) + ["empty"] opts = [opt.capitalize() for opt in opts] msg = "0: Skip this step\n" msg += "\n".join([f"{n + 1}: {v}" for n, v in enumerate(opts)]) print(msg) res = int( prompt( "\nChoose pipeline template you want to init " "your project from: " ) ) if res == 0: self.__res("Skipped...") return pipeline = opts[res - 1] self.__res(pipeline) out_dir = prompt( f"Where we need to copy {pipeline} " "template files?: ", default="./" ) self.pipeline_path = pathlib.Path(out_dir) utils.clone_pipeline(pipeline.lower(), self.pipeline_path) self.__res(f"{pipeline} cloned to {self.pipeline_path}")
def main(args, _): if args.interactive: run_wizard() else: clone_pipeline(args.pipeline, args.out_dir)
def main(args, _): """Run the ``catalyst-dl init`` script.""" if args.interactive: utils.run_wizard() else: utils.clone_pipeline(args.pipeline, args.out_dir)