Skip to content

feat!: DSV swim-meet file parser - #1

Merged
nilskntl merged 1 commit into
mainfrom
feature/let-there-be-everything
Aug 26, 2026
Merged

nilskntl merged 1 commit into
mainfrom
feature/let-there-be-everything

Conversation

@nilskntl

Copy link
Copy Markdown
Owner

Initial implementation: a standalone parser for DSV swim-meet files (.dsv5–.dsv8, .dsv8z) into a Pydantic schema, exposed as a library, a CLI and an optional FastAPI service.

Design

  • One declarative element table (spec/elements.py): every element is an ElementSpec with its attributes in file order; version and Listart deltas are versions=/file_types= markers, not branches. Transcribed from the official Format 6/7/8 documents; Format 5 derived from the Format 6 change log.
  • Four-stage reader (core/): decoding (ZIP, encoding sniffing) → lexer → binder → parser. The reader never raises on file content — bad values become None plus a Diagnostic.
  • Swim times as integer milliseconds, enums as speaking values, no database, no state.

Included

  • dsv-parser CLI (parse, check, spec) and FastAPI service as an optional extra
  • Docker/compose setup, CI, release-please, docs under docs/
  • 157 tests on synthetic fixtures (~98% coverage); validated against nine real EasyWk files in Format 6/7 with zero errors and warnings
  • Fixes from a first self-review round: overflow/encrypted-zip handling, strict swim-time validation, future-version clamping, U+2028-safe line splitting, duplicate-FORMAT diagnostic

🤖 Generated with Claude Code

https://claude.ai/code/session_01SV14g59Zd2sS1UGZxJVfhB

@nilskntl
nilskntl merged commit f05a80b into main Aug 26, 2026
3 checks passed
@nilskntl
nilskntl deleted the feature/let-there-be-everything branch August 26, 2026 12:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants