Skip to content

Commit fbf772f

Browse files
committed
chore: move to using dependency-groups
Signed-off-by: Henry Schreiner <[email protected]>
1 parent db197f4 commit fbf772f

File tree

5 files changed

+53
-45
lines changed

5 files changed

+53
-45
lines changed

Diff for: .pre-commit-config.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ repos:
6363
- validate-pyproject[all]>=0.13
6464

6565
- repo: https://github.com/python-jsonschema/check-jsonschema
66-
rev: 0.29.4
66+
rev: 0.31.1
6767
hooks:
6868
- id: check-metaschema
6969
files: \.schema\.json$

Diff for: .readthedocs.yml

+12-11
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,24 @@
55
version: 2
66

77
build:
8-
os: "ubuntu-22.04"
8+
os: ubuntu-lts-latest
99
tools:
10-
python: "3.10"
10+
python: latest
11+
jobs:
12+
pre_create_environment:
13+
- asdf plugin add uv
14+
- asdf install uv latest
15+
- asdf global uv latest
16+
create_environment:
17+
- uv venv $READTHEDOCS_VIRTUALENV_PATH
18+
install:
19+
# Use a cache dir in the same mount to halve the install time
20+
- VIRTUAL_ENV=$READTHEDOCS_VIRTUALENV_PATH uv sync --cache-dir $READTHEDOCS_VIRTUALENV_PATH/../../uv_cache --group docs --extra all
1121

1222
# Build documentation in the docs/ directory with Sphinx
1323
sphinx:
1424
configuration: docs/conf.py
1525

16-
# Build documentation with MkDocs
17-
#mkdocs:
18-
# configuration: mkdocs.yml
19-
2026
# Optionally build your docs in additional formats such as PDF
2127
formats:
2228
- pdf
23-
24-
python:
25-
install:
26-
- requirements: docs/requirements.txt
27-
- {path: ., extra_requirements: [all], method: pip}

Diff for: docs/requirements.txt

-9
This file was deleted.

Diff for: pyproject.toml

+33-12
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,32 @@ all = [
3535
"trove-classifiers>=2021.10.20",
3636
]
3737
store = ["validate-pyproject-schema-store"]
38+
39+
[project.scripts]
40+
validate-pyproject = "validate_pyproject.cli:main"
41+
42+
[project.entry-points."validate_pyproject.tool_schema"]
43+
setuptools = "validate_pyproject.api:load_builtin_plugin"
44+
distutils = "validate_pyproject.api:load_builtin_plugin"
45+
46+
[project.entry-points."repo_review.checks"]
47+
validate_pyproject = "validate_pyproject.repo_review:repo_review_checks"
48+
49+
[project.entry-points."repo_review.families"]
50+
validate_pyproject = "validate_pyproject.repo_review:repo_review_families"
51+
52+
[dependency-groups]
53+
dev = [
54+
{ include-group = "test" },
55+
]
56+
docs = [
57+
"furo>=2023.08.17",
58+
"sphinx>=7.2.2",
59+
"sphinx-argparse>=0.3.1",
60+
"sphinx-copybutton",
61+
"sphinx-jsonschema>=1.16.11",
62+
"sphinxemoji",
63+
]
3864
test = [
3965
"setuptools",
4066
"pytest>=8.3.3",
@@ -49,18 +75,13 @@ typecheck = [
4975
"importlib-resources",
5076
]
5177

52-
[project.scripts]
53-
validate-pyproject = "validate_pyproject.cli:main"
54-
55-
[project.entry-points."validate_pyproject.tool_schema"]
56-
setuptools = "validate_pyproject.api:load_builtin_plugin"
57-
distutils = "validate_pyproject.api:load_builtin_plugin"
58-
59-
[project.entry-points."repo_review.checks"]
60-
validate_pyproject = "validate_pyproject.repo_review:repo_review_checks"
61-
62-
[project.entry-points."repo_review.families"]
63-
validate_pyproject = "validate_pyproject.repo_review:repo_review_families"
78+
[tool.uv]
79+
environments = [
80+
"python_version >= '3.9'",
81+
]
82+
dev-dependencies = [
83+
"validate_pyproject[all]",
84+
]
6485

6586
[tool.setuptools_scm]
6687
version_scheme = "no-guess-dev"

Diff for: tox.ini

+7-12
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# THIS SCRIPT IS SUPPOSED TO BE AN EXAMPLE. MODIFY IT ACCORDING TO YOUR NEEDS!
44

55
[tox]
6-
minversion = 3.24
6+
minversion = 4.22
77
envlist = default
88
isolated_build = True
99

@@ -16,9 +16,8 @@ passenv =
1616
HOME
1717
SETUPTOOLS_*
1818
VALIDATE_PYPROJECT_*
19-
extras =
20-
all
21-
test
19+
groups = test
20+
extras = all
2221
commands =
2322
pytest {posargs}
2423

@@ -41,9 +40,8 @@ changedir = {toxinidir}
4140
passenv =
4241
TERM
4342
# ^ ensure colors
44-
extras =
45-
all
46-
typecheck
43+
extras = all
44+
groups = typecheck
4745
commands =
4846
python -m mypy {posargs:--pretty --show-error-context src}
4947

@@ -78,11 +76,8 @@ setenv =
7876
linkcheck: BUILD = linkcheck
7977
passenv =
8078
SETUPTOOLS_*
81-
extras =
82-
all
83-
deps =
84-
-r {toxinidir}/docs/requirements.txt
85-
# ^ requirements.txt shared with Read The Docs
79+
extras = all
80+
groups = docs
8681
commands =
8782
sphinx-build -v -T -j auto --color -b {env:BUILD} -d "{env:BUILDDIR}/doctrees" "{env:DOCSDIR}" "{env:BUILDDIR}/{env:BUILD}" {posargs}
8883

0 commit comments

Comments
 (0)