Upload catalog.py with huggingface_hub
Browse files36 unmodified lines3738394041424372 unmodified lines11611711811912012112236 unmodified linesassert (artifact_identifier.strip()), "artifact_identifier should not be an empty string."parts = artifact_identifier.split(constants.catalog_hirarchy_sep)parts[-1] = parts[-1] + ".json"return os.path.join(self.location, *parts)72 unmodified linesdef verify_legal_catalog_name(name):assert re.match(r"^[\w" + constants.catalog_hirarchy_sep + "]+$", name), f'Artifict name ("{name}") should be alphanumeric. Use "." for nesting (e.g. myfolder.my_artifact)'36 unmodified lines3738394041424372 unmodified lines11611711811912012112236 unmodified linesassert (artifact_identifier.strip()), "artifact_identifier should not be an empty string."parts = artifact_identifier.split(constants.catalog_hierarchy_sep)parts[-1] = parts[-1] + ".json"return os.path.join(self.location, *parts)72 unmodified linesdef verify_legal_catalog_name(name):assert re.match(r"^[\w" + constants.catalog_hierarchy_sep + "]+$", name), f'Artifict name ("{name}") should be alphanumeric. Use "." for nesting (e.g. myfolder.my_artifact)'
catalog.py+2-2