|
2 | 2 | build-backend = "uv_build" |
3 | 3 | requires = ["uv_build>=0.8.4,<0.9.0"] |
4 | 4 |
|
| 5 | +[dependency-groups] |
| 6 | +dev = [ |
| 7 | + "coverage>=7.2", |
| 8 | + "pytest>=6.1", |
| 9 | + "GitPython", |
| 10 | + "packaging", |
| 11 | + "tox>=4.22" |
| 12 | +] |
| 13 | + |
5 | 14 | [project] |
6 | 15 | authors = [ |
7 | 16 | { name = "Cucumber Limited", email = "[email protected]"} |
@@ -37,20 +46,6 @@ readme = "README.md" |
37 | 46 | requires-python = ">=3.9" |
38 | 47 | version = "29.0.1" |
39 | 48 |
|
40 | | -[project.optional-dependencies] |
41 | | -test = [ |
42 | | - # local |
43 | | - "cucumber-messages[test-coverage]", |
44 | | - # external; Must be in sync with [tool.tox] |
45 | | - "tox>=4.2" |
46 | | -] |
47 | | -test-coverage = [ |
48 | | - "coverage", |
49 | | - "GitPython", |
50 | | - "packaging", |
51 | | - "pytest" |
52 | | -] |
53 | | - |
54 | 49 | [project.urls] |
55 | 50 | Changelog = "https://github.com/cucumber/messages/releases" |
56 | 51 | Download = "https://pypi.org/project/cucumber-messages" |
@@ -88,46 +83,17 @@ extend-select = [ |
88 | 83 | # TODO: Evaluate whether to use wildcard (removing need for updates) or explicit imports |
89 | 84 | "src/cucumber_messages/__init__.py" = ["F403"] |
90 | 85 |
|
91 | | -# Once https://github.com/tox-dev/tox/issues/999 is released and available, migrate to the new tox approach |
92 | 86 | [tool.tox] |
93 | | -# language=INI |
94 | | -legacy_tox_ini = """ |
95 | | -[tox] |
96 | | -requires = |
97 | | - tox>=4.2 |
98 | | -env_list = |
99 | | - py{313, 312, 311, 310, 39}-lint-lin |
100 | | - py{py310, py39, 313, 312, 311, 310, 39}-pytest-coverage-lin |
101 | | - py313-pytest-coverage-{win, mac} |
102 | | -distshare = {homedir}/.tox/distshare |
| 87 | +env_list = ["lint", "3.13", "3.12", "3.11", "3.10", "3.9", "pypy310", "pypy39"] |
| 88 | +requires = ["tox>=4.22"] |
103 | 89 |
|
104 | | -[testenv] |
105 | | -platform = |
106 | | - lin: linux |
107 | | - mac: darwin |
108 | | - win: win32 |
| 90 | +[tool.tox.env.lint] |
| 91 | +commands = [["pre-commit", "run", "--all-files", "--show-diff-on-failure"]] |
| 92 | +deps = ["pre-commit-uv>=4.1.1"] |
| 93 | +description = "Run linting and formatting checks (and auto-fixes)" |
109 | 94 |
|
110 | | -[testenv:py{313, 312, 311, 310, 39}-lint-lin] |
111 | | -skip_install = true |
112 | | -description = run code formatter and linter (auto-fix) |
113 | | -deps = |
114 | | - pre-commit-uv>=4.1.1 |
115 | | -commands = |
116 | | - pre-commit run --all-files --show-diff-on-failure |
117 | | -
|
118 | | -[testenv:py{py310, py39, 313, 312, 311, 310, 39}-pytest-coverage-{lin, win, mac}] |
119 | | -deps = |
120 | | - .[test-coverage] |
121 | | -commands = |
122 | | - coverage run --append -m pytest -vvl |
123 | | -
|
124 | | -[gh-actions] |
125 | | -python = |
126 | | - 3.9: py39 |
127 | | - 3.10: py310 |
128 | | - 3.11: py311 |
129 | | - 3.12: py312 |
130 | | - 3.13: py313 |
131 | | - pypy-3.9: pypy39 |
132 | | - pypy-3.10: pypy310 |
133 | | -""" |
| 95 | +[tool.tox.env_run_base] |
| 96 | +commands = [["coverage", "run", "--append", "-m", "pytest", "-vvl"]] |
| 97 | +dependency_groups = [ |
| 98 | + "dev" |
| 99 | +] |
0 commit comments