Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ categories:
- "submodules"
change-template: "- $TITLE ([#$NUMBER]($URL)) ([**@$AUTHOR**](https://github.com/$AUTHOR))"
change-title-escapes: '\<*_&'
exclude-labels:
- "skip-changelog"
- "backport"
- "release-prep"
version-resolver:
major:
labels:
Expand Down
34 changes: 32 additions & 2 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
$schema: "https://docs.renovatebot.com/renovate-schema.json",
suppressNotifications: ["prEditedNotification"],
minimumReleaseAge: '7 days',
extends: [
"config:recommended",
":gitSignOff",
Expand Down Expand Up @@ -52,10 +54,38 @@
},
{
description: "Group and automerge all patch updates",
groupName: "patch versions",
groupSlug: "all-patch",
groupName: "patch updates",
matchUpdateTypes: ["patch"],
matchCurrentVersion: "!/^0\.0/",
commitMessagePrefix: "⬆\uFE0F\uD83E\uDE79",
automerge: true
},
{
description: "Group and automerge all minor updates of stable dependencies (except our own packages)",
groupName: "minor stable updates",
matchUpdateTypes: ["minor"],
matchCurrentVersion: "!/^0\./",
matchPackageNames: [
"!munich-quantum-toolkit/*",
"!munich-quantum-software/*",
],
commitMessagePrefix: "⬆\uFE0F\uD83E\uDE79",
automerge: true
},
{
description: 'Disable minimum release age checks for our own GitHub Actions',
matchManagers: ['github-actions'],
matchPackageNames: [
'munich-quantum-toolkit/*',
'munich-quantum-software/*',
],
minimumReleaseAge: null,
},
{
description: 'Disable minimum release age checks for our own Python packages',
matchDatasources: ['pypi'],
matchPackageNames: ['mqt*'],
minimumReleaseAge: null,
}
]
}
55 changes: 47 additions & 8 deletions docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# Contributing

Thank you for your interest in contributing to MQT YAQS!
This document outlines how to contribute and the development guidelines.
This document outlines the development guidelines and how to contribute.

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

### Working with CodeRabbit

