mirror of https://github.com/pypa/hatch.git
95 lines
2.4 KiB
TOML
95 lines
2.4 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 {verbosity:flag:-1} -e ./backend",
|
|
]
|
|
[envs.default.scripts]
|
|
full = "pytest -n auto --reruns 5 --reruns-delay 3 -r aR --cov-report=term-missing --cov-config=pyproject.toml --cov=src/hatch --cov=backend/src/hatchling --cov=tests {args:tests}"
|
|
dev = "pytest -p no:randomly --no-cov {args:tests}"
|
|
|
|
[envs.test.overrides]
|
|
env.HERMETIC_TESTS.type = [
|
|
{ value = "container", if = ["true"] },
|
|
"virtual",
|
|
]
|
|
|
|
[[envs.test.matrix]]
|
|
python = ["37", "38", "39", "310"]
|
|
|
|
[envs.lint]
|
|
detached = true
|
|
dependencies = [
|
|
"bandit>=1.7.4",
|
|
"black>=22.3.0",
|
|
"flake8>=4.0.1",
|
|
"flake8-bugbear>=22.3.23",
|
|
"flake8-quotes>=3.3.1",
|
|
"flake8-tidy-imports>=4.8.0",
|
|
"isort>=5.10.1",
|
|
"mypy>=0.942",
|
|
]
|
|
[envs.lint.scripts]
|
|
typing = "mypy --install-types --non-interactive {args:backend/src/hatchling src/hatch tests}"
|
|
security = "bandit --quiet --recursive --skip B101,B102,B105,B110,B112,B301,B307,B324,B403,B404,B603,B604,B606,B607 {args:.}"
|
|
style = [
|
|
"flake8 {args:.}",
|
|
"black --check --diff {args:.}",
|
|
"isort --check-only --diff {args:.}",
|
|
]
|
|
fmt = [
|
|
"isort {args:.}",
|
|
"black {args:.}",
|
|
"style",
|
|
]
|
|
all = [
|
|
"style",
|
|
"typing",
|
|
"security",
|
|
]
|
|
|
|
[envs.docs]
|
|
dependencies = [
|
|
"mkdocs~=1.3.0",
|
|
"mkdocs-material~=8.3.9",
|
|
# Plugins
|
|
"mkdocs-minify-plugin~=0.5.0",
|
|
"mkdocs-git-revision-date-localized-plugin~=1.0.1",
|
|
"mkdocstrings-python~=0.7.1",
|
|
"mkdocs-redirects~=1.0.4",
|
|
# https://github.com/jimporter/mike/issues/82#issuecomment-1172913929
|
|
"mike @ https://github.com/jimporter/mike/archive/392d57b8bb9d14bcedf2451a0dc302709f8055eb.zip",
|
|
# Extensions
|
|
"mkdocs-click~=0.8.0",
|
|
"pymdown-extensions~=9.5.0",
|
|
"mkdocs-material-extensions~=1.0.3",
|
|
# Necessary for syntax highlighting in code blocks
|
|
"pygments~=2.12.0",
|
|
]
|
|
[envs.docs.env-vars]
|
|
SOURCE_DATE_EPOCH = "1580601600"
|
|
[envs.docs.scripts]
|
|
build = "mkdocs build --clean --strict {args}"
|
|
serve = "mkdocs serve --dev-addr localhost:8000 {args}"
|
|
ci-build = "mike deploy --update-aliases {args}"
|
|
|
|
[envs.backend]
|
|
detached = 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"
|