@@ -70,75 +70,76 @@ dependencies = [
7070 " six~=1.0" ,
7171 ]
7272
73- # Linting and formatting tools use a more narrow specification to ensure
74- # developper consistency. All other dependencies are as above.
75- devel = [
76- " pact-python-cli[devel]" ,
77- " pact-python-ffi[devel]" ,
78- " pact-python[devel-docs]" ,
79- " pact-python[devel-example]" ,
80- " pact-python[devel-test]" ,
81- " pact-python[devel-types]" ,
82- " ruff==0.12.8" ,
83- ]
84- devel-docs = [
85- " mkdocs-github-admonitions-plugin~=0.0" ,
86- " mkdocs-literate-nav~=0.6" ,
87- " mkdocs-material[imaging]~=9.4" ,
88- " mkdocs-section-index~=0.3" ,
89- " mkdocs_gen_files~=0.5" ,
90- " mkdocstrings[python]~=0.23" ,
91- " mkdocs~=1.5" ,
92- " pathspec~=0.0" ,
93- ]
94- devel-example = [
95- " fastapi~=0.0" ,
96- " flask[async]~=3.0" ,
97- " grpcio~=1.0" ,
98- " pact-python[devel-test]" ,
99- " protobuf~=6.0" ,
100- " pydantic~=2.0" ,
101- " pytest-cov~=6.0" ,
102- " pytest~=8.0" ,
103- " testcontainers~=4.0" ,
104- " uvicorn[standard]~=0.0" ,
105- ]
106- devel-test = [
107- " aiohttp~=3.0" ,
108- " flask~=3.0" ,
109- " pact-python-cli" ,
110- " pytest-asyncio~=1.0" ,
111- " pytest-bdd~=8.0" ,
112- " pytest-cov~=6.0" ,
113- " pytest~=8.0" ,
114- " requests~=2.0" ,
115- " testcontainers~=4.0" ,
116- ]
117- devel-types = [
118- " mypy==1.17.1" ,
119- " types-cffi~=1.0" ,
120- " types-grpcio~=1.0" ,
121- " types-protobuf~=6.0" ,
122- " types-requests~=2.0" ,
123- ]
73+ [dependency-groups ]
74+ # Linting and formatting tools use a more narrow specification to ensure
75+ # developper consistency. All other dependencies are as above.
76+ dev = [
77+ " ruff==0.12.8" ,
78+ { include-group = " docs" },
79+ { include-group = " example" },
80+ { include-group = " test" },
81+ { include-group = " types" },
82+ { include-group = " example-v2" },
83+ { include-group = " test-v2" },
84+ ]
12485
125- # Dependencies for v2 example and test environments
126- devel-example-v2 = [
127- " fastapi~=0.0" ,
128- " flask[async]~=3.0" ,
129- " pytest-cov~=6.0" ,
130- " pytest~=8.0" ,
131- " testcontainers~=4.0" ,
132- " uvicorn[standard]~=0.0" ,
133- ]
134- devel-test-v2 = [
135- " fastapi~=0.0" ,
136- " httpx~=0.0" ,
137- " mock~=5.0" ,
138- " pytest-cov~=6.0" ,
139- " pytest~=8.0" ,
140- " uvicorn[standard]~=0.0" ,
141- ]
86+ docs = [
87+ " mkdocs-github-admonitions-plugin~=0.0" ,
88+ " mkdocs-literate-nav~=0.6" ,
89+ " mkdocs-material[recommended,git,imaging]~=9.0" ,
90+ " mkdocs-section-index~=0.3" ,
91+ " mkdocs_gen_files~=0.5" ,
92+ " mkdocstrings[python]~=0.23" ,
93+ " mkdocs~=1.5" ,
94+ " pathspec~=0.0" ,
95+ ]
96+ example = [
97+ " fastapi~=0.0" ,
98+ " flask[async]~=3.0" ,
99+ " grpcio~=1.0" ,
100+ " protobuf~=6.0" ,
101+ " pydantic~=2.0" ,
102+ " pytest-cov~=6.0" ,
103+ " pytest~=8.0" ,
104+ " testcontainers~=4.0" ,
105+ " uvicorn[standard]~=0.0" ,
106+ ]
107+ test = [
108+ " aiohttp~=3.0" ,
109+ " flask~=3.0" ,
110+ " pact-python-cli" ,
111+ " pytest-asyncio~=1.0" ,
112+ " pytest-bdd~=8.0" ,
113+ " pytest-cov~=6.0" ,
114+ " pytest~=8.0" ,
115+ " requests~=2.0" ,
116+ " testcontainers~=4.0" ,
117+ ]
118+ types = [
119+ " mypy==1.17.1" ,
120+ " types-cffi~=1.0" ,
121+ " types-grpcio~=1.0" ,
122+ " types-protobuf~=6.0" ,
123+ " types-requests~=2.0" ,
124+ ]
125+
126+ # Dependencies for v2 example and test environments
127+ example-v2 = [
128+ " fastapi~=0.0" ,
129+ " flask[async]~=3.0" ,
130+ " pytest-cov~=6.0" ,
131+ " pytest~=8.0" ,
132+ " testcontainers~=4.0" ,
133+ " uvicorn[standard]~=0.0" ,
134+ ]
135+ test-v2 = [
136+ " fastapi~=0.0" ,
137+ " httpx~=0.0" ,
138+ " mock~=5.0" ,
139+ " pytest-cov~=6.0" ,
140+ " pytest~=8.0" ,
141+ " uvicorn[standard]~=0.0" ,
142+ ]
142143
143144[build-system ]
144145build-backend = " hatchling.build"
@@ -184,11 +185,15 @@ requires = ["hatch-vcs", "hatchling"]
184185 # workflow.
185186 [tool .hatch .envs .default ]
186187 extra-dependencies = [" hatchling" , " hatch-vcs" ]
187- features = [" devel" ]
188188 installer = " uv"
189189 # This is require to get around an incompatibility between hatch and uv
190190 # See: https://github.com/pypa/hatch/issues/1639
191- pre-install-commands = [" uv pip install -e .[devel]" ]
191+ # See: https://github.com/pypa/hatch/issues/1852
192+ pre-install-commands = [
193+ " uv pip install --group dev -e ." ,
194+ " uv pip install --group dev -e ./pact-python-ffi" ,
195+ " uv pip install --group dev -e ./pact-python-cli" ,
196+ ] #
192197
193198 # Update paths to ensure the shared library can be found
194199 # TODO: See if this can be overridden on a per-platform basis
@@ -211,19 +216,17 @@ requires = ["hatch-vcs", "hatchling"]
211216
212217 # Test environment for running unit tests.
213218 [tool .hatch .envs .test ]
214- features = [" devel-test" ]
215219 installer = " uv"
216- pre-install-commands = [" uv pip install -e ." ]
220+ pre-install-commands = [" uv pip install --group test - e ." ]
217221
218222 [[tool .hatch .envs .test .matrix ]]
219223 python = [" 3.10" , " 3.11" , " 3.12" , " 3.13" , " 3.9" ]
220224
221225 # Test environment for running unit tests. This automatically tests against all
222226 # supported Python versions.
223227 [tool .hatch .envs .example ]
224- features = [" devel-example" ]
225228 installer = " uv"
226- pre-install-commands = [" uv pip install -e ." ]
229+ pre-install-commands = [" uv pip install --group example - e ." ]
227230
228231 [tool .hatch .envs .example .scripts ]
229232 all = [" example" ]
@@ -232,9 +235,9 @@ requires = ["hatch-vcs", "hatchling"]
232235 python = [" 3.10" , " 3.11" , " 3.12" , " 3.13" , " 3.9" ]
233236
234237 [tool .hatch .envs .v2-test ]
235- features = [" v2" , " devel-test-v2 " ]
238+ features = [" v2" ]
236239 installer = " uv"
237- pre-install-commands = [" uv pip install -e ." ]
240+ pre-install-commands = [" uv pip install --group test-v2 - e ." ]
238241
239242 [tool .hatch .envs .v2-test .scripts ]
240243 all = [" test" ]
@@ -244,9 +247,9 @@ requires = ["hatch-vcs", "hatchling"]
244247 python = [" 3.10" , " 3.11" , " 3.12" , " 3.13" , " 3.9" ]
245248
246249 [tool .hatch .envs .v2-example ]
247- features = [" v2" , " devel-example-v2 " ]
250+ features = [" v2" ]
248251 installer = " uv"
249- pre-install-commands = [" uv pip install -e ." ]
252+ pre-install-commands = [" uv pip install --group example-v2 - e ." ]
250253
251254 [tool .hatch .envs .v2-example .scripts ]
252255 all = [" example" ]
0 commit comments