SheffieldSolar / PV_Live-API

A Python implementation of the PV_Live web API.
16 stars 4 forks source link

Add PyPi Publishing #6

Closed jacobbieker closed 1 year ago

jacobbieker commented 2 years ago

This would add auto-publishing this package to PyPi so it is easily installable and able to be incorporated in other PyPI packages easily. This will publish a new version to PyPi on every release being made.

This PR does not work out of the box, as it needs a PyPi access token stored in PYPI_API_TOKEN in the repository secrets.

For the OpenClimateFix repos, we first published a PyPi package manually and then after that initial publish, made an access token for that specific project that we then put in the repo secrets.

The impetus for this PR is that PyPi will not allow packages to have git dependencies (https://github.com/openclimatefix/nowcasting_dataset/issues/137).

Happy to answer any questions or anything about this!

JamieTaylor-TUOS commented 2 years ago

Hi @jacobbieker, thanks for this - I've resisted uploading any of our packages to PyPi but I appreciate that it does make for more convenient dependency management. I'm away on annual leave until the 5th Oct, but then I'll look to get this implemented and also upload our other public libs to PyPi. Thanks for the workflow and tips.

jacobbieker commented 2 years ago

Hi, I was just curious if you ever had time to look into this?

peterdudfield commented 1 year ago

can we do this for you @JamieTaylor-TUOS , it would make some steps slightly simplier

JamieTaylor-TUOS commented 1 year ago

@jacobbieker and @peterdudfield

Looking at setting this up now - quick question - do either of you know how to get Markdown tables in the README to render properly on PyPi? See https://test.pypi.org/project/pvlive-api/

Have set the long_description_content_type in setup.py to "text/markdown" and installed sphinx-markdown-tables but it still doesn't render them.

ejones18 commented 1 year ago

@jacobbieker and @peterdudfield

Looking at setting this up now - quick question - do either of you know how to get Markdown tables in the README to render properly on PyPi? See https://test.pypi.org/project/pvlive-api/

Have set the long_description_content_type in setup.py to "text/markdown" and installed sphinx-markdown-tables but it still doesn't render them.

I have fixed this, will be including this in #18 when I push the final updates for proxy support