Skip to content

feat!: a trip's parts carry their own dates and place - #21

Merged
aleskiontherun merged 3 commits into
mainfrom
claude/py-1-trip-parts
Sep 20, 2026
Merged

aleskiontherun merged 3 commits into
mainfrom
claude/py-1-trip-parts

Conversation

@aleskiontherun

@aleskiontherun aleskiontherun commented Sep 20, 2026

Copy link
Copy Markdown
Member

SPEC_REF pins the specification's merged trip-parts commit and schema/, fixtures/ and docs/ are vendored from it byte-for-byte, so a trip is a sequence of §6.9a parts — each with its own optional starts_on, ends_on and nested location — rather than one span beside a flat list of places. The UDDF reader returns a part per <trippart> instead of collapsing the file's dates into min/max, no longer drops a trip for want of a starts_on, keeps the dates of a <trippart> whose <geography> has no <name>, and reads a <trippart> carrying neither a name nor a date as no part at all — which is what lets the writer's mandatory floor element round-trip a partless trip exactly. Where a <trippart> is both of those at once the whole part goes, and the finding says so rather than reporting that the part survived. The writer emits one <trippart> per part with its own <dateoftrip>, omitting that element where a part has neither date and writing a single date into both of its required attributes where it has one. §3's ends_on ≥ starts_on and the bounding-box check move onto trips[].parts[], reporting at trips/<i>/parts/<j> and trips/<i>/parts/<j>/location/bbox.

Verified with pytest on Python 3.10 and 3.14, divejson conform fixtures --strict, the wheel-from-sdist build with its installed-schema check, and a local replay of CI's byte-equality and ancestor checks against the pinned specification commit; .github/scripts/release_bump.py derives 0.9.0 from this branch.

🤖 Generated with Claude Code

aleskiontherun and others added 2 commits September 20, 2026 14:03
SPEC_REF moves to spec-1's branch head and schema/, fixtures/ and docs/
are re-vendored from it. The UDDF reader returns a part per <trippart>
instead of a span and a flat location list, the writer emits one
<trippart> per part with its own <dateoftrip>, and §3's date-order rule
and the bounding-box check move onto trips[].parts[].

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
A <trippart> with a <geography>, no <name> and no <dateoftrip> produces
no part, so the report has to say that rather than that the part kept
dates it never had. Renames the trips helper the new tests share, whose
callers bound it to `parts`.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The specification's trip-parts change is on its main, so the pin moves
off the branch head and onto the squash, and docs/uddf-mapping.md is
re-vendored with it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@aleskiontherun
aleskiontherun marked this pull request as ready for review September 20, 2026 11:29
@aleskiontherun
aleskiontherun merged commit bf6aaaa into main Sep 20, 2026
7 checks passed
@aleskiontherun
aleskiontherun deleted the claude/py-1-trip-parts branch September 20, 2026 11:30
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.

1 participant