Skip to content

Commit 00ee1c3

Browse files
authored
Merge branch 'main' into new_structure
Signed-off-by: Shaobo-Zhou <109073755+Shaobo-Zhou@users.noreply.github.com>
2 parents a4ec1c7 + ad5ae0b commit 00ee1c3

File tree

3 files changed

+51
-37
lines changed

3 files changed

+51
-37
lines changed

.pre-commit-config.yaml

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,12 @@ repos:
1919
rev: v6.0.0
2020
hooks:
2121
- id: check-added-large-files
22+
args: ["--maxkb=2048"]
2223
- id: check-case-conflict
23-
- id: check-docstring-first
24+
- id: check-vcs-permalinks
2425
- id: check-merge-conflict
26+
- id: check-symlinks
27+
- id: check-json
2528
- id: check-toml
2629
- id: check-yaml
2730
- id: debug-statements
@@ -55,12 +58,17 @@ repos:
5558
- id: rst-directive-colons
5659
- id: rst-inline-touching-normal
5760

61+
# Ensure uv lock file is up-to-date
62+
- repo: https://github.com/astral-sh/uv-pre-commit
63+
rev: 0.9.13
64+
hooks:
65+
- id: uv-lock
66+
5867
# Python linting and formatting using ruff
5968
- repo: https://github.com/astral-sh/ruff-pre-commit
60-
rev: v0.14.6
69+
rev: v0.14.7
6170
hooks:
6271
- id: ruff-check
63-
args: ["--fix", "--show-fixes"]
6472
- id: ruff-format
6573

6674
# Also run Black on examples in the documentation
@@ -72,20 +80,20 @@ repos:
7280

7381
# Check for license headers
7482
- repo: https://github.com/emzeat/mz-lictools
75-
rev: v2.8.0
83+
rev: v2.9.0
7684
hooks:
7785
- id: license-tools
7886

7987
# Format configuration files with prettier
8088
- repo: https://github.com/rbubley/mirrors-prettier
81-
rev: v3.6.2
89+
rev: v3.7.3
8290
hooks:
8391
- id: prettier
8492
types_or: [yaml, markdown, html, css, scss, javascript, json]
8593

8694
# Check static types with mypy
8795
- repo: https://github.com/pre-commit/mirrors-mypy
88-
rev: v1.18.2
96+
rev: v1.19.0
8997
hooks:
9098
- id: mypy
9199
files: ^(src/mqt|test/python)
@@ -104,7 +112,7 @@ repos:
104112

105113
# Check for spelling
106114
- repo: https://github.com/crate-ci/typos
107-
rev: v1.39.2
115+
rev: v1.40.0
108116
hooks:
109117
- id: typos
110118

noxfile.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,10 @@ def preserve_lockfile() -> Generator[None]:
5454
@nox.session(reuse_venv=True, default=True)
5555
def lint(session: nox.Session) -> None:
5656
"""Run the linter."""
57-
if shutil.which("pre-commit") is None:
58-
session.install("pre-commit")
57+
if shutil.which("prek") is None:
58+
session.install("prek")
5959

60-
session.run("pre-commit", "run", "--all-files", *session.posargs, external=True)
60+
session.run("prek", "run", "--all-files", *session.posargs, external=True)
6161

6262

