To check and resolve linting issues in the codebase, run:
poetry run ruff check --fix
To check and resolve formatting issues in the codebase, run:
poetry run ruff format
To check the unit tests in the codebase, run:
poetry run pytest
To check the typing in the codebase, run:
poetry run mypy
To generate a code coverage report after testing locally, run:
poetry run coverage html
To check the lock file is up-to-date:
poetry check --lock
To be able to run shortcut task commands, first install the Poetry plugin poethepoet
:
poetry self add 'poethepoet[poetry_plugin]'
Note
Upon the release of Poetry v2.0.0, Poetry will automatically support bootstrap installation of project-specific plugins and installation of the task runner will become automatic for this project.
The pyproject.toml
syntax will be:
[tool.poetry]
requires-poetry = ">=2.0"
[tool.poetry.requires-plugins]
poethepoet = ">=0.29"
poetry task check-lock
poetry task check-format
poetry task check-lint
poetry task check-tests
poetry task check-typing
poetry task check-all
poetry task fix-format
poetry task fix-lint
poetry task fix-all
poetry task fix-and-check-all