File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # Agent Guidelines for reticula-python
2+
3+ ## Build & Test Commands
4+ - ** Build** : ` python -m pip install .[test] -v ` (builds C++ extension with nanobind)
5+ - ** Test all** : ` python -m pytest . `
6+ - ** Test single** : ` python -m pytest tests/test_filename.py::test_function_name `
7+ - ** Lint** : ` flake8 ` (extends ignore E402 for import order)
8+
9+ ## Project Structure
10+ - C++ source in ` src/ ` (uses nanobind, CMake, C++20)
11+ - Python package in ` src/reticula/ `
12+ - Tests in ` tests/ ` using pytest + hypothesis
13+ - Uses scikit-build-core for building
14+
15+ ## Code Style
16+ - ** Python** : Follow PEP 8, snake_case naming, type hints preferred
17+ - ** C++** : LLVM style (see .clang-format), 2-space indent, left pointer alignment
18+ - ** Imports** : Relative imports with underscore prefix for internal modules
19+ - ** Generic attributes** : Use ` _generic_attribute ` pattern for templated functions
20+ - ** Error handling** : Raise appropriate exceptions with descriptive messages
21+
22+ ## Key Patterns
23+ - Generic templated functions via ` generic_attribute ` metaclass
24+ - C++ types exposed as Python classes with ` __name__ ` attributes
25+ - Network types parameterized by vertex and time types
26+ - Use ` _reticula_ext ` for C++ bindings, expose through main module
You can’t perform that action at this time.
0 commit comments