dvc-gitactions
dvc-gitactions copied to clipboard
create deployment space with default params
https://github.com/mlops-guide/dvc-gitactions/blob/d2c018a5598ccba5fa41f94f42ceb25fd8785ebb/.infra/datapak_manage.py#L110
if action == "create":
infos = terraform_output()
if len(args) == 2:
space_name = args[1]
space = create_deployment_space(
client,
infos["cos_crn"],
infos["wml_name"],
infos["wml_crn"],
space_name,
)
elif len(args) > 2:
space_name = args[1]
description = args[2]
space = create_deployment_space(
client,
infos["cos_crn"],
infos["wml_name"],
infos["wml_crn"],
space_name,
description,
)
space = create_deployment_space(
client,
infos["cos_crn"],
infos["wml_name"],
infos["wml_crn"]
)
pprint(space)
Hello @jsaed, thank for your contribution. I this case, when len(ars) >= 2 create_deployment_space would run twice.
if action == "create":
infos = terraform_output()
if len(args) == 2:
# Space Name only
space_name = args[1]
space = create_deployment_space(
client,
infos["cos_crn"],
infos["wml_name"],
infos["wml_crn"],
space_name,
)
elif len(args) > 2:
# Space Name and Description
space_name = args[1]
description = args[2]
space = create_deployment_space(
client,
infos["cos_crn"],
infos["wml_name"],
infos["wml_crn"],
space_name,
description,
)
elif (len(ars)) < 2:
# Default params
space = create_deployment_space(
client,
infos["cos_crn"],
infos["wml_name"],
infos["wml_crn"]
)
pprint(space)
thanks @arthurolga - ok looks good please add