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

Use registry_path checker from pephubclient #426

Closed
khoroshevskyi opened this issue Nov 13, 2023 · 3 comments
Closed

Use registry_path checker from pephubclient #426

khoroshevskyi opened this issue Nov 13, 2023 · 3 comments
Assignees
Milestone

Comments

@khoroshevskyi
Copy link
Member

I added registry path checker to pephubclient, so now we should use this function from pephubclient.
How to use it:

from pephubclient.helpers import is_registry_path
is_registry_path(sample_pep)
@nsheff
Copy link
Contributor

nsheff commented Nov 13, 2023

Sounds like that function belongs in ubiquerg.

There's already parse_registry_path there: https://github.com/pepkit/ubiquerg/blob/bbca867a7c3581bad51723977db3791d999d8591/ubiquerg/paths.py#L21

as long as there are no dependencies

@donaldcampbelljr
Copy link
Contributor

This is the current implementation in looper utils, it uses both ubiquerg and pephubclient to determine if input path is a registry path to pephub:

from ubiquerg import convert_value, expandpath, parse_registry_path
from pephubclient.constants import RegistryPath

looper/looper/utils.py

Lines 565 to 569 in 2675eef

try:
registry_path = RegistryPath(**parse_registry_path(input_string))
except (ValidationError, TypeError):
return False
return True

@donaldcampbelljr
Copy link
Contributor

Closing this in favor of: pepkit/ubiquerg#43 and #456

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants