Skip to content

Commit 641ea31

Browse files
authored
Update to dependency groups. (#290)
1 parent f88d791 commit 641ea31

File tree

5 files changed

+32
-25
lines changed

5 files changed

+32
-25
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@ jobs:
3232
name: Pre-commit checks
3333
uses: beeware/.github/.github/workflows/pre-commit-run.yml@main
3434
with:
35-
runner-os: macos-latest
35+
pre-commit-source: "--group pre-commit"
3636

3737
towncrier:
3838
name: Check towncrier
3939
uses: beeware/.github/.github/workflows/towncrier-run.yml@main
4040
with:
41-
runner-os: macos-latest
41+
tox-source: "--group tox-uv"
4242

4343
package:
4444
name: Package Toga-Chart
@@ -82,10 +82,7 @@ jobs:
8282
path: dist
8383

8484
- name: Install Tox
85-
uses: beeware/.github/.github/actions/install-requirement@main
86-
with:
87-
requirements: tox
88-
extra: dev
85+
run: python -m pip install --group tox-uv
8986

9087
- name: Test
9188
run: tox -e py --installpkg dist/toga_chart-*.whl

.readthedocs.yaml

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
version: 2
66

77
build:
8-
os: ubuntu-22.04
8+
os: ubuntu-24.04
99
tools:
1010
# Docs are always built on Python 3.12. See also the tox config.
1111
python: "3.12"
@@ -14,8 +14,11 @@ build:
1414
# RTD defaults to a depth of 50 but we may require much more git history to
1515
# accurately determine the SCM version
1616
- git fetch --unshallow
17+
pre_install:
18+
- python -m pip install --upgrade pip
19+
- python -m pip install --group 'tox-uv'
1720
pre_build:
18-
- tox -e docs-lint
21+
- python -m tox -e docs-lint
1922

2023
# Build documentation in the docs/ directory with Sphinx
2124
sphinx:
@@ -27,12 +30,3 @@ sphinx:
2730
formats:
2831
- epub
2932
- pdf
30-
31-
# Install extras for build - dev is needed to run tox
32-
python:
33-
install:
34-
- method: pip
35-
path: .
36-
extra_requirements:
37-
- dev
38-
- docs

changes/290.misc.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Updates toga-chart to dependency groups., and tox-uv.

pyproject.toml

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,16 +42,33 @@ dependencies = [
4242
"toga-core >= 0.5.0, < 0.6.0",
4343
]
4444

45-
[project.optional-dependencies]
45+
[dependency-groups]
4646
# Extras used by developers *of* briefcase are pinned to specific versions to
4747
# ensure environment consistency.
48-
dev = [
48+
pre-commit = [
4949
"pre-commit == 4.3.0",
50+
]
51+
52+
test = [
5053
"pytest == 8.4.2",
54+
]
55+
56+
towncrier = [
57+
"towncrier==25.8.0",
58+
]
59+
60+
tox-uv = [
61+
"tox-uv == 1.28.0",
62+
]
63+
64+
dev = [
5165
"setuptools_scm == 9.2.1",
52-
"tox == 4.30.3",
5366
"toga-dummy >= 0.5.0, < 0.6.0",
67+
{include-group = "pre-commit"},
68+
{include-group = "test"},
69+
{include-group = "tox-uv"},
5470
]
71+
5572
# Docs are always built on a specific Python version; see RTD and tox config files.
5673
docs = [
5774
"furo == 2025.9.25",

tox.ini

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,12 @@ envlist = towncrier-check,docs{,-lint,-all},package,py{39,310,311,312,313}
33
skip_missing_interpreters = true
44

55
[testenv]
6-
extras =
7-
dev
6+
dependency_groups = test
87
commands =
98
python -m pytest {posargs:-vv --color yes}
109

1110
[testenv:towncrier{,-check}]
12-
deps =
13-
towncrier==25.8.0
11+
dependency_groups = towncrier
1412
commands =
1513
check : python -m towncrier.check --compare-with origin/main
1614
!check : python -m towncrier {posargs}
@@ -27,7 +25,7 @@ base_python = py312
2725
suicide_timeout = 1
2826
package = wheel
2927
wheel_build_env = .pkg
30-
extras = docs
28+
dependency_groups = docs
3129
commands =
3230
!lint-!all-!live : python -m sphinx {[docs]sphinx_args} {posargs} --builder html {[docs]docs_dir} {[docs]build_dir}{/}html
3331
lint : python -m sphinx {[docs]sphinx_args} {posargs} --builder spelling {[docs]docs_dir} {[docs]build_dir}{/}spell

0 commit comments

Comments
 (0)