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

Add is_curie() and is_uri() methods as helper functions #89

Closed
matentzn opened this issue Nov 4, 2023 · 4 comments · Fixed by #90
Closed

Add is_curie() and is_uri() methods as helper functions #89

matentzn opened this issue Nov 4, 2023 · 4 comments · Fixed by #90

Comments

@matentzn
Copy link
Collaborator

matentzn commented Nov 4, 2023

Compression and expansion are not the only use cases for curies, we sometimes just want to know if a string is a curie or not. I keep writing wrappers with curies.parse... methods and it would be nice if this was somehow natively supported.

@cthoyt
Copy link
Member

cthoyt commented Nov 4, 2023

Related #77

@cthoyt
Copy link
Member

cthoyt commented Nov 4, 2023

question: you want this as a method of the converter or a generic one? It would be much easier to make it part of the converter.

cthoyt added a commit that referenced this issue Nov 4, 2023
@cthoyt
Copy link
Member

cthoyt commented Nov 4, 2023

@matentzn can you add some details on places where you would like to use this functionality?

@cthoyt cthoyt closed this as completed in #90 Nov 4, 2023
cthoyt added a commit that referenced this issue Nov 4, 2023
@matentzn
Copy link
Collaborator Author

matentzn commented Nov 4, 2023

In OAK, the relationships are randomly curies when the URI prefix is known (is in the map) and URIs otherwise. For certain applications, I just want to skip all cases where the relationships don't have a valid entry in the prefix map.

But there are a lot of applications for example in data validation, where I want to spit a warning when something is a URI but should be a curie.

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

Successfully merging a pull request may close this issue.

2 participants