Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
365 lines (297 loc) · 8.65 KB
/
Copy pathpyproject.toml
File metadata and controls
365 lines (297 loc) · 8.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
# Copyright (c) 2026 Chair for Design Automation, TUM
# Copyright (c) 2026 Munich Quantum Software Company GmbH
# All rights reserved.
#
# SPDX-License-Identifier: MIT
#
# Licensed under the MIT License
[build-system]
build-backend = "scikit_build_core.build"
requires = [
"nanobind~=3.1.0",
"scikit-build-core>=1.0.3",
"vcs-versioning>=2.3",
]
[project]
name = "mqt-scpd"
description = "Physical Design for Superconducting Quantum Chips"
readme = "README.md"
keywords = [ "design-automation", "MQT", "quantum-computing" ]
license = "MIT"
license-files = [ "LICENSE" ]
requires-python = ">=3.11"
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Information Technology",
"Intended Audience :: Science/Research",
"Natural Language :: English",
"Operating System :: MacOS",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX :: Linux",
"Programming Language :: C++",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Programming Language :: Python :: 3.15",
"Topic :: Scientific/Engineering :: Electronic Design Automation (EDA)",
"Topic :: Scientific/Engineering :: Quantum Computing",
"Typing :: Typed",
]
dynamic = [ "version" ]
dependencies = [
# The same version as FLATBUFFERS_VERSION in cmake/ExternalDependencies.cmake, which generates the code
"flatbuffers~=25.12.19",
"nanobind-backend>=1",
]
[[project.authors]]
name = "Michael Feldmeier"
email = "michael.feldmeier@tum.de"
[project.optional-dependencies]
# KLayout writes GDSII and OASIS. It is an extra because it ships no wheels for Windows on ARM.
# 0.30.6 is the first release with wheels for CPython 3.14 on every platform the CI covers; the
# upper bound keeps a new minor release of KLayout from breaking the adapter unnoticed.
klayout = [ "klayout~=0.30.6" ]
[project.urls]
Homepage = "https://github.com/munich-quantum-toolkit/scpd"
Documentation = "https://mqt.readthedocs.io/projects/scpd"
Issues = "https://github.com/munich-quantum-toolkit/scpd/issues"
Discussions = "https://github.com/munich-quantum-toolkit/scpd/discussions"
[project.scripts]
mqt-scpd = "mqt.scpd.cli:main"
[dependency-groups]
dev = [
{ include-group = "build" },
{ include-group = "test" },
"nox>=2025.11.12",
]
test = [
"flatbuffers~=25.12.19",
# KLayout ships no wheels for Windows on ARM or for CPython 3.15; the export tests skip without it.
"klayout~=0.30.6; python_version<'3.15' and (sys_platform!='win32' or platform_machine!='ARM64')",
"pytest>=9.0.1",
"pytest-cov>=7.1",
"pytest-sugar>=1.1.1",
"pytest-xdist>=3.8",
]
docs = [
"breathe>=4.36",
"furo>=2025.12.19",
"ipywidgets>=8.1.7",
"myst-nb>=1.4",
"sphinx>=9",
"sphinx-autoapi>=3.6",
"sphinx-copybutton>=0.5.2",
"sphinx-design>=0.7",
"sphinx-llm>=1",
"sphinxcontrib-bibtex>=2.7",
"sphinxext-opengraph>=0.13",
]
build = [
"cmake>=4.4.1",
"nanobind~=3.1.0",
"scikit-build-core>=1.0.3",
"vcs-versioning>=2.3",
]
[tool.scikit-build]
# Protect the configuration against future changes in scikit-build-core
minimum-version = "build-system.requires"
# Setuptools-style build caching in a local directory
build-dir = "build/{wheel_tag}/{build_type}"
[tool.scikit-build.build]
# Only build the Python bindings target
targets = [
"mqt-scpd-bindings",
]
[tool.scikit-build.cmake]
# CMake 4.4 detects free-threaded Python and supplies Py_GIL_DISABLED on Windows
version = ">=4.4.1"
[tool.scikit-build.cmake.define]
BUILD_MQT_SCPD_TESTS = "OFF"
BUILD_MQT_SCPD_BINDINGS = "ON"
[tool.scikit-build.ninja]
# Set required Ninja version
version = ">=1.10"
[tool.scikit-build.sdist]
include = [ "python/mqt/scpd/_version.py" ]
exclude = [
"**/.github",
"**/doc",
"**/docs",
"**/eval",
"**/meta",
"**/plots",
"**/test",
"**/tests",
]
[tool.scikit-build.wheel]
# Set the wheel install directory
install-dir = "mqt/scpd"
# Explicitly set the package directory
packages = [ "python/mqt" ]
# Build one split-mode Stable ABI wheel for GIL-enabled CPython 3.11+
py-api = "cp311"
[tool.scikit-build.install]
# Only install the Python package component
components = [ "mqt-scpd_Python" ]
[[tool.scikit-build.overrides]]
if.python-version = ">=3.15"
if.abi-flags = "t"
wheel.py-api = "cp315t"
[tool.uv]
required-version = ">=0.5.20"
cache-keys = [
{ file = "pyproject.toml" },
{ git = { commit = true, tags = true } },
{ file = "bindings/**/*.cpp" },
{ file = "python/mqt/scpd/flatbuffers/**/*.py" },
]
[tool.uv.sources]
mqt-scpd = { workspace = true }
[tool.cibuildwheel]
build = "cp3*"
skip = [ "*-musllinux_*", "cp314t-*" ]
archs = "auto64"
build-frontend = "uv"
test-command = "pytest {project}/test/python"
test-groups = [ "test" ]
[tool.cibuildwheel.linux]
environment = { DEPLOY = "ON" }
[tool.cibuildwheel.macos]
environment = { MACOSX_DEPLOYMENT_TARGET = "13.3" }
[tool.cibuildwheel.windows]
repair-wheel-command = "delvewheel repair -w {dest_dir} {wheel} --namespace-pkg mqt --ignore-existing"
before-test = "uv pip install --group test"
# cibuildwheel 4.2 passes expanded dependency groups through cmd.exe, which interprets version
# operators as redirections. Let uv resolve the group itself.
test-groups = []
[tool.ruff]
line-length = 120
namespace-packages = [ "mqt" ]
src = [ "python" ]
# The schema-generated modules are regenerated by `nox -s schemas` and are not formatted or linted.
extend-exclude = [ "python/mqt/scpd/flatbuffers" ]
force-exclude = true
preview = true
fix = true
unsafe-fixes = true
show-fixes = true
[tool.ruff.format]
preview = true
docstring-code-format = true
[tool.ruff.lint.per-file-ignores]
"test/python/**" = [ "INP001", "T20" ]
"python/mqt/scpd/cli.py" = [ "T20" ] # the command line prints its output
"docs/**" = [ "INP001", "T20" ]
"noxfile.py" = [ "T20", "TID251" ]
"*.pyi" = [ "D301", "D418", "E501", "PYI021" ]
"*.ipynb" = [
"D", # pydocstyle
"E402", # Allow imports to appear anywhere in Jupyter notebooks
"I002", # Allow missing `from __future__ import annotations` import
]
[tool.ruff.lint.isort]
known-first-party = [ "mqt.scpd" ]
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint]
select = [ "ALL" ]
ignore = [
"C90", # <...> too complex
"COM812", # Conflicts with formatter
"PLR09", # Too many <...>
"PLR2004", # Magic value used in comparison
"S101", # Use of assert detected
"S404", # `subprocess` module is possibly insecure
"TID252" # Prefer absolute imports over relative imports from parent modules
]
future-annotations = true
[tool.repo-review.ignore]
GH200 = "We use Renovate instead of Dependabot"
PC160 = "We use a mirror of crate-ci/typos"
PC170 = "We do not use rST files anymore"
[tool.check-sdist]
sdist-only = [ "python/mqt/scpd/_version.py" ]
git-only = [
"docs/*",
"eval/*",
"extern/*",
"test/*",
".idea/*",
]
[tool.check-wheel-contents]
ignore = [ "W002" ] # Triggers on __init__.py's
[tool.pyproject-fmt]
generate_python_version_classifiers = false
table_format = "long"
sub_table_spacing = "\n"
separate_root_table = "\n\n"
[tool.typos]
[tool.typos.default]
extend-ignore-re = [
'"id": ".*",',
"(?Rm)^.*(#|//)\\s*spellchecker:disable-line$", # ignore line
"(?s)(#|//)\\s*spellchecker:off.*?\\n\\s*(#|//)\\s*spellchecker:on" # ignore block
]
[tool.typos.default.extend-identifiers]
countr_zero = "countr_zero"
[tool.typos.default.extend-words]
wille = "wille"
anc = "anc"
optin = "optin"
aer = "aer"
iy = "iy"
iz = "iz"
ket = "ket"
[tool.typos.files]
extend-exclude = [ "tableaus\\.json" ]
[tool.ty.src]
exclude = [
"docs/**",
"python/mqt/scpd/flatbuffers/**",
]
[tool.ty.terminal]
# Error if ty emits any warning-level diagnostics.
error-on-warning = true
[tool.pytest]
addopts = [
"-ra",
"--showlocals",
"--numprocesses=auto", # Automatically use all available CPU cores for parallel testing
]
filterwarnings = [
"error",
]
log_level = "INFO"
minversion = "9.0"
strict = true
testpaths = [ "test/python" ]
[tool.coverage]
[tool.coverage.run]
source = [ "mqt.scpd" ]
omit = [
"*/_compat/*",
"*/flatbuffers/*",
"*/visualization/*",
]
parallel = true
disable_warnings = [
"no-sysmon",
]
core = "sysmon"
[tool.coverage.report]
exclude_also = [
"@overload", # Overloads are only for static typing
'\.\.\.',
"def __dir__()", # Ignore __dir__ method that exists mainly for better IDE support
"if TYPE_CHECKING:",
"raise AssertionError",
"raise NotImplementedError"
]
[[tool.dynamic-metadata]]
provider = "vcs_versioning"
[tool.vcs-versioning]
write_to = "python/mqt/scpd/_version.py"