in dynalab_cli/init.py [0:0]
def initialize_path(self, key, value):
if check_path(value, root_dir=self.root_dir):
value = get_path_inside_rootdir(value, root_dir=self.root_dir)
message = (
f"{key.capitalize()} file found at "
f"{os.path.join(self.work_dir, value)}. Press enter, or specify "
f"alternative path [{os.path.join(self.work_dir, value)}]: "
)
ops = input(message)
if ops.lower().strip():
value = ops
while not check_path(value, root_dir=self.root_dir):
message = (
f"{key.capitalize()} file {value} not a valid path. Please re-specify "
f"path to {key} file inside the root dir"
)
if key == "handler":
message += (
f" or press enter to create a template {key} file at "
f"{os.path.join(self.work_dir, default_filename(key))}"
)
value = input(f"{message}: ")
if key == "handler" and not value.strip():
value = self.create_file(key)
value = get_path_inside_rootdir(value, root_dir=self.root_dir)
self.update_field(key, value)