Skip to content

Commit 4824c2e

Browse files
committed
init AGENTS.md
1 parent 51d6867 commit 4824c2e

1 file changed

Lines changed: 33 additions & 0 deletions

File tree

AGENTS.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Repository Guidelines
2+
3+
## Project Structure & Module Organization
4+
- `src/wrapper.cpp`: pybind11 bindings that expose Microsoft SEAL C++ APIs as the Python module `seal`.
5+
- `SEAL/`: Microsoft SEAL submodule source and CMake build output (`SEAL/build/...`).
6+
- `pybind11/`: pybind11 submodule headers used by the extension build.
7+
- `examples/`: runnable Python usage samples (for example `4_bgv_basics.py`, `7_serialization.py`).
8+
- Root build files: `setup.py`, `pyproject.toml`, `Dockerfile`, and `README.md`.
9+
10+
## Build, Test, and Development Commands
11+
- `git submodule update --init --recursive`: fetch SEAL and pybind11 submodules.
12+
- `cmake -S SEAL -B SEAL/build -DSEAL_USE_MSGSL=OFF -DSEAL_USE_ZLIB=OFF -DSEAL_USE_ZSTD=OFF && cmake --build SEAL/build`: build static SEAL libraries used by the Python extension.
13+
- `python3 setup.py build_ext -i`: build `seal` extension in-place for local development.
14+
- `python3 setup.py install`: install the module into the active environment.
15+
- `cp seal.*.so examples && python3 examples/4_bgv_basics.py`: smoke-test a Linux/macOS build with an example.
16+
- `docker build -t seal-python -f Dockerfile .`: build reproducible container environment.
17+
18+
## Coding Style & Naming Conventions
19+
- Python: follow PEP 8, 4-space indentation, `snake_case` for functions/variables.
20+
- C++ bindings: keep existing style in `wrapper.cpp` (4-space indentation, grouped bindings by SEAL header/domain).
21+
- Exposed Python symbols should match upstream SEAL naming where practical (for API familiarity).
22+
- Prefer adding small, focused binding blocks rather than large mixed edits.
23+
24+
## Testing Guidelines
25+
- No formal `tests/` suite is currently checked in; use example scripts as regression checks.
26+
- For binding changes, run at least one arithmetic flow (`examples/4_bgv_basics.py`) and one serialization flow (`examples/7_serialization.py`).
27+
- If adding new behavior, include a minimal runnable example in `examples/` named after the feature.
28+
29+
## Commit & Pull Request Guidelines
30+
- Recent history favors short imperative subjects (for example: `Update deps`, `Update README.md`, `Update SEAL`).
31+
- Keep commit titles under ~72 characters and focused on one change.
32+
- PRs should include: purpose, build/test commands run, platform used, and any API surface changes.
33+
- Link related issues and include sample output when behavior changes are user-visible.

0 commit comments

Comments
 (0)