- ruff: linting and code formatting.
- pre-commit: pre-commit hooks.
- pytest: testing.
- logging: logging.
- devcontainer: vscode devcontainer.
- GitHub Actions: GitHub Actions.
Change python_template
folder name to your package name.
Meanwhile, replace the python_template
in pyproject.toml
.
I've listed the recommended vscode extensions in .vscode/extensions.json
.
Then, navigate to Extensions
in VSCode. Install all extensions in RECOMMENDED
tab.
curl -sSL https://install.python-poetry.org | python -
poetry sync
poetry run pre-commit install
poetry run pre-commit install --hook-type commit-msg
Install Dev Containers
extension in VSCode.
Click ctrl + shift + p
, select Dev Containers: Open Folder in Container
.
Wait for the dev container to be built.
(if you want to left dev container running, click ctrl + shift + p
, select Dev Containers: Reopen Folder Locally
)
The start
command is defined in pyproject.toml
. The main.py
is the entrypoint.
poetry run start
The pytest
command is defined in pyproject.toml
. The tests/test_*.py
files are the test cases.
poetry run pytest