diff --git a/dvc/repo/artifacts.py b/dvc/repo/artifacts.py index f42ce4f05..ad33900ac 100644 --- a/dvc/repo/artifacts.py +++ b/dvc/repo/artifacts.py @@ -38,6 +38,21 @@ def check_name_format(name: str) -> None: ) from exc +def name_is_compatible(name: str) -> bool: + """ + Only needed by DVCLive per iterative/dvclive#715 + Will be removed in future release. + """ + from gto.constants import assert_name_is_valid + from gto.exceptions import ValidationError + + try: + assert_name_is_valid(name) + return True + except ValidationError: + return False + + def check_for_nested_dvc_repo(dvcfile: Path): from dvc.repo import Repo