Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

artifacts: Bring back name_is_compatible. #9972

Merged
merged 2 commits into from
Sep 26, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Copy link
Contributor

@efiop efiop Sep 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was it only importing it or using also? If the former then a noop stub should do. But either way need a comment here with a link so we know this is only kept because of dvclive and can drop it later.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was it only importing it or using also?

Actually using

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