pytestfor tests:make testrufffor linting/formatting:make lint(replaces bothblackandisort)- pyproject-pipenv to make sure dependencies in pyproject.toml and Pipfile are in sync
.githubwith actions ready to be used- test runs lint checks, unit tests and pyproject-pipenv
- publish-dev publishes feature branches (
dev/dev-*) to: - publish-main publishes semver tags to:
- pypi
- docker image to ghcr.io
- Replace folder
examplewith the actual package - Replace
LICENSEif MIT does not apply - Search the project for
# TODOto find the (minimum list of) places that need to be changed. - Add PYPI credentials to secrets
PYPI_USERNAMEandPYPI_TOKENto publish tags to pypiTESTPYPI_USERNAMEandTESTPYPI_TOKENto publish dev branches to testpypi
- Add codecov token
CODECOV_TOKENtaken from link above
- Replace this README.md - template below
publish-dev workflow publishes dev/dev-* branches to testpypi.
Other common approach to publish dev branches is to use pre-release channels: version the package with a rc or beta suffix (such as 1.0.0-beta1) and pypi will consider pre-release. In order to install this, the user needs to do pip install PACKAGE --pre otherwise the latest stable is picked up.
However this will "pollute" your pypi index and it still requires you to bump the version (1.0.0-beta1 < 1.0.0) or to install the branch using specific version.
Yet another approach is to simply use an entirely different package name for the dev releases. Tensorflow does that, for example, with tf-nightly.
CLI that echos whatever you tell it to.
pip install fp-github-template-example
$ example-cli
Got nothing to say?
$ example-cli hello
HELLO right back at ya!
>>> from example import demo
>>> demo.echo('ehlo')
'EHLO right back at ya!'Check out CONTRIBUTING.md