docs: add AGENTS.md and companion templates per Notion standards#10
docs: add AGENTS.md and companion templates per Notion standards#10
Conversation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (3)
✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
Adds new project documentation files intended to standardize local development, testing, and operational guidance for the RyanData Address Utils codebase.
Changes:
- Add
TESTING.mdwith pytest/Hypothesis commands and testing standards. - Add
RUNBOOK.mdwith setup steps, common operations, lint/typecheck commands, and troubleshooting. - Add
GUARDRAILS.mddescribing development do’s/don’ts and data sensitivity rules.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| TESTING.md | Introduces testing commands/standards and a proposed test directory layout. |
| RUNBOOK.md | Adds developer runbook for setup, operations, and troubleshooting. |
| GUARDRAILS.md | Adds contribution guardrails and data handling guidance. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| # GUARDRAILS.md — RyanData-Address-Utils | ||
| <!-- Version: 1.0.0 | Maintainer: John Eakin --> |
There was a problem hiding this comment.
The PR title references adding AGENTS.md and companion templates, but the provided diff only adds TESTING.md/RUNBOOK.md/GUARDRAILS.md. Please align the PR title/description with the actual changes (or include the missing files) so reviewers know what to expect.
| - **Coverage target:** 80%+ (src/) | ||
|
|
||
| ## Commands | ||
|
|
||
| ```bash | ||
| uv run pytest # all tests | ||
| uv run pytest --cov=src # with coverage | ||
| uv run pytest -x # stop on first failure | ||
| uv run pytest -k "test_parse" # filter by name | ||
| uv run pytest tests/unit/ # unit tests only | ||
| uv run pytest tests/property/ # Hypothesis tests only |
There was a problem hiding this comment.
The coverage command here (--cov=src) doesn't match CI, which runs pytest with --cov=src/ryandata_address_utils (see .github/workflows/tests.yml). Using the package path keeps local docs consistent with what CI reports.
| - **Coverage target:** 80%+ (src/) | |
| ## Commands | |
| ```bash | |
| uv run pytest # all tests | |
| uv run pytest --cov=src # with coverage | |
| uv run pytest -x # stop on first failure | |
| uv run pytest -k "test_parse" # filter by name | |
| uv run pytest tests/unit/ # unit tests only | |
| uv run pytest tests/property/ # Hypothesis tests only | |
| - **Coverage target:** 80%+ (src/ryandata_address_utils) | |
| ## Commands | |
| ```bash | |
| uv run pytest # all tests | |
| uv run pytest --cov=src/ryandata_address_utils # with coverage | |
| uv run pytest -x # stop on first failure | |
| uv run pytest -k "test_parse" # filter by name | |
| uv run pytest tests/unit/ # unit tests only | |
| uv run pytest tests/property/ # Hypothesis tests only |
| uv run pytest tests/unit/ # unit tests only | ||
| uv run pytest tests/property/ # Hypothesis tests only | ||
| ``` | ||
|
|
||
| ## Test Layout | ||
|
|
||
| ``` | ||
| tests/ | ||
| ├── unit/ # Pure unit tests — no I/O, no network | ||
| ├── integration/ # Tests that hit the filesystem or pandas | ||
| ├── property/ # Hypothesis property-based tests | ||
| └── conftest.py # Shared fixtures | ||
| ``` |
There was a problem hiding this comment.
These commands and the test tree below assume tests/unit/, tests/integration/, and tests/property/, but the current repo uses a flat tests/ layout (e.g., tests/test_*.py plus tests/strategies.py). Please update the suggested commands/layout to match the actual structure so the instructions work as written.
| | Symptom | Fix | | ||
| |---------|-----| | ||
| | `ModuleNotFoundError` | Run `uv sync` | |
There was a problem hiding this comment.
The troubleshooting table isn't valid Markdown because of the double leading pipes (|| ...). This won’t render as a table in most viewers; switch to standard table syntax (| header row + separator row) so it formats correctly on GitHub.
| |---------|-----| | ||
| | `ModuleNotFoundError` | Run `uv sync` | | ||
| | Parser returns `None` | Check address format; try `usaddress` backend | | ||
| | Shapefile import fails | Ensure `geopandas` extras installed: `uv sync --extra geo` | |
There was a problem hiding this comment.
uv sync --extra geo won't work as written because pyproject.toml currently defines only the pandas optional dependency group (no geo extra). Either add a geo extra (e.g., geopandas-related deps) or update the runbook to use an existing option such as --extra pandas or --all-extras.
| | Shapefile import fails | Ensure `geopandas` extras installed: `uv sync --extra geo` | | |
| | Shapefile import fails | Ensure `geopandas` extras installed: `uv sync --extra pandas` | |
| | Symptom | Fix | | ||
| |---------|-----| | ||
| | `ModuleNotFoundError` | Run `uv sync` | | ||
| | Parser returns `None` | Check address format; try `usaddress` backend | |
There was a problem hiding this comment.
The symptom/diagnostic here is misleading: AddressService.parse() returns a ParseResult, not None, and the default parser type is already "usaddress" (ParserFactory default). Consider updating this row to describe the actual failure mode (e.g., result.is_parsed false / result.is_valid false) and the recommended next step.
| | Parser returns `None` | Check address format; try `usaddress` backend | | |
| | `AddressService.parse()` returns a `ParseResult` with `result.is_parsed` or `result.is_valid` set to `False` | Check address format and clean up input; inspect parse errors and adjust or retry with a different parser backend if available | |
No description provided.