|
| 1 | +# GitHub Copilot Instructions |
| 2 | + |
| 3 | +## Project Overview |
| 4 | + |
| 5 | +`bodyloop-sdk` is a Python SDK for the BodyLoop API. It follows |
| 6 | +**Spec-Driven Development (SDD)**: write a clear docstring/spec first, then |
| 7 | +implement, then test. |
| 8 | + |
| 9 | +## Spec-Driven Development Workflow |
| 10 | + |
| 11 | +1. **Spec** – Write a detailed docstring describing the function/class contract |
| 12 | + (inputs, outputs, raised exceptions, edge cases) before any implementation. |
| 13 | +2. **Implement** – Ask Copilot to generate the implementation that satisfies the spec. |
| 14 | +3. **Test** – Ask Copilot to generate `pytest` tests covering the spec. |
| 15 | +4. **Review** – Verify Copilot output matches the spec; adjust as needed. |
| 16 | + |
| 17 | +## Code Style |
| 18 | + |
| 19 | +- Python ≥ 3.11; use type hints on all public APIs. |
| 20 | +- Keep the `src/bodyloop_sdk/` layout; add new modules inside that package. |
| 21 | +- Use `snake_case` for functions/variables, `PascalCase` for classes. |
| 22 | +- Keep public APIs small and composable; prefer pure functions. |
| 23 | + |
| 24 | +## Testing |
| 25 | + |
| 26 | +- All tests live in `tests/`; mirror the source module structure. |
| 27 | +- Every public function must have at least one happy-path test and one |
| 28 | + error/edge-case test. |
| 29 | +- Run tests with: `uv run pytest` |
| 30 | + |
| 31 | +## Dependency Management |
| 32 | + |
| 33 | +- Manage dependencies with `uv`; edit `pyproject.toml` directly. |
| 34 | +- Add runtime deps: `uv add <package>` |
| 35 | +- Add dev deps: `uv add --dev <package>` |
| 36 | + |
| 37 | +## Release Process |
| 38 | + |
| 39 | +- Bump `__version__` in `src/bodyloop_sdk/__init__.py`. |
| 40 | +- Create a GitHub release tagged `vX.Y.Z`. |
| 41 | +- The `release.yml` workflow will build and publish to PyPI automatically. |
0 commit comments