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

Decide whether generated python code should be distributed on pypi #43

Open
cmungall opened this issue Feb 28, 2019 · 9 comments
Open

Comments

@cmungall
Copy link
Member

The readthedocs is an excellent intro to how to use the java code, what is the status of generated python? Is the java canonical? Sounds like some groups (cc @drseb ) are using generated python. Should we generate python and release on pypi with each release, or is that taking on too much?

@julesjacobsen
Copy link
Collaborator

The Python code is generated on each build along with the Java code. I've not used the Python, but it will follow the style in the protobuf Python docs i.e. it will follow Pythonic norms, not Java. I had considered releasing on pypi but after the maven central ordeal I left it as a thought...

@pnrobinson
Copy link
Collaborator

@cmungall What would the best way be to do this from the Python ecosystem perspective? We can generate sufficient code for users to import protobuf or JSON (I think) serializations of the Phenopacket. In Java, it seems to be more idiomatic to generate that code from the protobuf schema using maven etc rather than distributing the Java classes. This seems to be different in the Python world -- is that correct?

@pnrobinson
Copy link
Collaborator

@cmungall btw it seems difficult to import the correct python packet to get any of this to work. These classes require the google.protobuf class but I cannot figure out how to actually install and import it. Google does not seem to be supporting python (much). Have you got this to run?

@cmungall
Copy link
Member Author

@julesjacobsen reports having generated the python correctly..

Releasing to pypi is a dream compared to maven central. Nevertheless I can appreciate the overhead for each release having to release two places, using two toolchains. We could potentially distribute this work to more pythonic members of the team, at the cost of some asynchrony between releases. If we want to sync github releases too then that is additional faffing. In theory it should be possible to automate all of this so the release manager just runs a single command..

Tip for pypi - I've found it's easiest to just go with a READMD.rst rather than faffing around with conversion from md

@pnrobinson
Copy link
Collaborator

.rst should be the standard anyway!

@julesjacobsen
Copy link
Collaborator

I've made some progress towards this, but there are still a few more steps to go through to fully-automate the whole thing.

@julesjacobsen
Copy link
Collaborator

@pnrobinson
Copy link
Collaborator

@iimpulse @julesjacobsen
Mike is now ready to submit a Python package to PyPI. Can we touch bases before we finalize?

@ielis
Copy link
Contributor

ielis commented Apr 5, 2024

The issue can be closed when #384 is merged.

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

4 participants