|
1 | 1 | [build-system] |
2 | | -requires = ["hatchling", "hatch-js", "hatch-rs"] |
| 2 | +requires = [ |
| 3 | + "hatchling", |
| 4 | + "hatch-js", |
| 5 | + "hatch-rs", |
| 6 | +] |
3 | 7 | build-backend = "hatchling.build" |
4 | 8 |
|
5 | 9 | [project] |
6 | 10 | name = "python-template-rust" |
7 | | -authors = [{name = "Python Project Template Authors", email = "3105306+timkpaine@users.noreply.github.com"}] |
| 11 | +authors = [ |
| 12 | + {name = "Python Project Template Authors", email = "3105306+timkpaine@users.noreply.github.com"}, |
| 13 | +] |
8 | 14 | description = "A Rust-Python project template" |
9 | 15 | readme = "README.md" |
10 | 16 | license = { text = "Apache-2.0" } |
@@ -44,6 +50,8 @@ develop = [ |
44 | 50 | "pytest-cov", |
45 | 51 | "ruff>=0.9,<0.15", |
46 | 52 | "twine", |
| 53 | + "ty", |
| 54 | + "uv", |
47 | 55 | "wheel", |
48 | 56 | ] |
49 | 57 |
|
@@ -108,7 +116,7 @@ ignore = [ |
108 | 116 | [tool.cibuildwheel] |
109 | 117 | build = "cp310-*" |
110 | 118 | test-command = "pytest -vvv {project}/python_template_rust/tests" |
111 | | -test-requires = ["pytest", "pytest-cov", "pytest-sugar", "pytest-xdist"] |
| 119 | +test-extras = "develop" |
112 | 120 |
|
113 | 121 | [tool.cibuildwheel.linux] |
114 | 122 | before-all = """ |
@@ -145,36 +153,67 @@ fail_under = 50 |
145 | 153 | path = "js" |
146 | 154 | build_cmd = "build" |
147 | 155 | tool = "pnpm" |
148 | | -targets = ["python_template_rust/extension/cdn/index.js"] |
| 156 | +targets = [ |
| 157 | + "python_template_rust/extension/cdn/index.js", |
| 158 | +] |
149 | 159 |
|
150 | 160 | [tool.hatch.build.hooks.hatch-rs] |
151 | 161 | verbose = true |
152 | 162 | module = "python_template_rust" |
153 | 163 | path = "." |
154 | 164 |
|
155 | 165 | [tool.hatch.build.targets.sdist] |
156 | | -packages = ["python_template_rust", "/js", "/rust", "/src"] |
157 | | -sources = ["."] |
| 166 | +packages = [ |
| 167 | + "python_template_rust", |
| 168 | + "/js", |
| 169 | + "/rust", |
| 170 | + "/src", |
| 171 | +] |
| 172 | +sources = [ |
| 173 | + ".", |
| 174 | +] |
158 | 175 |
|
159 | 176 | [tool.hatch.build.targets.wheel] |
160 | | -packages = ["python_template_rust"] |
161 | | -exclude = ["/js", "/rust", "/src"] |
| 177 | +packages = [ |
| 178 | + "python_template_rust", |
| 179 | +] |
| 180 | +exclude = [ |
| 181 | + "/js", |
| 182 | + "/rust", |
| 183 | + "/src", |
| 184 | +] |
162 | 185 |
|
163 | 186 | [tool.pytest.ini_options] |
164 | | -addopts = ["-vvv", "--junitxml=junit.xml"] |
| 187 | +addopts = [ |
| 188 | + "-vvv", |
| 189 | + "--junitxml=junit.xml", |
| 190 | +] |
165 | 191 | testpaths = "python_template_rust/tests" |
166 | 192 |
|
167 | 193 | [tool.ruff] |
168 | 194 | line-length = 150 |
169 | 195 |
|
170 | 196 | [tool.ruff.lint] |
171 | | -extend-select = ["I"] |
| 197 | +extend-select = [ |
| 198 | + "I", |
| 199 | +] |
172 | 200 |
|
173 | 201 | [tool.ruff.lint.isort] |
174 | 202 | combine-as-imports = true |
175 | 203 | default-section = "third-party" |
176 | | -known-first-party = ["python_template_rust"] |
177 | | -section-order = ["future", "standard-library", "third-party", "first-party", "local-folder"] |
| 204 | +known-first-party = [ |
| 205 | + "python_template_rust", |
| 206 | +] |
| 207 | +section-order = [ |
| 208 | + "future", |
| 209 | + "standard-library", |
| 210 | + "third-party", |
| 211 | + "first-party", |
| 212 | + "local-folder", |
| 213 | +] |
178 | 214 |
|
179 | 215 | [tool.ruff.lint.per-file-ignores] |
180 | | -"__init__.py" = ["F401", "F403"] |
| 216 | +"__init__.py" = [ |
| 217 | + "F401", |
| 218 | + "F403", |
| 219 | +] |
0 commit comments