Skip to content

Commit

Permalink
artifacts: Bring back name_is_compatible. (#9972)
Browse files Browse the repository at this point in the history
* artifacts: Bring back `name_is_compatible`.

Unfortunately, DVCLive was importing this function so I am bringing back the name for backwards compatibility.

* Update artifacts.py
  • Loading branch information
daavoo authored Sep 26, 2023
1 parent 95c9790 commit 2aa2bef
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions dvc/repo/artifacts.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 2aa2bef

Please sign in to comment.