Skip to content

Commit cf75b1e

Browse files
🔧 Maintenance round (#887)
## Description This PR combines several maintenance updates: - Remove dependency on `setuptools-scm` - Use `ruff format` instead of `blacken-docs` - Use `macos-26` and `macos-26-intel` as default macOS runners - Rename `LICENSE.md` to `LICENSE` ## Checklist - [x] ~~The pull request only contains commits that are focused and relevant to this change.~~ - [x] ~~I have added appropriate tests that cover the new/changed functionality.~~ - [x] ~~I have updated the documentation to reflect these changes.~~ - [x] ~~I have added entries to the changelog for any noteworthy additions, changes, fixes, or removals.~~ - [x] ~~I have added migration instructions to the upgrade guide (if needed).~~ - [x] The changes follow the project's style guidelines and introduce no new warnings. - [x] The changes are fully tested and pass the CI checks. - [x] I have reviewed my own code changes. --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 97aa30c commit cf75b1e

10 files changed

Lines changed: 22 additions & 85 deletions

File tree

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ jobs:
3232
[
3333
ubuntu-24.04,
3434
ubuntu-24.04-arm,
35-
macos-15,
36-
macos-15-intel,
35+
macos-26,
36+
macos-26-intel,
3737
windows-2025,
3838
]
3939
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-python-tests.yml@b59d15aa4f266e713afad51e132bde6e3a28a6b3 # v1.18.1

.github/workflows/upstream.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
strategy:
1919
fail-fast: false
2020
matrix:
21-
runs-on: [ubuntu-24.04, macos-15, windows-2025]
21+
runs-on: [ubuntu-24.04, macos-26, windows-2025]
2222
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-qiskit-upstream-tests.yml@b59d15aa4f266e713afad51e132bde6e3a28a6b3 # v1.18.1
2323
with:
2424
runs-on: ${{ matrix.runs-on }}

.license-tools-config.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
".*build.*",
3636
".*\\.rst",
3737
".*\\.ipynb",
38-
"Dockerfile"
38+
"Dockerfile",
39+
"LICENSE"
3940
]
4041
}

.pre-commit-config.yaml

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -109,30 +109,22 @@ repos:
109109
rev: v3.8.1
110110
hooks:
111111
- id: prettier
112-
types_or: [yaml, markdown, html, css, scss, javascript, json]
112+
types_or: [yaml, markdown, html, css, scss, javascript, json, json5]
113113
priority: 1
114114

115115
## Python linting using ruff
116116
- repo: https://github.com/astral-sh/ruff-pre-commit
117117
rev: v0.15.9
118118
hooks:
119119
- id: ruff-format
120+
types_or: [python, pyi, jupyter, markdown]
120121
priority: 1
121122
- id: ruff-check
122123
require_serial: true
123124
priority: 2
124125

125126
# Priority 2+: Final checks and fixers
126127

127-
## Also run Black on examples in the documentation (needs to run after ruff format)
128-
- repo: https://github.com/adamchainz/blacken-docs
129-
rev: 1.20.0
130-
hooks:
131-
- id: blacken-docs
132-
language: python
133-
additional_dependencies: [black==26.*]
134-
priority: 2
135-
136128
## Static type checking using ty (needs to run after lockfile update/ruff format, and ruff lint)
137129
- repo: local
138130
hooks:
File renamed without changes.

README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,7 @@ The following code gives an example on the usage:
9191
from mqt.bench import BenchmarkLevel, get_benchmark
9292

9393
# Get a benchmark circuit on algorithmic level representing the GHZ state with 5 qubits
94-
qc_algorithmic_level = get_benchmark(
95-
benchmark="ghz", level=BenchmarkLevel.ALG, circuit_size=5
96-
)
94+
qc_algorithmic_level = get_benchmark(benchmark="ghz", level=BenchmarkLevel.ALG, circuit_size=5)
9795

