Skip to content

Commit 96dbe9d

Browse files
committed
add a basic AGENTS file
1 parent d5f2edd commit 96dbe9d

1 file changed

Lines changed: 26 additions & 0 deletions

File tree

AGENTS.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
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

0 commit comments

Comments
 (0)