mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-01 23:08:43 +01:00
artifacts: Bring back name_is_compatible. (#9972)
* 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
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user