9896
# Draw the circuit
9997
print(qc_algorithmic_level.draw())

UPGRADING.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -90,12 +90,8 @@ Please see the [API documentation](https://mqt.readthedocs.io/projects/bench/en/
9090
from mqt.bench import get_benchmark, BenchmarkLevel
9191
from mqt.bench.targets import get_target_for_gateset, get_device
9292

93-
benchmark_alg_level = get_benchmark(
94-
benchmark="dj", level=BenchmarkLevel.ALG, circuit_size=5
95-
)
96-
benchmark_independent_level = get_benchmark(
97-
benchmark="dj", level=BenchmarkLevel.INDEP, circuit_size=5
98-
)
93+
benchmark_alg_level = get_benchmark(benchmark="dj", level=BenchmarkLevel.ALG, circuit_size=5)
94+
benchmark_independent_level = get_benchmark(benchmark="dj", level=BenchmarkLevel.INDEP, circuit_size=5)
9995
benchmark_native_gates_level = get_benchmark(
10096
benchmark="dj",
10197
level=BenchmarkLevel.NATIVEGATES,

docs/conf.py

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
from __future__ import annotations
1212

13-
import warnings
1413
from importlib import metadata
1514
from pathlib import Path
1615
from typing import TYPE_CHECKING
@@ -25,15 +24,8 @@
2524
try:
2625
version = metadata.version("mqt.bench")
2726
except ModuleNotFoundError:
28-
msg = (
29-
"Package should be installed to produce documentation! "
30-
"Assuming a modern git archive was used for version discovery."
31-
)
32-
warnings.warn(msg, stacklevel=1)
33-
34-
from setuptools_scm import get_version
35-
36-
version = get_version(root=str(ROOT), fallback_root=ROOT)
27+
msg = "mqt.bench must be installed to build the documentation"
28+
raise ModuleNotFoundError(msg) from None
3729

3830
# Filter git details from version
3931
release = version.split("+")[0]

pyproject.toml

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ authors = [
1515
]
1616
keywords = ["MQT", "quantum computing", "benchmarking", "performance", "testing"]
1717
license = "MIT"
18-
license-files = ["LICENSE.md"]
18+
license-files = ["LICENSE"]
1919
requires-python = ">=3.10, !=3.14.1"
2020
dynamic = ["version"]
2121

@@ -64,7 +64,6 @@ test = [
6464
docs = [
6565
"furo>=2025.09.25",
6666
"myst-nb>=1.3.0",
67-
"setuptools-scm>=9.2.2",
6867
"openqasm-pygments>=0.2.0",
6968
"sphinx>=8.1.3",
7069
"sphinx>=8.2.3; python_version >= '3.11'",
@@ -159,6 +158,7 @@ unsafe-fixes = true
159158
show-fixes = true
160159

161160
[tool.ruff.format]
161+
preview = true
162162
docstring-code-format = true
163163

164164
[tool.ruff.lint]
@@ -252,14 +252,13 @@ bench = "bench"
252252
benchs = "benchs"
253253

254254

255-
[tool.repo-review]
256-
ignore = [
257-
"GH200", # We use Renovate instead of Dependabot
258-
"MY100", # We use ty instead of mypy
259-
"PC140", # We use ty instead of mypy
260-
"PC160", # We use a mirror of crate-ci/typos
261-
"PC170", # We do not use rST files anymore
262-
]
255+
[tool.repo-review.ignore]
256+
GH200 = "We use Renovate instead of Dependabot"
257+
MY100 = "We use ty instead of mypy"
258+
PC111 = "We use ruff instead of blacken-docs"
259+
PC140 = "We use ty instead of mypy"
260+
PC160 = "We use a mirror of crate-ci/typos"
261+
PC170 = "We do not use rST files anymore"
263262

264263

265264
[tool.ty.terminal]

uv.lock

Lines changed: 1 addition & 42 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)