We use [CodeRabbit](https://www.coderabbit.ai/) for automated code review on pull requests.
To get the most out of it and help the project maintain its high ambitions for code quality, please follow these practices:

- **Draft PRs**:
CodeRabbit runs on every push to non-draft PRs.
If you are still experimenting, mark your PR as a draft so that the automated review only runs when you are ready for feedback.
- **Respond to comments**:
Do not simply resolve CodeRabbit's comments without answering them.
It learns from your replies and improves over time.
If a suggestion does not apply, take a moment to explain why in a reply.
- **Avoid multiple AI review bots**:
CodeRabbit performs significantly worse when other AI review bots (e.g., GitHub Copilot) are active on the same PR.
For the best results, do not tag Copilot unless you have already iterated with CodeRabbit and want an extra pass.
- **Engage CodeRabbit in discussions**:
When team members are discussing code in PR comments, CodeRabbit stays silent by default.
Tag {code}`@coderabbitai` to engage it in the conversation and get its feedback on the specific points being discussed.
In particular, when you tag another person in a comment, ensure to also tag CodeRabbit.
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.
- **Let CodeRabbit resolve comments**:
Wait until after the next push before considering resolving CodeRabbit's comments manually.
CodeRabbit will automatically resolve comments that it thinks have been addressed by your changes.
Sometimes, it gets stuck, at which point you may resolve it manually.
- **Manual review on drafts**:
You can trigger a full review on a draft PR by commenting with {code}`@coderabbitai full review`.
- **Continuing after reviews are paused**:
CodeRabbit has a default threshold for the number of reviews it performs on a PR before pausing further reviews to avoid spamming.
If you want to resume reviews, you can ask CodeRabbit to resume by commenting with {code}`@coderabbitai resume`.
Note that this will not trigger a review immediately; it will just allow CodeRabbit to perform reviews on the next push or manual trigger.

### Use of AI and LLMs

Contributions may be prepared with the help of AI or LLM tools.
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.
Ensure that all text, code, and documentation you submit are accurate, relevant, and consistent with the project's style and guidelines.
Please be mindful of the maintainers' time and consider the impact of your contributions on the project's long-term success.

## Get Started 🎉

Ready to contribute?
Expand All @@ -111,7 +149,7 @@ We recommend using [{code}`nox`][nox] for development.
{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.
If you have not installed it yet, see our {ref}`installation guide for developers <development-setup>`.

We define four convenient {code}`nox` sessions in our {code}`noxfile.py`:
We define some convenient {code}`nox` sessions in our {code}`noxfile.py`:

- {code}`tests` to run the Python tests
- {code}`minimums` to run the Python tests with the minimum dependencies
Expand All @@ -137,7 +175,7 @@ We take extra care to install the project without build isolation so that rebuil
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.

```console
$ nox -s tests-3.12
$ nox -s tests-3.14
```

:::{note}
Expand All @@ -164,12 +202,12 @@ The Python code is formatted and linted using a collection of [{code}`pre-commit
This collection includes

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

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

```console
$ pre-commit install
$ prek install
```

This will install the hooks in the {code}`.git/hooks` directory of the repository.
Expand All @@ -183,10 +221,10 @@ $ nox -s lint

:::{note}

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

```console
$ pre-commit run --all-files
$ prek run --all-files
```

:::
Expand Down Expand Up @@ -249,6 +287,7 @@ Here are some tips for finding the cause of certain failures:

- 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.
The individual log messages frequently provide helpful suggestions on how to fix the warnings.

- If the {code}`docs/readthedocs.org:\*` check fails, the documentation could not be built properly.
Inspect the corresponding log file for any errors.

Expand Down Expand Up @@ -322,7 +361,7 @@ Afterward, navigate to the [Releases page](https://github.com/munich-quantum-too
<!--- Links --->

[clion]: https://www.jetbrains.com/clion/
[mypy]: https://mypy-lang.org/
[ty]: https://docs.astral.sh/ty/
[nox]: https://nox.thea.codes/en/stable/
[issues]: https://github.com/munich-quantum-toolkit/yaqs/issues
[pipx]: https://pypa.github.io/pipx/
Expand Down
1 change: 1 addition & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ UPGRADING
:titlesonly:

contributing
tooling
support
```
````
Expand Down
49 changes: 49 additions & 0 deletions docs/tooling.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<!--- This file has been generated from an external template. Please do not modify it directly. -->
<!--- Changes should be contributed to https://github.com/munich-quantum-toolkit/templates. -->

# Tooling

This page summarizes the main tools, software, and standards used in MQT YAQS.
It serves as a quick reference for new contributors and users who want to understand the project's ecosystem.

## Python

| Tool | Description | Links / Notes |
| ---------- | ---------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **uv** | Fast Python package and project manager (install, venv, dependencies). | [Documentation](https://docs.astral.sh/uv/). Recommended over {code}`pip` for installs and development. |
| **nox** | Task automation for tests, lint, docs, and other sessions defined in {code}`noxfile.py`. | [Documentation](https://nox.thea.codes/en/stable/). Run sessions with {code}`nox -s <session>`. |
| **prek** | Runs hooks (formatting, linting) before each commit. | [Documentation](https://prek.j178.dev). Install and run via {code}`prek install`, {code}`prek run` (staged files), or {code}`prek run -a` (all files). |
| **ruff** | Linter and formatter for Python, written in Rust. | [Documentation](https://docs.astral.sh/ruff/). Used in prek and CI. |
| **ty** | Fast Python type checker and language server. | [Documentation](https://docs.astral.sh/ty/). |
| **pytest** | Testing framework for Python. | [Documentation](https://docs.pytest.org/). Run via {code}`nox -s tests` or {code}`uv run pytest`. |

The project adheres to modern standards and practices. For the Python ecosystem, we make use of the following standards:

| Standard | Description | Links / Notes |
| ----------- | --------------------------------------------------------------- | --------------------------------------------------- |
| **PEP 8** | Style guide for Python code. | [Documentation](https://peps.python.org/pep-0008/). |
| **PEP 518** | Specifying build system requirements in {code}`pyproject.toml`. | [Documentation](https://peps.python.org/pep-0518/). |
| **PEP 621** | Storing project metadata in {code}`pyproject.toml`. | [Documentation](https://peps.python.org/pep-0621/). |
| **PEP 639** | Standardized license metadata in {code}`pyproject.toml`. | [Documentation](https://peps.python.org/pep-0639/). |
| **PEP 723** | Inline script metadata for efficient script execution. | [Documentation](https://peps.python.org/pep-0723/). |
| **PEP 735** | Dependency groups in {code}`pyproject.toml`. | [Documentation](https://peps.python.org/pep-0735/). |

## Documentation

| Tool | Description | Links / Notes |
| ---------- | ------------------------------------------ | ------------------------------------------------------------------------------------------- |
| **Sphinx** | Documentation generator. | [Documentation](https://www.sphinx-doc.org/). Docs source in {code}`docs/`. |
| **MyST** | Markdown flavor for Sphinx (used in docs). | [Documentation](https://myst-parser.readthedocs.io/). Enables rich Markdown in doc sources. |

## CI and Quality

| Tool | Description | Links / Notes |
| ------------------ | ------------------------------------------- | ---------------------------------------------------------------------- |
| **GitHub Actions** | CI workflows (build, test, lint, coverage). | [Reusable MQT Workflows] in {code}`.github/workflows/`; see [Actions]. |
| **Codecov** | Code coverage reporting. | [Codecov] for this repo. |
| **CodeRabbit** | Automated code review on PRs. | [CodeRabbit](https://www.coderabbit.ai/). See {doc}`contributing`. |
| **pre-commit.ci** | Runs pre-commit in CI and can auto-fix. | [pre-commit.ci](https://pre-commit.ci). |

[Actions]: https://github.com/munich-quantum-toolkit/yaqs/actions
[Codecov]: https://codecov.io/gh/munich-quantum-toolkit/yaqs
[Reusable MQT Workflows]: https://github.com/munich-quantum-toolkit/workflows
Loading