Setup of py-template¶
TLDR: same as
README.md
, but needs GitHub Actions Secrets set on a repo/organization level andpoetry
+pre-commit
setup.
WARNING: use repository name which is ABSENT from pypi.org or package index of your choosing (unless you want to release privately, then see here).
Initial Setup¶
- Click green button
Use this template
- Name your repository, but remember to use NAME ABSENT in pypi.org and use
snake_case
for a name! - Enable
gh-pages
branch on/
to have your documentation hosted (see here) - Enable hosted
renovatebot
, see here - Create
poetry
environment (make sure you have it installed, see here for more info) - Enable
pre-commit
hooks locally
Last two steps can also be quickly wrapped in a single function usable from your shell, see here for more information
Setup Credentials for Semantic Release to PyPI¶
If you don't want to release your package, you don't have to perform this step!
Please add to your repository's Encrypted Secrets the following:
PYPI_NAME
- any name of package index, e.g.pypi
ortest-pypi
-
PYPI_URL
-url
to hosting: -
https://test.pypi.org/legacy/
- fortest-pypi
-
https://pypi.org/legacy/
- forpypi
-
PYPI_TOKEN
- account-wide token allowing for package creation
Additionally for gemfury.com
¶
To upload to gemfury.com
package registry one has to manually add:
as the first command in Deploy to registry
here .