Release prep: - Version bump to 0.3.0 (pyproject.toml, cli.py) - Rewrite README.md with current stats (475 drafts, 713 authors, 501 ideas) - Add CONTRIBUTING.md with dev setup and code conventions Blog site: - Add scripts/build-site.py (markdown → HTML with clean CSS, dark mode, nav) - Generate static site in docs/blog/ (10 pages) - Ready for GitHub Pages deployment Academic paper (paper/main.tex): - Update all counts: 474→475 drafts, 557→710 authors, 1907→462 ideas, 11→12 gaps - Add false-positive filtering methodology (113 excluded, 361 relevant) - Add cross-org convergence analysis (132 ideas, 33% rate) - Add GDPR compliance gap to gap table - Add LLM-as-judge caveats to rating methodology and limitations - Add FIPA, IEEE P3394, W3C WoT to related work with bibliography entries - Fix safety ratio to show monthly variation (1.5:1 to 21:1) Pipeline: - Fetch 1 new draft (475 total), 3 new authors (713 total) - Fix 16 ruff lint errors across test files - All 106 tests pass Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1.8 KiB
1.8 KiB
Contributing
Setup
git clone <repo-url>
cd ietf-draft-analyzer
pip install -e ".[test]"
You'll also need:
- Anthropic API key: Set
ANTHROPIC_API_KEYin.envor environment - Ollama: Running locally with
nomic-embed-textmodel for embeddings
Running Tests
pytest tests/ -v
Tests cover: JSON extraction, rating validation, FTS5 sanitization, database operations, data models, Obsidian export.
Code Conventions
- CLI: Click commands in
cli.pywith@click.option()decorators. Use thepass_cfg_dbdecorator for config/db lifecycle. - Database: Tables defined in
db.pyensure_tables(), queries as methods onDatabase. Always use parameterized queries. - Reports: Report types in
reports.pygenerate_report(). - LLM calls: Always cache via
llm_cachetable (prompt SHA-256 hash). Usecheap=Truefor bulk operations. - Output: Use
richfor console output. - Web UI: Flask routes in
app.py, data access indata.pywith TypedDict return types, Jinja2 templates.
Adding a New CLI Command
- Add the command function in
cli.pyunder the appropriate group - Use
@pass_cfg_dbfor automatic config/db injection - Add
--dry-runflag for commands that modify data - Use
richtables/panels for output
Adding a New Report Type
- Add the report function in
reports.py - Register it in the
reportCLI group incli.py - Output goes to
data/reports/
Adding a New Web UI Page
- Create template in
src/webui/templates/ - Add data function in
data.py(with TypedDict return type) - Add route in
app.py - Add navigation link in
base.html
Linting
pip install ruff
ruff check src/ tests/ --select E,F,W --ignore E501
Project Layout
See README.md for full project structure.