You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We should check first if a file was provided, then check if its a proper registry path, then send to PEPHUB.
Write a function in ubiquerg (or update the existing one) such that the user can pass flags, e.g. require_namespace=True and have it return the parsed path (or a False if it could not parse)
The text was updated successfully, but these errors were encountered:
donaldcampbelljr
changed the title
Revise is_registry_path
Revise parse_registry_path or add a new function to check if path is a valid registry path
Mar 19, 2024
def is_pephub_registry_path(input_string: str) -> bool:
"""
Check if input is a registry path to pephub
:param str input_string: path to the PEP (or registry path)
:return bool: True if input is a registry path
"""
try:
registry_path = RegistryPath(**parse_registry_path(input_string))
except (ValidationError, TypeError):
return False
return True
The above function (from Looper), should be moved here to Ubiquerg and actually fail if the input is anything other than a valid PEPHub registry path.
require_namespace=True
and have it return the parsed path (or a False if it could not parse)Originally posted by @donaldcampbelljr in pepkit/looper#456 (comment)
The text was updated successfully, but these errors were encountered: