phenopacket-schema icon indicating copy to clipboard operation
phenopacket-schema copied to clipboard

Decide whether generated python code should be distributed on pypi

Open cmungall opened this issue 6 years ago • 9 comments

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?

cmungall avatar Feb 28 '19 22:02 cmungall

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...

julesjacobsen avatar Mar 01 '19 10:03 julesjacobsen

@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 avatar Mar 14 '19 13:03 pnrobinson

@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?

pnrobinson avatar Mar 14 '19 14:03 pnrobinson

@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

cmungall avatar Mar 15 '19 17:03 cmungall

.rst should be the standard anyway!

pnrobinson avatar Mar 15 '19 19:03 pnrobinson

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 avatar May 29 '19 15:05 julesjacobsen

https://packaging.python.org/tutorials/packaging-projects/

julesjacobsen avatar Jul 14 '20 14:07 julesjacobsen

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

pnrobinson avatar Dec 16 '20 21:12 pnrobinson

The issue can be closed when #384 is merged.

ielis avatar Apr 05 '24 02:04 ielis