|
36 | 36 |
|
37 | 37 | ### C++ |
38 | 38 |
|
39 | | -- Targets Linux (glibc 2.28+), macOS (11.0+), |
40 | | - and Windows on x86_64 and arm64 architectures |
| 39 | +- Targets Linux (glibc 2.28+), macOS (11.0+), and Windows on x86_64 and arm64 |
| 40 | + architectures |
41 | 41 | - C++20 |
42 | 42 | - CMake 3.24+ |
43 | | -- `FetchContent` for dependency management |
44 | | - (configured in `cmake/ExternalDependencies.cmake`) |
45 | | -- `clang-format` and `clang-tidy` for formatting/linting |
46 | | - (see `.clang-format` and `.clang-tidy`) |
| 43 | +- `FetchContent` for dependency management (configured in |
| 44 | + `cmake/ExternalDependencies.cmake`) |
| 45 | +- `clang-format` and `clang-tidy` for formatting/linting (see `.clang-format` |
| 46 | + and `.clang-tidy`) |
47 | 47 | - GoogleTest for unit tests (located in `test/`) |
48 | 48 |
|
49 | 49 | ### Python |
|
69 | 69 |
|
70 | 70 | ### General |
71 | 71 |
|
72 | | -- MUST run `uvx nox -s lint` after every batch of changes. |
73 | | - This runs the full `prek` hook set from `.pre-commit-config.yaml` |
74 | | - (including `ruff`, `typos`, `ty`, formatting, and metadata checks). |
75 | | - All hooks must pass before submitting. |
76 | | -- MUST add or update tests for every code change, |
77 | | - even if not explicitly requested. |
| 72 | +- MUST run `uvx nox -s lint` after every batch of changes. This runs the full |
| 73 | + `prek` hook set from `.pre-commit-config.yaml` (including `ruff`, `typos`, |
| 74 | + `ty`, formatting, and metadata checks). All hooks must pass before submitting. |
| 75 | +- MUST add or update tests for every code change, even if not explicitly |
| 76 | + requested. |
78 | 77 | - MUST follow existing code style by checking neighboring files for patterns. |
79 | 78 | - MUST update `CHANGELOG.md` and `UPGRADING.md` when changes are user-facing, |
80 | 79 | breaking, or otherwise noteworthy. |
|
83 | 82 | `Assisted-by: Claude Sonnet 4.6 via GitHub Copilot`) if AI tools are used to |
84 | 83 | prepare a commit. |
85 | 84 | - NEVER modify files that start with "This file has been generated from an |
86 | | - external template. |
87 | | - Please do not modify it directly." |
88 | | - These files are managed by |
| 85 | + external template. Please do not modify it directly." These files are managed |
| 86 | + by |
89 | 87 | [the MQT templates action](https://github.com/munich-quantum-toolkit/templates) |
90 | 88 | and changes will be overwritten. |
91 | 89 | - PREFER running targeted tests over the full test suite during development. |
|
94 | 92 |
|
95 | 93 | - MUST use Doxygen-style comments. |
96 | 94 | - MUST use `#pragma once` for header guards. |
97 | | -- MUST regenerate stubs via `uvx nox -s stubs` |
98 | | - when files in `bindings/` are added or modified. |
99 | | -- NEVER edit `.pyi` files in `python/mqt/scpd/` manually; |
100 | | - they are auto-generated by nanobind stubgen. |
| 95 | +- MUST regenerate stubs via `uvx nox -s stubs` when files in `bindings/` are |
| 96 | + added or modified. |
| 97 | +- NEVER edit `.pyi` files in `python/mqt/scpd/` manually; they are |
| 98 | + auto-generated by `nanobind.stubgen`. |
101 | 99 | - PREFER C++20 STL features over custom implementations. |
102 | 100 |
|
103 | 101 | ### Python |
104 | 102 |
|
105 | 103 | - MUST use Google-style docstrings |
106 | 104 | - PREFER running a single Python version over the full test suite during |
107 | 105 | development. |
108 | | -- PREFER fixing reported warnings over suppressing them |
109 | | - (e.g., with `# noqa` comments for ruff); |
110 | | - only add ignore rules when necessary and document why. |
111 | | -- PREFER fixing typing issues reported by `ty` |
112 | | - before adding suppression comments |
113 | | - (`# ty: ignore[code]`); |
114 | | - suppressions are sometimes necessary for incompletely typed libraries |
115 | | - (e.g., Qiskit). |
| 106 | +- PREFER fixing reported warnings over suppressing them (e.g., with `# noqa` |
| 107 | + comments for ruff); only add ignore rules when necessary and document why. |
| 108 | +- PREFER fixing typing issues reported by `ty` before adding suppression |
| 109 | + comments (`# ty: ignore[code]`); suppressions are sometimes necessary for |
| 110 | + incompletely typed libraries (e.g., Qiskit). |
116 | 111 |
|
117 | 112 | ## Self-Review Checklist |
118 | 113 |
|
119 | 114 | - Did `uvx nox -s lint` pass without errors? |
120 | 115 | - Are all changes covered by at least one automated test? |
121 | | -- Were Python stubs regenerated via `uvx nox -s stubs` |
122 | | - if bindings were modified? |
| 116 | +- Were Python stubs regenerated via `uvx nox -s stubs` if bindings were |
| 117 | + modified? |
123 | 118 | - Are `CHANGELOG.md` and `UPGRADING.md` updated when changes are user-facing, |
124 | 119 | breaking, or otherwise noteworthy? |
0 commit comments