6363
def _run_tests(

pyproject.toml

Lines changed: 33 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -55,42 +55,42 @@ dependencies = [
5555
classifiers = [
5656
"Development Status :: 4 - Beta",
5757
"Intended Audience :: Developers",
58-
"Operating System :: Microsoft :: Windows",
58+
"Intended Audience :: Science/Research",
59+
"Natural Language :: English",
5960
"Operating System :: MacOS",
61+
"Operating System :: Microsoft :: Windows",
6062
"Operating System :: POSIX :: Linux",
63+
"Programming Language :: Python",
6164
"Programming Language :: Python :: 3 :: Only",
6265
"Programming Language :: Python :: 3.10",
6366
"Programming Language :: Python :: 3.11",
6467
"Programming Language :: Python :: 3.12",
6568
"Programming Language :: Python :: 3.13",
66-
"Programming Language :: Python :: 3.14",
67-
"Intended Audience :: Science/Research",
68-
"Natural Language :: English",
6969
"Topic :: Scientific/Engineering :: Electronic Design Automation (EDA)",
70+
"Typing :: Typed",
7071
]
7172

7273
[dependency-groups]
7374
test = [
74-
"pytest>=8.4.1",
75-
"pytest-cov>=6.2.1",
75+
"pytest>=9.0.1",
76+
"pytest-cov>=7.0.0",
7677
]
7778
docs = [
78-
"furo>=2024.8.6",
79-
"myst-nb>=1.2.0",
80-
"setuptools-scm>=8.3.1",
81-
"sphinx-design>=0.6.1",
79+
"furo>=2025.09.25",
80+
"myst-nb>=1.3.0",
81+
"setuptools-scm>=9.2.2",
82+
"sphinx>=8.1.3",
83+
"sphinx>=8.2.3; python_version >= '3.11'",
8284
"sphinx-autoapi>=3.6.0",
8385
"sphinx-copybutton>=0.5.2",
86+
"sphinx-design>=0.6.1",
8487
"sphinxcontrib-bibtex>=2.6.5",
8588
"sphinxcontrib-svg2pdfconverter>=1.3.0",
86-
"sphinxext-opengraph>=0.10.0",
87-
"sphinx>=7.4.7",
88-
"sphinx>=8.1.3; python_version >= '3.10'",
89-
"sphinx>=8.2.3; python_version >= '3.11'",
89+
"sphinxext-opengraph>=0.13.0",
9090
]
9191
dev = [
92-
{include-group = "test"},
93-
{include-group = "docs"},
92+
{include-group = "test"},
93+
"nox>=2025.11.12",
9494
]
9595

9696
[project.urls]
@@ -109,17 +109,15 @@ source = "vcs"
109109
version-file = "src/mqt/predictor/_version.py"
110110

111111

112-
[tool.pytest.ini_options]
113-
minversion = "7.2"
114-
testpaths = ["tests/"]
112+
[tool.pytest]
113+
minversion = "9.0"
114+
testpaths = ["tests"]
115+
strict = true
115116
addopts = [
116117
"-ra",
117-
"--strict-markers",
118-
"--strict-config",
119118
"--showlocals",
120119
]
121120
log_level = "INFO"
122-
xfail_strict = true
123121
filterwarnings = [
124122
'error',
125123
'ignore:.*pytorch.*:UserWarning:',
@@ -135,6 +133,7 @@ filterwarnings = [
135133

136134
]
137135

136+
138137
[tool.coverage]
139138
run.source = ["mqt.predictor"]
140139
report.exclude_also = [
@@ -146,11 +145,11 @@ report.exclude_also = [
146145
run.disable_warnings = [
147146
"no-sysmon",
148147
]
149-
150148
show_missing = true
151149
skip_empty = true
152150
precision = 1
153151

152+
154153
[tool.mypy]
155154
mypy_path = "$MYPY_CONFIG_FILE_DIR/src"
156155
files = ["src", "tests"]
@@ -173,19 +172,25 @@ implicit_reexport = true
173172
module = ["qiskit.*", "joblib.*", "sklearn.*", "matplotlib.*", "gymnasium.*", "mqt.bench.*", "sb3_contrib.*", "bqskit.*", "qiskit_ibm_runtime.*", "networkx.*", "stable_baselines3.*","qiskit_ibm_transpiler.*"]
174173
ignore_missing_imports = true
175174

175+
176176
[tool.ruff]
177177
line-length = 120
178-
extend-include = ["*.ipynb"]
178+
namespace-packages = ["mqt"]
179179
preview = true
180+
fix = true
180181
unsafe-fixes = true
182+
show-fixes = true
183+
184+
[tool.ruff.format]
185+
docstring-code-format = true
181186

182187
[tool.ruff.lint]
183188
extend-select = [
184189
"A", # flake8-builtins
185190
"ANN", # flake8-annotations
186191
"ARG", # flake8-unused-arguments
187192
"ASYNC", # flake8-async
188-
"B", "B904", # flake8-bugbear
193+
"B", # flake8-bugbear
189194
"C4", # flake8-comprehensions
190195
"D", # pydocstyle
191196
"EM", # flake8-errmsg
@@ -220,9 +225,8 @@ extend-select = [
220225
"YTT", # flake8-2020
221226
]
222227
ignore = [
223-
"ISC001", # Conflicts with formatter
224228
"E501", # Line too long (Black is enough)
225-
"PLR", # Design related pylint codes
229+
"PLR", # Design-related pylint codes
226230
"S101", # Use of assert detected
227231
]
228232
flake8-unused-arguments.ignore-variadic-names = true
@@ -249,12 +253,14 @@ default.extend-ignore-re = [
249253
"(?Rm)^.*(#|//)\\s*spellchecker:disable-line$", # ignore line
250254
"(?s)(#|//)\\s*spellchecker:off.*?\\n\\s*(#|//)\\s*spellchecker:on" # ignore block
251255
]
256+
252257
[tool.typos.default.extend-words]
253258
wille = "wille"
254259
anc = "anc"
255260
aer = "aer"
256261
fom = "fom"
257262

263+
258264
[tool.repo-review]
259265
ignore = ["GH200"]
260266

0 commit comments

Comments
 (0)