Skip to content

Commit

Permalink
Add hatch-test env customization (#1627)
Browse files Browse the repository at this point in the history
  • Loading branch information
flying-sheep authored Sep 2, 2024
1 parent 0bc2b39 commit 2e3ab38
Showing 1 changed file with 21 additions and 7 deletions.
28 changes: 21 additions & 7 deletions hatch.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,26 @@ features = ["dev"]

[envs.docs]
features = ["doc"]
dependencies = ["setuptools"] # https://bitbucket.org/pybtex-devs/pybtex/issues/169
extra-dependencies = ["setuptools"] # https://bitbucket.org/pybtex-devs/pybtex/issues/169
scripts.build = "sphinx-build -M html docs docs/_build -W --keep-going {args}"
scripts.clean = "git clean -fdX -- {args:docs}"

[envs.docs.scripts]
build = "sphinx-build -M html docs docs/_build -W --keep-going {args}"
clean = "git clean -fX -- docs"
[envs.towncrier]
scripts.build = "python3 ci/scripts/towncrier_automation.py {args}"
scripts.clean = "git restore --source=HEAD --staged --worktree -- docs/release-notes"

[envs.towncrier.scripts]
build = "python3 ci/scripts/towncrier_automation.py {args}"
clean = "git restore --source=HEAD --staged --worktree -- docs/release-notes"
[envs.hatch-test]
default-args = []
extra-dependencies = ["ipykernel"]
features = ["dev", "test"]
overrides.matrix.deps.env-vars = [
{ key = "UV_PRERELEASE", value = "allow", if = ["pre"] },
{ key = "UV_RESOLUTION", value = "lowest-direct", if = ["min"] },
]
overrides.matrix.deps.python = [
{ if = ["min"], value = "3.9" },
{ if = ["stable", "pre"], value = "3.12" },
]

[[envs.hatch-test.matrix]]
deps = ["stable", "pre", "min"]

0 comments on commit 2e3ab38

Please sign in to comment.