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 Python class objects rather than raw URIs as arguments #146

Open
bbartley opened this issue May 8, 2022 · 2 comments
Open

Use Python class objects rather than raw URIs as arguments #146

bbartley opened this issue May 8, 2022 · 2 comments

Comments

@bbartley
Copy link
Collaborator

bbartley commented May 8, 2022

Some methods require a URI for a PAML class as an argument. For example:

primitive.add_output('measurements', 'http://bioprotocols.org/paml#SampleData')

A more pythonic and user-friendly method signature would be:

primitive.add_output('measurements', SampleData)

The URI corresponding to the Python class can then be looked up in the pySBOL3 parser's registry, which maps URIs to their corresponding Python classes.

@rpgoldman
Copy link
Collaborator

Would it make sense to address these entities the way RDFLIB does namespaces ? So PAML.SampleData for example

@jakebeal
Copy link
Member

jakebeal commented May 9, 2022

What pySBOL3 does in this case, I believe, is that it will accept either. Can we do that here too?

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