Things you have to do in order to properly set up our project:
- replace all references of
package_name
with the corresponding value of your project in thepyproject.toml
,src
folder andREADME.md
files. - replace all references of
owner_name
with the corresponding value of your project in thepyproject.toml
andREADME.md
files. - setup the corresponding Python versions in the
pyproject.toml
and.github/workflows/ci.yml
files - uncomment the necessary
wheels
part in.github/workflows/release.yml
. If you choose the cibuildwheel (which only works if the build of your project is platform related, e.g. if it has C or C++ extensions) you may need to set Python versions used for the build. - set the code owners in the
.github
directory if necessary. - add your PyPI API token as Github secret with the name
PYPI_API_TOKEN
. - change your name in the
LICENSE
file.
This project provide a flexible and lightweight Python package template. It includes the following components:
- a
pyproject.toml
file which define the configuration of the dependencies. The specifications defined by PEP 621 of project metadata are stored in this file. - a
requirements-dev.txt
file which contains development dependencies. - a
.pre-commit-config.yaml
pipeline which apply the same dependencies
The project contains multiple Github workflow, including:
ci
, apply linting and run tests withpytest
andpytest-cov
.draft
, draft a new release when a commit is pushed on branchmain
ormaster
given its config file located at.github/release-drafter.yml
.release
, build the package withcibuildwheel
when a release is published and upload it to the PyPI index.pre_commit_auto_update
, run apre-commit autoupdate
every month and open a pull request if needed.pr_description_enforcer
, enforce description on pull requests, otherwise close the pull request.pr_labeler
, apply a corresponding label on a pull request given its config file located at.github/pr-labeler.yml
Some of these actions requires you to allow Github actions to create or approve pull requests. Learn more.
The generated badges are located in the .github/assets/badges/
folder.
DELETE EVERYTHING ABOVE FOR YOUR PROJECT
My description
Install the package from the PyPI registry.
pip install package
Install the package from the latest commit of the repository.
pip install git+https://github.com/owner_name/package_name
from package_name import foo
Insert example usage here.
Clone the project
git clone https://github.com/owner_name/package_name
In order to install all development dependencies, run the following command:
pip install -e ".[dev]"
To ensure that you follow the development workflow, please setup the pre-commit hooks:
pre-commit install