From 64cd5b9cef628db16ec74a8a6fad7ac39e6f7615 Mon Sep 17 00:00:00 2001 From: daavoo Date: Mon, 25 Sep 2023 20:35:08 +0200 Subject: [PATCH 1/2] artifacts: Bring back `name_is_compatible`. Unfortunately, DVCLive was importing this function so I am bringing back the name for backwards compatibility. --- dvc/repo/artifacts.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/dvc/repo/artifacts.py b/dvc/repo/artifacts.py index f42ce4f051..5458f3058b 100644 --- a/dvc/repo/artifacts.py +++ b/dvc/repo/artifacts.py @@ -38,6 +38,17 @@ def check_name_format(name: str) -> None: ) from exc +def name_is_compatible(name: str) -> bool: + 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 From 71cb7a6e5b5275b83f8316a4e3aa343da43c10b6 Mon Sep 17 00:00:00 2001 From: David de la Iglesia Castro Date: Tue, 26 Sep 2023 08:47:40 +0200 Subject: [PATCH 2/2] Update artifacts.py --- dvc/repo/artifacts.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dvc/repo/artifacts.py b/dvc/repo/artifacts.py index 5458f3058b..ad33900ac0 100644 --- a/dvc/repo/artifacts.py +++ b/dvc/repo/artifacts.py @@ -39,6 +39,10 @@ def check_name_format(name: str) -> None: 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