diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a84fbdf..ed5aed1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,6 +1,6 @@ # Contributing -This repo follows the same patterns as [`canada-swim-tech-survey`](https://github.com/gavinbee/canada-swim-tech-survey). +This repo follows the same patterns as [`canada-swim-tech-survey`](https://github.com/swimblocks/swim-club-tech-survey). ## Workflow diff --git a/README.md b/README.md index 8da66ed..69b1c44 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ Parse Canadian swimming **On-Deck Evaluation** PDFs into a structured spreadsheet, using a local vision LLM. Hand-filled scanned forms or natively-generated PDFs, both supported. -> **Status:** under construction. **Fillable PDFs (e.g. `eval-gen` output, online-form exports) parse end-to-end today.** Scanned PDFs go through a local vision model; that path is being built. See [docs/design/0001-initial-design.md](docs/design/0001-initial-design.md) and [the open issues](https://github.com/gavinbee/canswim-deck-eval-parser/issues). +> **Status:** under construction. **Fillable PDFs (e.g. `eval-gen` output, online-form exports) parse end-to-end today.** Scanned PDFs go through a local vision model; that path is being built. See [docs/design/0001-initial-design.md](docs/design/0001-initial-design.md) and [the open issues](https://github.com/swimblocks/deck-eval-parser/issues). ## Quick start @@ -13,7 +13,7 @@ brew install ollama # macOS curl -fsSL https://ollama.com/install.sh | sh # Linux # 2. Set up the parser -git clone https://github.com/gavinbee/canswim-deck-eval-parser.git +git clone https://github.com/swimblocks/deck-eval-parser.git cd canswim-deck-eval-parser python -m venv .venv && source .venv/bin/activate # or .venv\Scripts\activate on Windows pip install -r requirements.txt @@ -24,18 +24,18 @@ python main.py path/to/eval.pdf Output lands in `output/` as `.json` (canonical), plus a derived `.csv` and `.xlsx`. -One-command install scripts (`scripts/install.ps1` / `install.sh`) wrap all of step 1+2 and are tracked under [issue #11](https://github.com/gavinbee/canswim-deck-eval-parser/issues/11). +One-command install scripts (`scripts/install.ps1` / `install.sh`) wrap all of step 1+2 and are tracked under [issue #11](https://github.com/swimblocks/deck-eval-parser/issues/11). ## Supported templates | Province | Template ID | Status | |---|---|---| | Ontario | `swim_ontario_v1` | implemented (v1) | -| Quebec | `swim_quebec_v1` | stub — [follow-up issue](https://github.com/gavinbee/canswim-deck-eval-parser/issues) | +| Quebec | `swim_quebec_v1` | stub — [follow-up issue](https://github.com/swimblocks/deck-eval-parser/issues) | | Alberta | `swim_alberta_v1` | stub | | British Columbia | `swim_bc_v1` | stub | -Other provinces: please [file an issue](https://github.com/gavinbee/canswim-deck-eval-parser/issues/new) with a sample PDF. +Other provinces: please [file an issue](https://github.com/swimblocks/deck-eval-parser/issues/new) with a sample PDF. ## Documentation diff --git a/docs/design/0001-initial-design.md b/docs/design/0001-initial-design.md index f2ecd0c..4cbc1b2 100644 --- a/docs/design/0001-initial-design.md +++ b/docs/design/0001-initial-design.md @@ -101,7 +101,7 @@ Ollama itself (the binary) is a runtime dependency the user must install once. A Linux: curl -fsSL https://ollama.com/install.sh | sh Or run the bundled installer: scripts/install.ps1 (Windows) scripts/install.sh (macOS/Linux) - Full guide: https://github.com/gavinbee/canswim-deck-eval-parser#installation + Full guide: https://github.com/swimblocks/deck-eval-parser#installation ``` 2. **Daemon running?** Probe `http://localhost:11434/api/tags`. If unreachable, spawn `ollama serve` as a subprocess via a context manager that wires up `atexit` + signal handlers to stop it on exit (clean shutdown via `Popen.terminate()` then `wait(timeout=5)` then `kill()`). If we started the daemon, we stop it. If the user already had it running, we leave it running. A small `OllamaDaemon` class in `src/ollama_runtime.py` encapsulates this. 3. **Models pulled?** Query `/api/tags`. For each required tag (`qwen2.5vl:7b`, and `qwen2.5:7b` only if `--interactive`/`--review-all`), if missing, `ollama pull ` with progress streamed to stderr. Behind `--no-auto-pull` (default off) the parser exits with instructions instead. diff --git a/docs/installation.md b/docs/installation.md index 9931b85..a76c8ff 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -2,7 +2,7 @@ The parser has two install steps: **Ollama** (the local model runtime) and the parser itself. Both are one-time. After that, the parser auto-manages the daemon and pulls models on first run. -> **Install scripts** (`scripts/install.ps1` / `install.sh`) that wrap all of this in one command are tracked under [issue #11](https://github.com/gavinbee/canswim-deck-eval-parser/issues/11). Until they land, follow the manual steps below. +> **Install scripts** (`scripts/install.ps1` / `install.sh`) that wrap all of this in one command are tracked under [issue #11](https://github.com/swimblocks/deck-eval-parser/issues/11). Until they land, follow the manual steps below. ## What you'll need @@ -62,7 +62,7 @@ ollama --version ## 2. Clone the repo + create a virtual environment ```bash -git clone https://github.com/gavinbee/canswim-deck-eval-parser.git +git clone https://github.com/swimblocks/deck-eval-parser.git cd canswim-deck-eval-parser python -m venv .venv ``` @@ -130,4 +130,4 @@ The parser uses `shutil.which("ollama")` to locate the binary. This honours `PAT PyMuPDF wheels are published for all major platforms — failures usually mean an outdated `pip`. Run `python -m pip install --upgrade pip` first. **Real scanned PDFs return `extraction failure — vision extraction not yet implemented`.** -Expected today. The vision path is tracked across issues [#6](https://github.com/gavinbee/canswim-deck-eval-parser/issues/6)–[#10](https://github.com/gavinbee/canswim-deck-eval-parser/issues/10). Fillable PDFs (e.g. `eval-gen` output, online form exports) parse end-to-end now. +Expected today. The vision path is tracked across issues [#6](https://github.com/swimblocks/deck-eval-parser/issues/6)–[#10](https://github.com/swimblocks/deck-eval-parser/issues/10). Fillable PDFs (e.g. `eval-gen` output, online form exports) parse end-to-end now. diff --git a/docs/templates/swim_ontario.md b/docs/templates/swim_ontario.md index 3e8548d..d475a42 100644 --- a/docs/templates/swim_ontario.md +++ b/docs/templates/swim_ontario.md @@ -4,7 +4,7 @@ Reference for the **Swim Ontario On-Deck Evaluation** template, as implemented i ## Source -The field labels and widget names in this template are sourced **verbatim** from [`eval-gen`](https://github.com/gavinbee/eval-gen)'s `_build_fields()`, which was reverse-engineered from the official Swim Ontario blank form (`eval-gen/eval_form.pdf`). Keeping this template in lockstep with `eval-gen` means any `eval-gen` output is parsable through the form-field fast path with no extra work. +The field labels and widget names in this template are sourced **verbatim** from [`eval-gen`](https://github.com/swimblocks/deck-eval-gen)'s `_build_fields()`, which was reverse-engineered from the official Swim Ontario blank form (`eval-gen/eval_form.pdf`). Keeping this template in lockstep with `eval-gen` means any `eval-gen` output is parsable through the form-field fast path with no extra work. ## Page properties diff --git a/docs/usage.md b/docs/usage.md index 6e7439a..da3f48d 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -16,15 +16,15 @@ Outputs land in `./output/` as `.json`, `.csv`, and `` | `output` | output directory (created if missing) | -| `--template ` | `swim_ontario_v1` | provincial template to parse against. Becomes "auto-detect" once template detection lands ([#9](https://github.com/gavinbee/canswim-deck-eval-parser/issues/9)) | +| `--template ` | `swim_ontario_v1` | provincial template to parse against. Becomes "auto-detect" once template detection lands ([#9](https://github.com/swimblocks/deck-eval-parser/issues/9)) | | `-v` / `-vv` | `WARNING` | verbosity. `-v` = `INFO`, `-vv` = `DEBUG` | -| `--vision-model ` | — | reserved for the vision path ([#8](https://github.com/gavinbee/canswim-deck-eval-parser/issues/8)) | -| `--edit-model ` | — | reserved for interactive edits ([#13](https://github.com/gavinbee/canswim-deck-eval-parser/issues/13)) | -| `--no-cache` | — | reserved for vision-path caching ([#8](https://github.com/gavinbee/canswim-deck-eval-parser/issues/8)) | -| `--no-auto-pull` | — | reserved for Ollama runtime ([#6](https://github.com/gavinbee/canswim-deck-eval-parser/issues/6)) | -| `--interactive` | — | reserved for interactive review ([#12](https://github.com/gavinbee/canswim-deck-eval-parser/issues/12)) | -| `--review-all` | — | reserved for walk-every-eval mode ([#14](https://github.com/gavinbee/canswim-deck-eval-parser/issues/14)) | -| `--low-confidence-threshold ` | — | reserved for interactive review ([#12](https://github.com/gavinbee/canswim-deck-eval-parser/issues/12)) | +| `--vision-model ` | — | reserved for the vision path ([#8](https://github.com/swimblocks/deck-eval-parser/issues/8)) | +| `--edit-model ` | — | reserved for interactive edits ([#13](https://github.com/swimblocks/deck-eval-parser/issues/13)) | +| `--no-cache` | — | reserved for vision-path caching ([#8](https://github.com/swimblocks/deck-eval-parser/issues/8)) | +| `--no-auto-pull` | — | reserved for Ollama runtime ([#6](https://github.com/swimblocks/deck-eval-parser/issues/6)) | +| `--interactive` | — | reserved for interactive review ([#12](https://github.com/swimblocks/deck-eval-parser/issues/12)) | +| `--review-all` | — | reserved for walk-every-eval mode ([#14](https://github.com/swimblocks/deck-eval-parser/issues/14)) | +| `--low-confidence-threshold ` | — | reserved for interactive review ([#12](https://github.com/swimblocks/deck-eval-parser/issues/12)) | ## Exit codes diff --git a/src/ollama_runtime.py b/src/ollama_runtime.py index 17426d4..9ee1886 100644 --- a/src/ollama_runtime.py +++ b/src/ollama_runtime.py @@ -111,7 +111,7 @@ def _install_hint() -> str: "Or run the bundled installer: scripts/install.ps1 (Windows)\n" " scripts/install.sh (other)\n" "Full guide: " - "https://github.com/gavinbee/canswim-deck-eval-parser/blob/main/docs/installation.md" + "https://github.com/swimblocks/deck-eval-parser/blob/main/docs/installation.md" ) diff --git a/tests/fixtures/form_field/make_synthetic_fixture.py b/tests/fixtures/form_field/make_synthetic_fixture.py index 13c09af..354061f 100644 --- a/tests/fixtures/form_field/make_synthetic_fixture.py +++ b/tests/fixtures/form_field/make_synthetic_fixture.py @@ -211,7 +211,7 @@ def _default_template_path() -> Path: return c raise FileNotFoundError( "Could not find eval-gen/eval_form.pdf. Either clone " - "https://github.com/gavinbee/eval-gen alongside this repo, or " + "https://github.com/swimblocks/deck-eval-gen alongside this repo, or " "pass --template /path/to/eval_form.pdf" )