Skip to content

Commit 46e9942

Browse files
authored
👷 update dependencies and tests (#101)
* 👷 Update newer python and hatch support - Add support for python 3.13 and 3.14 - Add support for hatch 1.13 ~ 1.16 - Fix gen env is [not recognized as a builder env](pypa/hatch#2113) * 🧪 Fix tests in newer hatch - Set `self.project.app` in `PipCompileFixture` to be the application - Fix [removed `--no-python-version-warning`](pypa/hatch@1538938) in newer hatch * 👷 Upgrade codecov upload action * 🧪 Fix more indirect coverage missing * 🐛 Fix mkdocstrings python import renamed to inventories
1 parent 475f0cc commit 46e9942

28 files changed

Lines changed: 1772 additions & 1192 deletions

.github/workflows/tests.yaml

Lines changed: 49 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,22 @@ jobs:
2424
fail-fast: false
2525
matrix:
2626
include:
27+
- {
28+
name: Python-3.14,
29+
python: "3.14",
30+
command: "matrix:cov",
31+
matrix: "+py=3.14",
32+
hatch_version: "1.0",
33+
os: ubuntu-latest,
34+
}
35+
- {
36+
name: Python-3.13,
37+
python: "3.13",
38+
command: "matrix:cov",
39+
matrix: "+py=3.13",
40+
hatch_version: "1.0",
41+
os: ubuntu-latest,
42+
}
2743
- {
2844
name: Python-3.12,
2945
python: "3.12",
@@ -112,6 +128,38 @@ jobs:
112128
hatch_version: "1.12.0",
113129
os: ubuntu-latest,
114130
}
131+
- {
132+
name: Hatch-1.13.x,
133+
python: "3.11",
134+
command: "versions:cov",
135+
matrix: "+version=1.13.x",
136+
hatch_version: "1.13.0",
137+
os: ubuntu-latest,
138+
}
139+
- {
140+
name: Hatch-1.14.x,
141+
python: "3.11",
142+
command: "versions:cov",
143+
matrix: "+version=1.14.x",
144+
hatch_version: "1.14.2",
145+
os: ubuntu-latest,
146+
}
147+
- {
148+
name: Hatch-1.15.x,
149+
python: "3.11",
150+
command: "versions:cov",
151+
matrix: "+version=1.15.x",
152+
hatch_version: "1.15.1",
153+
os: ubuntu-latest,
154+
}
155+
- {
156+
name: Hatch-1.16.x,
157+
python: "3.11",
158+
command: "versions:cov",
159+
matrix: "+version=1.16.x",
160+
hatch_version: "1.16.2",
161+
os: ubuntu-latest,
162+
}
115163
- {
116164
name: Hatch-Windows,
117165
python: "3.11",
@@ -155,6 +203,6 @@ jobs:
155203
echo "::remove-matcher owner=python::"
156204
- name: Upload coverage reports to Codecov
157205
if: matrix.os == 'ubuntu-latest' && matrix.python == '3.11' && matrix.command == 'matrix:cov'
158-
uses: codecov/codecov-action@v3
206+
uses: codecov/codecov-action@v5
159207
env:
160208
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

hatch_pip_compile/plugin.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,9 +204,9 @@ def lockfile_up_to_date(self) -> bool:
204204
if not valid_constraint:
205205
return False
206206
if not self.dependencies and self.piptools_lock_file.exists():
207-
return False
207+
return False # pragma: no cover
208208
elif force_upgrade:
209-
return False
209+
return False # pragma: no cover
210210
elif self.dependencies and not self.piptools_lock_file.exists():
211211
return False
212212
elif self.dependencies and self.piptools_lock_file.exists():

hatch_pip_compile/resolver.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,13 @@ def get_pip_compile_args(self, input_file: os.PathLike, output_file: os.PathLike
3434
upgrade_args = []
3535
upgrade_package_args = []
3636
if upgrade:
37-
upgrade_args.append("--upgrade")
37+
upgrade_args.append("--upgrade") # pragma: no cover
3838
if upgrade_packages:
39-
upgrade_packages_sep = upgrade_packages.split(",")
40-
for package in upgrade_packages_sep:
41-
upgrade_package_args.append(f"--upgrade-package={package.strip()}")
39+
upgrade_packages_sep = upgrade_packages.split(",") # pragma: no cover
40+
for package in upgrade_packages_sep: # pragma: no cover
41+
upgrade_package_args.append(
42+
f"--upgrade-package={package.strip()}"
43+
) # pragma: no cover
4244
cmd = [
4345
*self.resolver_executable,
4446
"--verbose"

mkdocs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ plugins:
7575
- mkdocstrings:
7676
handlers:
7777
python:
78-
import:
78+
inventories:
7979
- https://docs.python.org/3/objects.inv
8080
options:
8181
docstring_style: numpy

pyproject.toml

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ classifiers = [
1616
"Programming Language :: Python :: 3.10",
1717
"Programming Language :: Python :: 3.11",
1818
"Programming Language :: Python :: 3.12",
19+
"Programming Language :: Python :: 3.13",
20+
"Programming Language :: Python :: 3.14",
1921
"Programming Language :: Python :: Implementation :: CPython",
2022
"Programming Language :: Python :: Implementation :: PyPy"
2123
]
@@ -91,6 +93,7 @@ detached = false
9193
type = "pip-compile"
9294

9395
[tool.hatch.envs.gen]
96+
builder = true
9497
detached = true
9598

9699
[tool.hatch.envs.gen.scripts]
@@ -131,10 +134,17 @@ style = [
131134
typing = "mypy --install-types --non-interactive {args:hatch_pip_compile}"
132135

133136
[tool.hatch.envs.matrix]
137+
pip-compile-constraint = ""
134138
template = "test"
135139

136140
[[tool.hatch.envs.matrix.matrix]]
137-
python = ["3.8", "3.9", "3.10", "3.11", "3.12"]
141+
python = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
142+
143+
[tool.hatch.envs.matrix.overrides]
144+
matrix.python.dependencies = [
145+
{value = "hatch>=1.7.0,<1.15", if = ["3.8"]},
146+
{value = "hatch>=1.7.0,<1.16", if = ["3.9"]}
147+
]
138148

139149
[tool.hatch.envs.test]
140150
dependencies = [
@@ -165,7 +175,11 @@ version = [
165175
"1.9.x",
166176
"1.10.x",
167177
"1.11.x",
168-
"1.12.x"
178+
"1.12.x",
179+
"1.13.x",
180+
"1.14.x",
181+
"1.15.x",
182+
"1.16.x"
169183
]
170184

171185
[tool.hatch.envs.versions.overrides]
@@ -179,7 +193,11 @@ matrix.version.dependencies = [
179193
{value = "hatch~=1.9.7", if = ["1.9.x"]},
180194
{value = "hatch~=1.10.0", if = ["1.10.x"]},
181195
{value = "hatch~=1.11.1", if = ["1.11.x"]},
182-
{value = "hatch~=1.12.0", if = ["1.12.x"]}
196+
{value = "hatch~=1.12.0", if = ["1.12.x"]},
197+
{value = "hatch~=1.13.0", if = ["1.13.x"]},
198+
{value = "hatch~=1.14.0", if = ["1.14.x"]},
199+
{value = "hatch~=1.15.0", if = ["1.15.x"]},
200+
{value = "hatch~=1.16.0", if = ["1.16.x"]}
183201
]
184202

185203
[tool.hatch.version]

requirements.txt

Lines changed: 39 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,120 +1,119 @@
11
#
22
# This file is autogenerated by hatch-pip-compile with Python 3.11
33
#
4-
# - click
54
# - hatch<2,>=1.7.0
65
# - pip-tools>=6
6+
# - click
77
# - rich
88
#
99

10-
anyio==4.4.0
10+
anyio==4.12.1
1111
# via httpx
1212
backports-tarfile==1.2.0
1313
# via jaraco-context
14-
build==1.2.1
14+
backports-zstd==1.3.0
15+
# via hatch
16+
build==1.4.0
1517
# via pip-tools
16-
certifi==2024.7.4
18+
certifi==2026.1.4
1719
# via
1820
# httpcore
1921
# httpx
20-
click==8.1.7
22+
click==8.3.1
2123
# via
2224
# hatch.envs.default
2325
# hatch
2426
# pip-tools
2527
# userpath
26-
distlib==0.3.8
28+
distlib==0.4.0
2729
# via virtualenv
28-
filelock==3.15.4
30+
filelock==3.20.2
2931
# via virtualenv
30-
h11==0.14.0
32+
h11==0.16.0
3133
# via httpcore
32-
hatch==1.12.0
34+
hatch==1.16.2
3335
# via hatch.envs.default
34-
hatchling==1.25.0
36+
hatchling==1.28.0
3537
# via hatch
36-
httpcore==1.0.5
38+
httpcore==1.0.9
3739
# via httpx
38-
httpx==0.27.0
40+
httpx==0.28.1
3941
# via hatch
4042
hyperlink==21.0.0
4143
# via hatch
42-
idna==3.7
44+
idna==3.11
4345
# via
4446
# anyio
4547
# httpx
4648
# hyperlink
47-
importlib-metadata==8.0.0
49+
importlib-metadata==8.7.1
4850
# via keyring
4951
jaraco-classes==3.4.0
5052
# via keyring
51-
jaraco-context==5.3.0
53+
jaraco-context==6.0.2
5254
# via keyring
53-
jaraco-functools==4.0.1
55+
jaraco-functools==4.4.0
5456
# via keyring
55-
keyring==25.2.1
57+
keyring==25.7.0
5658
# via hatch
57-
markdown-it-py==3.0.0
59+
markdown-it-py==4.0.0
5860
# via rich
5961
mdurl==0.1.2
6062
# via markdown-it-py
61-
more-itertools==10.3.0
63+
more-itertools==10.8.0
6264
# via
6365
# jaraco-classes
6466
# jaraco-functools
65-
packaging==24.1
67+
packaging==25.0
6668
# via
6769
# build
6870
# hatch
6971
# hatchling
70-
pathspec==0.12.1
72+
pathspec==1.0.2
7173
# via hatchling
7274
pexpect==4.9.0
7375
# via hatch
74-
pip-tools==7.4.1
76+
pip-tools==7.5.2
7577
# via hatch.envs.default
76-
platformdirs==4.2.2
78+
platformdirs==4.5.1
7779
# via
7880
# hatch
7981
# virtualenv
80-
pluggy==1.5.0
82+
pluggy==1.6.0
8183
# via hatchling
8284
ptyprocess==0.7.0
8385
# via pexpect
84-
pygments==2.18.0
86+
pygments==2.19.2
8587
# via rich
86-
pyproject-hooks==1.1.0
88+
pyproject-hooks==1.2.0
8789
# via
8890
# build
91+
# hatch
8992
# pip-tools
90-
rich==13.7.1
93+
rich==14.2.0
9194
# via
9295
# hatch.envs.default
9396
# hatch
9497
shellingham==1.5.4
9598
# via hatch
96-
sniffio==1.3.1
97-
# via
98-
# anyio
99-
# httpx
100-
tomli-w==1.0.0
99+
tomli-w==1.2.0
101100
# via hatch
102-
tomlkit==0.13.0
101+
tomlkit==0.13.3
103102
# via hatch
104-
trove-classifiers==2024.7.2
103+
trove-classifiers==2025.12.1.14
105104
# via hatchling
105+
typing-extensions==4.15.0
106+
# via anyio
106107
userpath==1.9.2
107108
# via hatch
108-
uv==0.2.24
109+
uv==0.9.22
109110
# via hatch
110-
virtualenv==20.26.3
111+
virtualenv==20.36.0
111112
# via hatch
112-
wheel==0.43.0
113+
wheel==0.45.1
113114
# via pip-tools
114-
zipp==3.19.2
115+
zipp==3.23.0
115116
# via importlib-metadata
116-
zstandard==0.22.0
117-
# via hatch
118117

119118
# The following packages are considered to be unsafe in a requirements file:
120119
# pip

0 commit comments

Comments
 (0)