|
1 | 1 | # Repository Guidelines |
2 | 2 |
|
3 | 3 | ## Project Structure & Module Organization |
| 4 | + |
4 | 5 | - `atom/` — C++ core library, organized by domain (algorithm, async, io, etc.). |
5 | 6 | - `python/` — Pybind11 bindings and the `atom` Python package. |
6 | 7 | - `tests/` — C++ test suite (GoogleTest via CMake/CTest). Python tests, if any, also live here. |
7 | 8 | - `docs/` — Sphinx docs; `doc/` — Doxygen configuration (`Doxyfile`). |
8 | 9 | - `cmake/`, `scripts/`, `example/`, `build/` (generated). |
9 | 10 |
|
10 | 11 | ## Build, Test, and Development Commands |
| 12 | + |
11 | 13 | - C++ build (Ninja default): `cmake --preset release && cmake --build --preset release -j` |
12 | 14 | - C++ tests: `cmake --preset debug && cmake --build --preset debug -j && ctest --preset default --output-on-failure` |
13 | 15 | - Cross‑platform scripts: `./build.sh` (Unix) or `build.bat` (Windows) - wrapper scripts for backward compatibility |
|
17 | 19 | - Docs: Sphinx `sphinx-build -b html docs docs/_build`; Doxygen `doxygen Doxyfile` |
18 | 20 |
|
19 | 21 | ## Coding Style & Naming Conventions |
| 22 | + |
20 | 23 | - C++: 4‑space indent, 80‑column guide; format with `clang-format` (see `.clang-format`). |
21 | 24 | - Naming (C++): camelCase for variables/functions, PascalCase for classes/namespaces, UPPER_SNAKE_CASE for constants, files `lower_snake_case.[cpp|hpp]` (see `STYLE_OF_CODE.md`). Prefer Doxygen comments. |
22 | 25 | - Python: Black (88 cols), isort, Ruff, MyPy (configured in `pyproject.toml`). Run: `pre-commit run -a`. |
23 | 26 |
|
24 | 27 | ## Testing Guidelines |
| 28 | + |
25 | 29 | - C++: Use GoogleTest; place tests under `tests/<module>/` and register targets in the local `CMakeLists.txt`. Run via CTest; include edge cases and failure paths. |
26 | 30 | - Python: pytest patterns `test_*.py`, marks available (`unit`, `integration`, `slow`). Aim to keep coverage healthy; prefer small, focused tests. |
27 | 31 |
|
28 | 32 | ## Commit & Pull Request Guidelines |
| 33 | + |
29 | 34 | - Commits: short imperative subject (≤72 chars), descriptive body when needed. Reference issues (`#123`). Conventional commit prefixes are optional. |
30 | 35 | - PRs: clear description, rationale, linked issues, tests added/updated, and doc changes if behavior/user‑facing APIs change. Ensure `pre-commit` passes and CI is green. |
31 | 36 |
|
32 | 37 | ## Security & Configuration Tips |
| 38 | + |
33 | 39 | - Don’t commit secrets; prefer env vars. Build requires CMake ≥3.21 and a modern compiler (MSVC 2022/GCC/Clang). C/C++ deps via vcpkg/Conan; Python ≥3.8. |
0 commit comments