Project template for Dockerized pip package development.
- This project is fully Dockerized. For convenience, a
Makefile
is provided to build/test during development. - Python 3.11 is the primary version for development, while 3.7 - 3.10 are included for compatibility. You may want to change them in the future.
See
docker-compose.yml
andMakefile
. Refer to this page for Python versions you may want to support. - Linting is done using
flake8
and testing is done usingpytest
. - CI is designed for GitHub Actions. See
.github
. Coverage is reported to Coveralls. - An automatic release to Pypi is made through GitHub Actions whenever you publish a new release on GitHub.
LICENSE
in the template is MIT.
- Please familiarize yourself with all the concept involved. I am not responsible for things breaking if you use this template.
- Python and different Python versions
- Creating pip packages. I made a tutorial a few years ago, which you can see here.
- Docker and docker-compose
- Linting and flake8
- Unit testing and pytest
- CI and GitHub Actions
- Code coverage
- Find all instances of
pip-package-template-docker
and replace them with your desired package name. This is the name of your package known to Pypi andpip install
. - Rename the
src/pip_package_template_docker
folder. Find all instances ofpip_package_template_docker
and replace them accordingly. This is what yourimport
statement would use in Python code. - Go through
src/setup.py
and make necessary changes. Please do not link your project to my name, email, or GitHub. - Replace
README.md
with your own. If you would like to use the badges, please change the links to point to your project. - Replace
LICENSE
with your own. Please do not license your project under my name. - Project version is found in the
__init__.py
file in your package. Update it accordingly as you develop your package. - Put unittests under
src/tests
. - Sign up for necessary accounts, such as Pypi and Coveralls.
- Acquire a Pypi token and put it under your project as
PYPI_API_TOKEN
. On Pypi it is found under Account settings -> API tokens -> Add API token. On GitHub it is located in your project settings -> Security -> Secrets and variables -> Repository secrets. You may need to manually update once before a project-specific token can be acquired.