Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand All @@ -24,18 +24,18 @@ python main.py path/to/eval.pdf

Output lands in `output/` as `<pdf-stem>.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

Expand Down
2 changes: 1 addition & 1 deletion docs/design/0001-initial-design.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <tag>` with progress streamed to stderr. Behind `--no-auto-pull` (default off) the parser exits with instructions instead.
Expand Down
6 changes: 3 additions & 3 deletions docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
```
Expand Down Expand Up @@ -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.
2 changes: 1 addition & 1 deletion docs/templates/swim_ontario.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
16 changes: 8 additions & 8 deletions docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ Outputs land in `./output/` as `<pdf-stem>.json`, `<pdf-stem>.csv`, and `<pdf-st
|---|---|---|
| *(positional)* `pdf` | required | the input PDF |
| `--output-dir <DIR>` | `output` | output directory (created if missing) |
| `--template <ID>` | `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 <ID>` | `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 <TAG>` | — | reserved for the vision path ([#8](https://github.com/gavinbee/canswim-deck-eval-parser/issues/8)) |
| `--edit-model <TAG>` | — | 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 <FLOAT>` | — | reserved for interactive review ([#12](https://github.com/gavinbee/canswim-deck-eval-parser/issues/12)) |
| `--vision-model <TAG>` | — | reserved for the vision path ([#8](https://github.com/swimblocks/deck-eval-parser/issues/8)) |
| `--edit-model <TAG>` | — | 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 <FLOAT>` | — | reserved for interactive review ([#12](https://github.com/swimblocks/deck-eval-parser/issues/12)) |

## Exit codes

Expand Down
2 changes: 1 addition & 1 deletion src/ollama_runtime.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)


Expand Down
2 changes: 1 addition & 1 deletion tests/fixtures/form_field/make_synthetic_fixture.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down
Loading