Add Claude Haiku baseline

Port the display reader from the web server's rowing module as a second
extraction method: send the whole photo to claude-haiku-4-5 and ask for
elapsed time and distance as JSON. The prompt, model and reply parsing
are unchanged; what is new is reading from a file, converting the reply
to WorkoutStats so both methods produce the same rows, and accepting
ANTHROPIC_API_KEY as well as CLAUDE_API_KEY.

Select it with 'rowing-stats --method haiku'. The anthropic SDK is an
optional extra, imported only when the baseline is used, so the OCR
pipeline still installs and runs without it or an API key.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
2026-10-09 11:49:13 +01:00
co-authored by Claude Opus 5.5
parent 685ee9bf3d
commit e2330c6f77
9 changed files with 443 additions and 10 deletions
+1 -1
View File
@@ -1,2 +1,2 @@
-r requirements.txt
-r requirements-baseline.txt
pytest==9.1.0