v0.3.0: Publication-ready release with blog site, paper update, and polish
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>
This commit is contained in:
61
CONTRIBUTING.md
Normal file
61
CONTRIBUTING.md
Normal file
@@ -0,0 +1,61 @@
|
||||
# Contributing
|
||||
|
||||
## Setup
|
||||
|
||||
```bash
|
||||
git clone <repo-url>
|
||||
cd ietf-draft-analyzer
|
||||
pip install -e ".[test]"
|
||||
```
|
||||
|
||||
You'll also need:
|
||||
- **Anthropic API key**: Set `ANTHROPIC_API_KEY` in `.env` or environment
|
||||
- **Ollama**: Running locally with `nomic-embed-text` model for embeddings
|
||||
|
||||
## Running Tests
|
||||
|
||||
```bash
|
||||
pytest tests/ -v
|
||||
```
|
||||
|
||||
Tests cover: JSON extraction, rating validation, FTS5 sanitization, database operations, data models, Obsidian export.
|
||||
|
||||
## Code Conventions
|
||||
|
||||
- **CLI**: Click commands in `cli.py` with `@click.option()` decorators. Use the `pass_cfg_db` decorator for config/db lifecycle.
|
||||
- **Database**: Tables defined in `db.py` `ensure_tables()`, queries as methods on `Database`. Always use parameterized queries.
|
||||
- **Reports**: Report types in `reports.py` `generate_report()`.
|
||||
- **LLM calls**: Always cache via `llm_cache` table (prompt SHA-256 hash). Use `cheap=True` for bulk operations.
|
||||
- **Output**: Use `rich` for console output.
|
||||
- **Web UI**: Flask routes in `app.py`, data access in `data.py` with TypedDict return types, Jinja2 templates.
|
||||
|
||||
## Adding a New CLI Command
|
||||
|
||||
1. Add the command function in `cli.py` under the appropriate group
|
||||
2. Use `@pass_cfg_db` for automatic config/db injection
|
||||
3. Add `--dry-run` flag for commands that modify data
|
||||
4. Use `rich` tables/panels for output
|
||||
|
||||
## Adding a New Report Type
|
||||
|
||||
1. Add the report function in `reports.py`
|
||||
2. Register it in the `report` CLI group in `cli.py`
|
||||
3. Output goes to `data/reports/`
|
||||
|
||||
## Adding a New Web UI Page
|
||||
|
||||
1. Create template in `src/webui/templates/`
|
||||
2. Add data function in `data.py` (with TypedDict return type)
|
||||
3. Add route in `app.py`
|
||||
4. Add navigation link in `base.html`
|
||||
|
||||
## Linting
|
||||
|
||||
```bash
|
||||
pip install ruff
|
||||
ruff check src/ tests/ --select E,F,W --ignore E501
|
||||
```
|
||||
|
||||
## Project Layout
|
||||
|
||||
See README.md for full project structure.
|
||||
Reference in New Issue
Block a user