|
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 include a commit footer attribution in the form |
80 | 79 | `Assisted-by: [Model Name] via [Tool Name]` (example: |
81 | 80 | `Assisted-by: Claude Sonnet 4.6 via GitHub Copilot`) if AI tools are used to |
82 | 81 | prepare a commit. |
83 | 82 | - NEVER modify files that start with "This file has been generated from an |
84 | | - external template. |
85 | | - Please do not modify it directly." |
86 | | - These files are managed by |
| 83 | + external template. Please do not modify it directly." These files are managed |
| 84 | + by |
87 | 85 | [the MQT templates action](https://github.com/munich-quantum-toolkit/templates) |
88 | 86 | and changes will be overwritten. |
89 | 87 | - PREFER running targeted tests over the full test suite during development. |
|
92 | 90 |
|
93 | 91 | - MUST use Doxygen-style comments. |
94 | 92 | - MUST use `#pragma once` for header guards. |
95 | | -- MUST regenerate stubs via `uvx nox -s stubs` |
96 | | - when files in `bindings/` are added or modified. |
97 | | -- NEVER edit `.pyi` files in `python/mqt/debugger/` manually; |
98 | | - they are auto-generated by nanobind stubgen. |
| 93 | +- MUST regenerate stubs via `uvx nox -s stubs` when files in `bindings/` are |
| 94 | + added or modified. |
| 95 | +- NEVER edit `.pyi` files in `python/mqt/debugger/` manually; they are |
| 96 | + auto-generated by `nanobind.stubgen`. |
99 | 97 | - PREFER C++20 STL features over custom implementations. |
100 | 98 |
|
101 | 99 | ### Python |
102 | 100 |
|
103 | 101 | - MUST use Google-style docstrings |
104 | 102 | - PREFER running a single Python version over the full test suite during |
105 | 103 | development. |
106 | | -- PREFER fixing reported warnings over suppressing them |
107 | | - (e.g., with `# noqa` comments for ruff); |
108 | | - only add ignore rules when necessary and document why. |
109 | | -- PREFER fixing typing issues reported by `ty` |
110 | | - before adding suppression comments |
111 | | - (`# ty: ignore[code]`); |
112 | | - suppressions are sometimes necessary for incompletely typed libraries |
113 | | - (e.g., Qiskit). |
| 104 | +- PREFER fixing reported warnings over suppressing them (e.g., with `# noqa` |
| 105 | + comments for ruff); only add ignore rules when necessary and document why. |
| 106 | +- PREFER fixing typing issues reported by `ty` before adding suppression |
| 107 | + comments (`# ty: ignore[code]`); suppressions are sometimes necessary for |
| 108 | + incompletely typed libraries (e.g., Qiskit). |
114 | 109 |
|
115 | 110 | ## Self-Review Checklist |
116 | 111 |
|
117 | 112 | - Did `uvx nox -s lint` pass without errors? |
118 | 113 | - Are all changes covered by at least one automated test? |
119 | | -- Were Python stubs regenerated via `uvx nox -s stubs` |
120 | | - if bindings were modified? |
| 114 | +- Were Python stubs regenerated via `uvx nox -s stubs` if bindings were |
| 115 | + modified? |
0 commit comments