pypa-hatch/hatch.toml

89 lines
2.0 KiB
TOML

[envs.default]
dependencies = [
"coverage[toml]>=6.2",
"pytest",
"pytest-cov",
"pytest-mock",
"pytest-randomly",
"pytest-rerunfailures",
"pytest-xdist",
]
post-install-commands = [
"python -m pip install --disable-pip-version-check -q -e ./backend",
]
[envs.default.scripts]
full = "pytest -n auto --reruns 5 --reruns-delay 1 --cov-report=term-missing --cov-config=pyproject.toml --cov=src/hatch --cov=backend/src/hatchling --cov=tests"
dev = "pytest --no-cov"
[[envs.test.matrix]]
python = ["37", "38", "39", "310"]
[envs.lint]
skip-install = true
dependencies = [
"flake8>=4.0.1",
"flake8-bugbear>=22.1.11",
"flake8-quotes>=3.3.1",
"black>=22.1.0",
"isort>=5.10.1",
"mypy>=0.931",
]
[envs.lint.scripts]
typing = "mypy --install-types --non-interactive src/hatch tests"
style = [
"flake8 .",
"black --check --diff .",
"isort --check-only --diff .",
]
fmt = [
"isort .",
"black .",
"style",
]
all = [
"style",
"typing",
]
[envs.docs]
dependencies = [
"mkdocs~=1.2.3",
"mkdocs-material~=8.1.11",
# Plugins
"mkdocs-minify-plugin~=0.5.0",
"mkdocs-git-revision-date-localized-plugin~=0.12.1",
"mkdocstrings~=0.17.0",
"mike~=1.1.2",
"mkdocs-redirects~=1.0.3",
# Extensions
"mkdocs-click~=0.5.0",
"pymdown-extensions~=9.2",
"mkdocs-material-extensions~=1.0.3",
"mkpatcher~=1.0.2",
# Necessary for syntax highlighting in code blocks
"Pygments~=2.11.2",
# Fixes
#
# https://github.com/mkdocstrings/autorefs/issues/17
"mkdocs-autorefs!=0.4.0",
]
[envs.docs.env-vars]
SOURCE_DATE_EPOCH = "1580601600"
[envs.docs.scripts]
build = "mkdocs build --clean --strict"
serve = "mkdocs serve --dev-addr localhost:8000"
ci-build = "mike deploy --no-redirect --update-aliases"
[envs.backend]
skip-install = true
dependencies = [
"build~=0.7.0",
"httpx",
]
[envs.backend.env-vars]
HATCH_BUILD_CLEAN = "true"
[envs.backend.scripts]
build = "python -m build backend"
publish = "hatch publish backend/dist"
update-licenses = "python backend/scripts/update_licenses.py"