phenoscape / owlery

Owlery is a set of REST web services which allow querying of an OWL reasoner containing a configured set of ontologies.
MIT License
16 stars 11 forks source link

Python client library for the owlery OpenAPI #200

Closed rpgoldman closed 2 years ago

rpgoldman commented 2 years ago

I have been using an auto-generated library in my project https://github.com/Bioprotocols/container-ontology

I would like to pull this library out and make it a free-standing package. Would you like to host it in the phenoscape group if I do that?

balhoff commented 2 years ago

Sorry for the slow response. I think that would be great to include in phenoscape. If you would rather keep it in your org, i don't mind, but I could add you as a collaborator if you'd like to put it here.

rpgoldman commented 2 years ago

Yes, I would be happy to see it go here, since I can't guarantee I will have funding to maintain the API library. If you set me up with a repository under phenoscape, I can put the API library there.

One thing I am hoping is that someone knows how to get a python library into Pypi, since I have never done that.

balhoff commented 2 years ago

What would you like to call the repo? I don't do much python, but I might be able to find some colleagues to advise.

rpgoldman commented 2 years ago

I was thinking owlery-client for the library/repo name, but am open to other choices. I suppose python-owlery-client would be the most self-explanatory. And we could name the python module owlery_client: anyone using it will be well aware that it's a python library!

It seems quite common to have a library with a hyphenated name have a different module name. So we would have:

pip install python-owlery-client

or

pip install owlery-client

and then in the python code

import owlery_client
hlapp commented 2 years ago

I agree that in pip install python-owlery-client the python- prefix seems quite redundant. (I don't think pip installs anything other than python packages?)

rpgoldman commented 2 years ago

It occurs to me reading your reply @hlapp that there's an argument to be made for a three-way arrangement:

  1. Call the repository python-owlery-client, because if I was able to generate a python client from openapi-generator, others could generate clients for JS, Java, scala, etc.
  2. As you say, the python library should just be owlery-client, since there's no chance for confusion (and having lots of libraries with "python-" or "py-" as a prefix just makes listing more confusing.
  3. Call the python module owlery_client because python doesn't like hyphens! (but for some reason still uses them in library names)
cmungall commented 2 years ago

It sounds like you have converged on the best solution!

I am interested in seeing your library. I was considering writing a client for owlery myself, using the https://github.com/hsolbrig/funowl/ datamodel, and wrapping it in https://github.com/INCATools/ontology-access-kit -- but didn't have any firm plans so it would be great to use yours!

rpgoldman commented 2 years ago

Great. Well @balhoff, maybe set up that repo and I will push into it?

balhoff commented 2 years ago

@rpgoldman I've created the repo at https://github.com/phenoscape/python-owlery-client

I added you as a maintainer; let me know if anything needs fixing for the permissions.