Skip to content

Resort data model with stable UUID resort IDs (Issue #55)#84

Merged
jonathanstelman merged 2 commits intomainfrom
feature/55-resort-data-model
Mar 15, 2026
Merged

Resort data model with stable UUID resort IDs (Issue #55)#84
jonathanstelman merged 2 commits intomainfrom
feature/55-resort-data-model

Conversation

@jonathanstelman
Copy link
Copy Markdown
Owner

Summary

  • data/resorts.csv: adds resort_id (UUID v4) as first column, drops legacy index column
  • data/resort_id_map.csv: new mapping file (resort_id, source, source_id) for stable IDs across pipeline runs
  • pipeline/generate_resort_ids.py: one-time migration script used to populate the map and update the CSV
  • pipeline/prep_resort_data.py: assign_resort_ids() looks up existing UUIDs from the map, generates new ones only for new resorts
  • app.py: removes index_col='index' (column no longer exists)
  • backend/models.py: Pydantic Resort model covering all columns in resorts.csv
  • backend/data.py: load_resorts() reads resorts.csv into list[Resort]
  • backend/tests/test_resort_model.py: verifies all 271 rows load cleanly and UUIDs are unique

Notes

  • Field-level data validation (range constraints, URL validation) is deferred to Issue Add data validation to Resort Pydantic model #83
  • The index column was pandas row numbers with no semantic meaning — resort_id is now the true primary key in both the CSV and (eventually) Postgres

Test plan

  • All 271 resorts load without Pydantic validation errors
  • resort_id values are unique across all rows
  • Re-running generate_resort_ids.py preserves existing UUIDs
  • Pipeline tests (17) pass
  • Backend tests (4) pass
  • Black formatting clean
  • CI green (all 3 jobs)

Closes #55

🤖 Generated with Claude Code

jonathanstelman and others added 2 commits March 15, 2026 19:00
- Add resort_id (UUID v4) as first column in data/resorts.csv; drop legacy index column
- Add data/resort_id_map.csv (source → UUID mapping) for stable IDs across pipeline runs
- pipeline/generate_resort_ids.py: one-time migration script that populated the map
- pipeline/prep_resort_data.py: assign_resort_ids() looks up existing UUIDs, generates new ones for new resorts
- app.py: remove index_col='index' (no longer needed)
- backend/models.py: Pydantic Resort model covering all resorts.csv columns
- backend/data.py: load_resorts() reads resorts.csv into list[Resort]
- backend/tests/test_resort_model.py: verifies all rows load cleanly and IDs are unique

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Vite's dependency cache directory was showing as untracked.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@jonathanstelman jonathanstelman merged commit 9f4bcb2 into main Mar 15, 2026
6 checks passed
@jonathanstelman jonathanstelman deleted the feature/55-resort-data-model branch March 15, 2026 23:07
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.

Resort data model

1 participant