(tools-ref-target)= # Tools Tools employed by generated projects. Most are installed automatically – via the `dev` extra, `pre-commit` or `nox` session venvs – and don't require manual setup. ## Core :::{tool} copier ::: [Copier](https://copier.readthedocs.io/en/stable/) : Renders and updates the project from this template, tracking answers in {path}`.copier-answers.yml`. Requires `copier-template-extensions`. :::{tool} uv ::: [uv](https://docs.astral.sh/uv/) (optional) : Speeds up virtual environment creation and installs, provisions the {question}`venv_python` version automatically. The tooling falls back to `venv` + `pip` without it. :::{tool} nox ::: [nox](https://nox.thea.codes/en/stable/) : Runs isolated sessions for [tests](run-tests-target), linting and [docs](build-docs-target), defined in {path}`noxfile.py`. :::{tool} pre-commit ::: [pre-commit](https://pre-commit.com) : Manages the git hooks configured in {path}`.pre-commit-config.yaml`. :::{tool} towncrier ::: [towncrier](https://towncrier.readthedocs.io/en/stable/) : Builds {path}`CHANGELOG.md` from [news fragments](news-fragment-target). :::{tool} direnv ::: [direnv](https://direnv.net/) (optional) : Sets up and activates the development environment on shell entry via {path}`.envrc.example`. :::{tool} make ::: `make` (optional) : Convenience wrapper around the above, see {path}`Makefile`. ## Formatting and fixes Run as {tool}`pre-commit` hooks: :::{tool} black ::: [black](https://black.readthedocs.io/en/stable/) : Code formatting. [blacken-docs](https://github.com/adamchainz/blacken-docs) additionally formats Python snippets in the documentation. :::{tool} isort ::: [isort](https://pycqa.github.io/isort/) : Import sorting. :::{tool} pyupgrade ::: [pyupgrade](https://github.com/asottile/pyupgrade) : Syntax upgrades to {question}`python_requires`. :::{tool} salt-rewrite ::: [salt-rewrite](https://github.com/saltstack/salt-rewrite) : Salt-specific docstring and test suite fixups. [pre-commit-hooks](https://github.com/pre-commit/pre-commit-hooks), [remove-import-headers](https://github.com/saltstack/pre-commit-remove-import-headers) : Basic file hygiene. ## Linting and analysis :::{tool} pylint ::: [pylint](https://pylint.readthedocs.io/en/stable/) : Code and test suite linting (`nox` `lint-*` sessions, configured in `.pylintrc`). :::{tool} bandit ::: [bandit](https://bandit.readthedocs.io/en/latest/) : Security checks. :::{tool} actionlint ::: [actionlint](https://github.com/rhysd/actionlint) : GitHub Actions workflow linting, including [shellcheck](https://www.shellcheck.net/) for embedded shell scripts. :::{tool} ty ::: [ty](https://docs.astral.sh/ty/) : Static type checking, only generated when {question}`typing` is enabled. Project-local hooks in {path}`.pre-commit-hooks` : Autogenerated module docs and CLI example checks. ## Testing :::{tool} pytest ::: [pytest](https://docs.pytest.org/en/stable/) : Test runner, extended by [pytest-salt-factories](https://pytest-salt-factories.readthedocs.io/en/latest/) (including its `docker` extra when {question}`test_containers` is enabled) and [pytest-instafail](https://github.com/pytest-dev/pytest-instafail). :::{tool} coverage ::: [coverage](https://coverage.readthedocs.io/en/latest/) : Code coverage, configured in `.coveragerc`. ## Documentation :::{tool} sphinx ::: [Sphinx](https://www.sphinx-doc.org/en/master/) : Documentation builder, using the [furo](https://pradyunsg.me/furo/) theme and several extensions, notably [myst-parser](https://myst-parser.readthedocs.io/en/latest/) (Markdown support). The `docs-dev` session serves live-reloading docs via [sphinx-autobuild](https://github.com/sphinx-doc/sphinx-autobuild). ## Packaging :::{tool} setuptools ::: [setuptools](https://setuptools.pypa.io/en/latest/) : Build backend, deriving the package version from git tags via [setuptools-scm](https://setuptools-scm.readthedocs.io/latest/). :::{tool} build ::: [build](https://build.pypa.io/en/stable/) : Used by the [release workflows](workflows-target) to build the sdist and wheel.