Template for python project using poetry. abc.
This README.md will be overwritten by setup.sh.
Modify the repository info in setup.sh if necessary:
Value | Explanation | Default |
---|---|---|
py_ver |
Python version. Multiple versions can be set as comma separated value like "3.10,3.9,3.8". | "3.10" |
py_main |
Main python version used by GitHub Actions. | The first version in py_ver |
os |
OS on which GitHub Actions job runs. Multiple OS can be set as comma separated value like "ubuntu-latest,macos-latest,windows-latest" | "ubuntu-latest" |
os_main |
Main OS used by GitHub Actions. | The first OS in os |
user |
User name in pyproject.toml and LICCENSE. | git config --get user.name |
email |
Email address in pyproject.toml. | git config --get user.email |
cli |
Set yes to create a template for command line interface. |
"no" |
Run setup.sh
.
The repository has following features:
- Environment management with Poetry.
- Code check/lint with pre-commit.
- For Python
- Black
- Flake8 (actually, pyproject-flake8 is used to read options from pyproject.toml)
- isort
- mypy
- For shell script
- For Markdown
- And other small checks including YAML/JSON/TOML checks.
- All packages instead of pre-commit-hooks are managed by Poetry (pyproject.toml).
- Most of options are managed by pyproject.toml.
- For Python
- Tests using pytest.
- pytest-xdist is used for the parallel test.
- Automatic tests with GitHub Actions.
- Generate coverage results in coverage branch (made for
py_main
andos_main
).
- Generate coverage results in coverage branch (made for
- Package version check/update with Renovate.
- To enable renovate, you need to install Renovate into your repository.
- The example of the renovate.json is given in this template.
- .gitignore for Python