This is a template for Python-based repositories.
The recommended way to use this repo is to
-
Use this project as template: and then run copier locally. Simply click on the "Use this template" button on the GitHub page to create a new repository based on this template.
-
Run copier: you can download Copier and then run the following command:
copier copy "https://github.com/armand-sauzay/python-template.git" <your_folder>
If you want to target a specific branch, you can use:
copier copy --vcs-ref "<python-template-branch>" "https://github.com/armand-sauzay/python-template.git" <target-folder>
These files are used by semantic-release
to determine the type of the next release. The .commitlintrc.json
file is used to lint the commit messages. The .releaserc.json
file is used to determine the version of the next release based on the commit messages. To lint commit messages, this project uses the default configuration of @commitlint/config-conventional
.
The .python-version
file contains the python version used in this project. This project has been built with using pyenv
as python version manager.
This file is used by pre-commit
to determine the hooks that will be run before each commit. The hooks are defined in the hooks
section of the file. The hooks are run in the order they are defined in the file.
This repository uses Github Actions for CI/CD. CI is composed of Lint
with pre-commit and Test
with pytest. Release is composed of Lint
, Test
, Release
with semantic-release.
- Lint is done with pre-commit. To run lint locally, run
pre-commit run --all-files
. - Test is done with pytest. To run test locally, run
pytest
. Or poetry runpytest
if you use poetry as package manager. - Release is done with semantic-release