in dynalab_cli/init.py [0:0]
def initialize_dependency_setting(self, key, value):
filename = default_filename(key)
if key == "requirements":
install_message = "pip install -r requirements.txt"
elif key == "setup":
install_message = "pip install -e ."
if not value and check_path(
f"{os.path.join(self.root_dir, filename)}", root_dir=self.root_dir
):
ops = input(
f"{key.capitalize()} file found. Do you want us to install "
f"dependencies using {os.path.join(self.work_dir, filename)}? [Y/n] "
)
if ops.lower().strip() in ("y", "yes"):
value = True
elif value and not check_path(
f"{os.path.join(self.root_dir, filename)}", root_dir=self.root_dir
):
print(
f"{key.capitalize()} file not found. "
f"We are unable to install dependencies with {install_message}"
)
value = False
self.update_field(key, value)