Skip to content

Commit d3e8265

Browse files
authored
🚨 update pre-commit, lockfile, and adjust for Qiskit 1.3 (#574)
## Description This PR updates combines a couple of updates for the project configuration that are long overdue. ## Checklist: <!--- This checklist serves as a reminder of a couple of things that ensure your pull request will be merged swiftly. --> - [x] The pull request only contains commits that are related to it. - [x] I have added appropriate tests and documentation. - [x] I have made sure that all CI jobs on GitHub pass. - [x] The pull request introduces no new warnings and follows the project's style guidelines. --------- Signed-off-by: burgholzer <[email protected]>
1 parent c9b2f79 commit d3e8265

File tree

7 files changed

+392
-351
lines changed

7 files changed

+392
-351
lines changed

.github/workflows/cd.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
# whether the workflow is triggered from a PR, a push to main, or a release, respectively.
1818
python-packaging:
1919
name: 🐍 Packaging
20-
uses: cda-tum/mqt-workflows/.github/workflows/reusable-python-packaging.yml@v1.4
20+
uses: cda-tum/mqt-workflows/.github/workflows/reusable-python-packaging.yml@v1.5
2121
with:
2222
# Do not include local version information on pushes to main to facilitate TestPyPI uploads.
2323
no-local-version: ${{ github.ref == 'refs/heads/main' && github.event_name == 'push' }}
@@ -64,7 +64,7 @@ jobs:
6464
path: dist
6565
merge-multiple: true
6666
- name: Generate artifact attestation for sdist and wheel(s)
67-
uses: actions/attest-build-provenance@v1.4.4
67+
uses: actions/attest-build-provenance@v2
6868
with:
6969
subject-path: "dist/*"
7070
- uses: pypa/gh-action-pypi-publish@release/v1

.github/workflows/ci.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,45 +14,45 @@ concurrency:
1414
jobs:
1515
change-detection:
1616
name: 🔍 Change
17-
uses: cda-tum/mqt-workflows/.github/workflows/reusable-change-detection.yml@v1.4
17+
uses: cda-tum/mqt-workflows/.github/workflows/reusable-change-detection.yml@v1.5
1818

1919
cpp-tests:
2020
name: 🇨‌ Test
2121
needs: change-detection
2222
if: fromJSON(needs.change-detection.outputs.run-cpp-tests)
23-
uses: cda-tum/mqt-workflows/.github/workflows/reusable-cpp-ci.yml@v1.4
23+
uses: cda-tum/mqt-workflows/.github/workflows/reusable-cpp-ci.yml@v1.5
2424
with:
2525
setup-z3: true
2626

2727
cpp-linter:
2828
name: 🇨‌ Lint
2929
needs: change-detection
3030
if: fromJSON(needs.change-detection.outputs.run-cpp-linter)
31-
uses: cda-tum/mqt-workflows/.github/workflows/reusable-cpp-linter.yml@v1.4
31+
uses: cda-tum/mqt-workflows/.github/workflows/reusable-cpp-linter.yml@v1.5
3232
with:
3333
setup-z3: true
3434

3535
python-tests:
3636
name: 🐍 Test
3737
needs: change-detection
3838
if: fromJSON(needs.change-detection.outputs.run-python-tests)
39-
uses: cda-tum/mqt-workflows/.github/workflows/reusable-python-ci.yml@v1.4
39+
uses: cda-tum/mqt-workflows/.github/workflows/reusable-python-ci.yml@v1.5
4040
with:
4141
setup-z3: true
4242

4343
code-ql:
4444
name: 📝 CodeQL
4545
needs: change-detection
4646
if: fromJSON(needs.change-detection.outputs.run-code-ql)
47-
uses: cda-tum/mqt-workflows/.github/workflows/reusable-code-ql.yml@v1.4
47+
uses: cda-tum/mqt-workflows/.github/workflows/reusable-code-ql.yml@v1.5
4848
with:
4949
setup-z3: true
5050

5151
cd:
5252
name: 🚀 CD
5353
needs: change-detection
5454
if: fromJSON(needs.change-detection.outputs.run-cd)
55-
uses: cda-tum/mqt-workflows/.github/workflows/reusable-python-packaging.yml@v1.4
55+
uses: cda-tum/mqt-workflows/.github/workflows/reusable-python-packaging.yml@v1.5
5656
with:
5757
setup-z3: true
5858
# 4.13.0 has incorrectly tagged manylinux wheels

.github/workflows/update-mqt-core.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@ concurrency:
2121
jobs:
2222
update-mqt-core:
2323
name: ⬆️ Update MQT Core
24-
uses: cda-tum/mqt-workflows/.github/workflows/reusable-mqt-core-update.yml@v1.4
24+
uses: cda-tum/mqt-workflows/.github/workflows/reusable-mqt-core-update.yml@v1.5
2525
with:
2626
update-to-head: ${{ github.event.inputs.update-to-head == 'true' }}

.pre-commit-config.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ repos:
5757

5858
# Python linting using ruff
5959
- repo: https://github.com/astral-sh/ruff-pre-commit
60-
rev: v0.7.4
60+
rev: v0.8.2
6161
hooks:
6262
- id: ruff
6363
args: ["--fix", "--show-fixes"]
@@ -89,13 +89,13 @@ repos:
8989

9090
# Check for spelling
9191
- repo: https://github.com/crate-ci/typos
92-
rev: v1.28.2
92+
rev: typos-dict-v0.11.37
9393
hooks:
9494
- id: typos
9595

9696
# Clang-format the C++ part of the code base automatically
9797
- repo: https://github.com/pre-commit/mirrors-clang-format
98-
rev: v19.1.4
98+
rev: v19.1.5
9999
hooks:
100100
- id: clang-format
101101
types_or: [c++, c, cuda]
@@ -111,7 +111,7 @@ repos:
111111

112112
# Format configuration files with prettier
113113
- repo: https://github.com/rbubley/mirrors-prettier
114-
rev: v3.4.1
114+
rev: v3.4.2
115115
hooks:
116116
- id: prettier
117117
types_or: [yaml, markdown, html, css, scss, javascript, json]
@@ -142,6 +142,6 @@ repos:
142142

143143
# Check the pyproject.toml file
144144
- repo: https://github.com/henryiii/validate-pyproject-schema-store
145-
rev: 2024.11.11
145+
rev: 2024.11.25
146146
hooks:
147147
- id: validate-pyproject

noxfile.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,13 @@ def _run_tests(
6161
if shutil.which("ninja") is None:
6262
session.install("ninja")
6363

64-
_extras = ["test", *extras]
64+
extras_ = ["test", *extras]
6565
if "--cov" in posargs:
66-
_extras.append("coverage")
66+
extras_.append("coverage")
6767
posargs.append("--cov-config=pyproject.toml")
6868

6969
session.install(*BUILD_REQUIREMENTS, *install_args, env=env)
70-
install_arg = f"-ve.[{','.join(_extras)}]"
70+
install_arg = f"-ve.[{','.join(extras_)}]"
7171
session.install("--no-build-isolation", install_arg, *install_args, env=env)
7272
session.run("pytest", *run_args, *posargs, env=env)
7373

pyproject.toml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,10 @@ filterwarnings = [
154154
'ignore:.*qiskit\.providers\.models.* is deprecated.*:DeprecationWarning:mqt.qmap.*',
155155
'ignore:.*qiskit\.providers\.fake_provider\.fake_backend\.FakeBackend.* is deprecated.*:DeprecationWarning:',
156156
'ignore:.*qiskit\.providers\.backend.BackendV1.* is deprecated.*:DeprecationWarning:',
157+
# Qiskit 1.3 deprecations
158+
'ignore:.*``qiskit.dagcircuit.dagcircuit.DAGCircuit.*`` is deprecated as of qiskit 1.3.0.*:DeprecationWarning:',
159+
'ignore:.*``qiskit.circuit.instruction.Instruction.condition`` is deprecated as of qiskit 1.3.0.*:DeprecationWarning:',
160+
'ignore:.*``qiskit.circuit.library.standard_gates.x.*`` is pending deprecation as of qiskit 1.3.*:PendingDeprecationWarning:',
157161
]
158162

159163
[tool.coverage]
@@ -230,20 +234,17 @@ extend-select = [
230234
"SLOT", # flake8-slots
231235
"SIM", # flake8-simplify
232236
"T20", # flake8-print
233-
"TCH", # flake8-type-checking
237+
"TC", # flake8-type-checking
234238
"TID251", # flake8-tidy-imports.banned-api
235239
"TRY", # tryceratops
236240
"UP", # pyupgrade
237241
"YTT", # flake8-2020
238242
]
239243
ignore = [
240-
"ANN101", # Missing type annotation for `self` in method
241-
"ANN102", # Missing type annotation for `cls` in classmethod
242244
"ISC001", # Conflicts with formatter
243245
"PLR09", # Too many <...>
244246
"PLR2004", # Magic value used in comparison
245247
"PLC0415", # Import should be at top of file
246-
"PT004", # Incorrect, just usefixtures instead.
247248
"S101", # Use of assert detected
248249
"S403", # `pickle`, `cPickle`, `dill`, and `shelve` modules are possibly insecure
249250
]
@@ -307,7 +308,7 @@ archs = "auto64"
307308
test-command = "python -c \"from mqt import qmap\""
308309
test-skip = ["cp313*"] # skip testing on Python 3.13 until our dependencies are ready
309310
build-frontend = "build[uv]"
310-
free-threaded-support = true
311+
enable = ["cpython-freethreading"]
311312
manylinux-x86_64-image = "manylinux_2_28"
312313
manylinux-aarch64-image = "manylinux_2_28"
313314
manylinux-ppc64le-image = "manylinux_2_28"

0 commit comments

Comments
 (0)