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