Skip to content

Commit 62c728d

Browse files
📝 Update templated files (#865)
This pull request updates the files in this repository with the latest changes from the MQT Templates repository. For details on the respective changes, see the [changelog](https://github.com/munich-quantum-toolkit/templates/blob/main/CHANGELOG.md) as well as the [upgrade guide](https://github.com/munich-quantum-toolkit/templates/blob/main/UPGRADING.md). > [!NOTE] > This pull request may contain merge conflicts if there have been changes to a templated file and its template. > Resolve such conflicts manually before merging the pull request. --------- Co-authored-by: mqt-app[bot] <219534693+mqt-app[bot]@users.noreply.github.com> Co-authored-by: Daniel Haag <121057143+denialhaag@users.noreply.github.com>
1 parent 7fb8443 commit 62c728d

File tree

5 files changed

+171
-14
lines changed

5 files changed

+171
-14
lines changed

.github/release-drafter.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ categories:
3535
- "submodules"
3636
change-template: "- $TITLE ([#$NUMBER]($URL)) ([**@$AUTHOR**](https://github.com/$AUTHOR))"
3737
change-title-escapes: '\<*_&'
38+
exclude-labels:
39+
- "skip-changelog"
40+
- "backport"
41+
- "release-prep"
3842
version-resolver:
3943
major:
4044
labels:

.github/renovate.json5

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
{
22
$schema: "https://docs.renovatebot.com/renovate-schema.json",
3+
suppressNotifications: ["prEditedNotification"],
4+
minimumReleaseAge: '7 days',
35
extends: [
46
"config:recommended",
57
":gitSignOff",
@@ -52,10 +54,38 @@
5254
},
5355
{
5456
description: "Group and automerge all patch updates",
55-
groupName: "patch versions",
56-
groupSlug: "all-patch",
57+
groupName: "patch updates",
5758
matchUpdateTypes: ["patch"],
59+
matchCurrentVersion: "!/^0\.0/",
60+
commitMessagePrefix: "⬆\uFE0F\uD83E\uDE79",
5861
automerge: true
5962
},
63+
{
64+
description: "Group and automerge all minor updates of stable dependencies (except our own packages)",
65+
groupName: "minor stable updates",
66+
matchUpdateTypes: ["minor"],
67+
matchCurrentVersion: "!/^0\./",
68+
matchPackageNames: [
69+
"!munich-quantum-toolkit/*",
70+
"!munich-quantum-software/*",
71+
],
72+
commitMessagePrefix: "⬆\uFE0F\uD83E\uDE79",
73+
automerge: true
74+
},
75+
{
76+
description: 'Disable minimum release age checks for our own GitHub Actions',
77+
matchManagers: ['github-actions'],
78+
matchPackageNames: [
79+
'munich-quantum-toolkit/*',
80+
'munich-quantum-software/*',
81+
],
82+
minimumReleaseAge: null,
83+
},
84+
{
85+
description: 'Disable minimum release age checks for our own Python packages',
86+
matchDatasources: ['pypi'],
87+
matchPackageNames: ['mqt*'],
88+
minimumReleaseAge: null,
89+
}
6090
]
6191
}

docs/contributing.md

Lines changed: 60 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# Contributing
55

66
Thank you for your interest in contributing to MQT QCEC!
7-
This document outlines how to contribute and the development guidelines.
7+
This document outlines the development guidelines and how to contribute.
88

99
We use GitHub to [host code](https://github.com/munich-quantum-toolkit/qcec), to [track issues and feature requests][issues], as well as accept [pull requests](https://github.com/munich-quantum-toolkit/qcec/pulls).
1010
See <https://docs.github.com/en/get-started/quickstart> for a general introduction to working with GitHub and contributing to projects.
@@ -92,6 +92,44 @@ Please adhere to the following guidelines to help the project grow sustainably.
9292
- Do not squash commits locally; maintainers typically squash on merge.
9393
Avoid rebasing or force-pushing before reviews; you may rebase after addressing feedback if desired.
9494

95+
### Working with CodeRabbit
96+
97+
We use [CodeRabbit](https://www.coderabbit.ai/) for automated code review on pull requests.
98+
To get the most out of it and help the project maintain its high ambitions for code quality, please follow these practices:
99+
100+
- **Draft PRs**:
101+
CodeRabbit runs on every push to non-draft PRs.
102+
If you are still experimenting, mark your PR as a draft so that the automated review only runs when you are ready for feedback.
103+
- **Respond to comments**:
104+
Do not simply resolve CodeRabbit's comments without answering them.
105+
It learns from your replies and improves over time.
106+
If a suggestion does not apply, take a moment to explain why in a reply.
107+
- **Avoid multiple AI review bots**:
108+
CodeRabbit performs significantly worse when other AI review bots (e.g., GitHub Copilot) are active on the same PR.
109+
For the best results, do not tag Copilot unless you have already iterated with CodeRabbit and want an extra pass.
110+
- **Engage CodeRabbit in discussions**:
111+
When team members are discussing code in PR comments, CodeRabbit stays silent by default.
112+
Tag {code}`@coderabbitai` to engage it in the conversation and get its feedback on the specific points being discussed.
113+
In particular, when you tag another person in a comment, ensure to also tag CodeRabbit.
114+
Otherwise, you will just get an automatic "It seems like the humans are having a chat" response from CodeRabbit anyway, which does not add much value.
115+
- **Let CodeRabbit resolve comments**:
116+
Wait until after the next push before considering resolving CodeRabbit's comments manually.
117+
CodeRabbit will automatically resolve comments that it thinks have been addressed by your changes.
118+
Sometimes, it gets stuck, at which point you may resolve it manually.
119+
- **Manual review on drafts**:
120+
You can trigger a full review on a draft PR by commenting with {code}`@coderabbitai full review`.
121+
- **Continuing after reviews are paused**:
122+
CodeRabbit has a default threshold for the number of reviews it performs on a PR before pausing further reviews to avoid spamming.
123+
If you want to resume reviews, you can ask CodeRabbit to resume by commenting with {code}`@coderabbitai resume`.
124+
Note that this will not trigger a review immediately; it will just allow CodeRabbit to perform reviews on the next push or manual trigger.
125+
126+
### Use of AI and LLMs
127+
128+
Contributions may be prepared with the help of AI or LLM tools.
129+
However, [AI Slop](https://en.wikipedia.org/wiki/AI_slop)—generic, low-value, or clearly machine-generated content that does not meet our standards for clarity, accuracy, or usefulness—is not acceptable.
130+
Ensure that all text, code, and documentation you submit are accurate, relevant, and consistent with the project's style and guidelines.
131+
Please be mindful of the maintainers' time and consider the impact of your contributions on the project's long-term success.
132+
95133
## Get Started 🎉
96134

97135
Ready to contribute?
@@ -110,9 +148,9 @@ As of August 2025, our CI pipeline on GitHub continuously tests the library acro
110148

111149
- {code}`ubuntu-24.04`: {code}`Release` and {code}`Debug` builds using {code}`gcc`
112150
- {code}`ubuntu-24.04-arm`: {code}`Release` build using {code}`gcc`
151+
- {code}`macos-15`: {code}`Release` and {code}`Debug` builds using {code}`AppleClang`
113152
- {code}`macos-15-intel`: {code}`Release` build using {code}`AppleClang`
114-
- {code}`macos-14`: {code}`Release` and {code}`Debug` builds using {code}`AppleClang`
115-
- {code}`windows-2022`: {code}`Release` and {code}`Debug` builds using {code}`msvc`
153+
- {code}`windows-2025`: {code}`Release` and {code}`Debug` builds using {code}`msvc`
116154
- {code}`windows-11-arm`: {code}`Release` build using {code}`msvc`
117155

118156
To access the latest build logs, visit the [GitHub Actions page](https://github.com/munich-quantum-toolkit/qcec/actions/workflows/ci.yml).
@@ -253,14 +291,14 @@ See {ref}`working-on-documentation` for more information on how to build the doc
253291

254292
## Working on the Python Package
255293

256-
We use [{code}`pybind11`](https://pybind11.readthedocs.io/en/stable) to expose large parts of the C++ core library to Python.
294+
We use [{code}`nanobind`](https://nanobind.readthedocs.io/) to expose large parts of the C++ core library to Python.
257295
This allows us to keep the performance-critical parts of the code in C++ while providing a convenient interface for Python users.
258296
All code related to C++-Python bindings is contained in the {code}`bindings` directory.
259297

260298
:::{tip}
261299

262300
To build only the Python bindings, pass {code}`-DBUILD_MQT_QCEC_BINDINGS=ON` to the CMake configure step.
263-
CMake will then try to find Python and the necessary dependencies ({code}`pybind11`) on your system and configure the respective targets.
301+
CMake will then try to find Python and the necessary dependencies ({code}`nanobind`) on your system and configure the respective targets.
264302
In [CLion][clion], you can enable an option to pass the current Python interpreter to CMake.
265303
Go to {code}`Preferences` -> {code}`Build, Execution, Deployment` -> {code}`CMake` -> {code}`Python Integration` and check the box {code}`Pass Python Interpreter to CMake`.
266304
Alternatively, you can pass {code}`-DPython_ROOT_DIR=<PATH_TO_PYTHON>` to the configure step to point CMake to a specific Python installation.
@@ -275,12 +313,13 @@ We recommend using [{code}`nox`][nox] for development.
275313
{code}`nox` is a Python automation tool that allows you to define tasks in a {code}`noxfile.py` file and then run them with a single command.
276314
If you have not installed it yet, see our {ref}`installation guide for developers <development-setup>`.
277315

278-
We define four convenient {code}`nox` sessions in our {code}`noxfile.py`:
316+
We define some convenient {code}`nox` sessions in our {code}`noxfile.py`:
279317

280318
- {code}`tests` to run the Python tests
281319
- {code}`minimums` to run the Python tests with the minimum dependencies
282320
- {code}`lint` to run the Python code formatting and linting
283321
- {code}`docs` to build the documentation
322+
- {code}`stubs` to regenerate the type stub files for the Python bindings
284323

285324
These are explained in more detail in the following sections.
286325

@@ -301,7 +340,7 @@ We take extra care to install the project without build isolation so that rebuil
301340
If you only want to run the tests on a specific Python version, you can pass the desired Python version to the {code}`nox` command.
302341

303342
```console
304-
$ nox -s tests-3.12
343+
$ nox -s tests-3.14
305344
```
306345

307346
:::{note}
@@ -328,12 +367,12 @@ The Python code is formatted and linted using a collection of [{code}`pre-commit
328367
This collection includes
329368

330369
- [ruff][ruff], an extremely fast Python linter and formatter written in Rust, and
331-
- [mypy][mypy], a static type checker for Python code.
370+
- [ty][ty], Astral's type checker for Python.
332371

333372
The hooks can be installed by running the following command in the root directory:
334373

335374
```console
336-
$ pre-commit install
375+
$ prek install
337376
```
338377

339378
This will install the hooks in the {code}`.git/hooks` directory of the repository.
@@ -347,10 +386,10 @@ $ nox -s lint
347386

348387
:::{note}
349388

350-
If you do not want to use {code}`nox`, you can also run the hooks manually by using {code}`pre-commit`.
389+
If you do not want to use {code}`nox`, you can also run the hooks manually by using {code}`prek`.
351390

352391
```console
353-
$ pre-commit run --all-files
392+
$ prek run --all-files
354393
```
355394

356395
:::
@@ -363,6 +402,13 @@ Every public function, class, and module should have a docstring that explains w
363402

364403
We heavily rely on [type hints](https://docs.python.org/3/library/typing.html) to document the expected types of function arguments and return values.
365404
For the compiled parts of the code base, we provide type hints in the form of stub files in the {code}`python/mqt/qcec` directory.
405+
These stub files are auto-generated.
406+
Do not edit them directly.
407+
Instead, you can use the {code}`nox` session {code}`stubs` to regenerate them automatically.
408+
409+
```console
410+
nox -s stubs
411+
```
366412

367413
The Python API documentation is integrated into the overall documentation that we host on ReadTheDocs using the
368414
[{code}`sphinx-autoapi`](https://sphinx-autoapi.readthedocs.io/en/latest/) extension for Sphinx.
@@ -408,6 +454,7 @@ Here are some tips for finding the cause of certain failures:
408454

409455
- If any of the {code}`CI / 🇨‌ Test` checks fail, this indicates build errors or test failures in the C++ part of the code base.
410456
Look through the respective logs on GitHub for any error or failure messages.
457+
411458
- If any of the {code}`CI / 🐍 Test` checks fail, this indicates build errors or test failures in the Python part of the code base.
412459
Look through the respective logs on GitHub for any error or failure messages.
413460

@@ -420,6 +467,7 @@ Here are some tips for finding the cause of certain failures:
420467

421468
- If the {code}`pre-commit.ci` check fails, some of the {code}`pre-commit` checks failed and could not be fixed automatically by the _pre-commit.ci_ bot.
422469
The individual log messages frequently provide helpful suggestions on how to fix the warnings.
470+
423471
- If the {code}`docs/readthedocs.org:\*` check fails, the documentation could not be built properly.
424472
Inspect the corresponding log file for any errors.
425473

@@ -493,7 +541,7 @@ Afterward, navigate to the [Releases page](https://github.com/munich-quantum-too
493541
<!--- Links --->
494542

495543
[clion]: https://www.jetbrains.com/clion/
496-
[mypy]: https://mypy-lang.org/
544+
[ty]: https://docs.astral.sh/ty/
497545
[nox]: https://nox.thea.codes/en/stable/
498546
[issues]: https://github.com/munich-quantum-toolkit/qcec/issues
499547
[pipx]: https://pypa.github.io/pipx/

docs/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ UPGRADING
5151
:glob:
5252
5353
contributing
54+
tooling
5455
support
5556
```
5657
````

0 commit comments

Comments
 (0)