aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md17
1 files changed, 13 insertions, 4 deletions
diff --git a/README.md b/README.md
index 3491395..69206ad 100644
--- a/README.md
+++ b/README.md
@@ -27,7 +27,7 @@ mise run build
mise run dev-watch # Start the web server on http://localhost:8080
go run . fetch-osm # Download the France OSM PBF (resumable)
go run . extract-osm france-latest.osm.pbf # Extract mountain passes from a France OSM PBF
-go run . backfill # Recompute and persist all ride computed values
+go run . backfill # Recompute ride values and official climb attempts for every stored ride
go run . backtest # Benchmark computed vs stored ride values
go run . -- -pprof # Expose pprof endpoints at `/debug/pprof`
docker compose up -d pyroscope # Start the local Pyroscope server on http://localhost:4040
@@ -65,13 +65,14 @@ An OSM way is an ordered list of nodes; its `highway` tag describes the road typ
- `geo` — coordinate distance, nearest-point, and shared `Interval` primitives; dependency-free
- `climb` — climb detection and scoring. A `Route` is the geometry-only trace (distances, elevations, coords), and `Detect` returns `[]DetectedClimb` (a climb plus its ride-relative start index). Provides slope and Cotacol difficulty scoring. Deliberately decoupled from `ride`
- `ride` — GPX parsing and the ride value (embeds `climb.Route` for geometry, adding timestamps and telemetry), moving-time metrics, and SQLite persistence for imported ride metadata and versioned computed values
-- `official_climb` — matches official climbs against a route by endpoint coordinates
+- `official_climb` — matches official climbs against a route by endpoint coordinates and the recorded sample of the segment the climb was created from: a candidate passage outside ±50% of that sample's length or elevation gain is not the climb
- `mountain_pass` — OSM PBF extraction (`mountain_pass=yes` / `natural=mountain_pass` nodes), pass storage and querying, and crossings/climb matching on `climb.Climb`
-- `rideanalysis` — orchestrates a ride into analyzed climbs and mountain-pass crossings
+- `rideanalysis` — orchestrates a ride into analyzed climbs and mountain-pass crossings, and snapshots its official-climb attempts
- `strava` — OAuth2 client returning activity metadata and GPX data
- `config` — typed YAML configuration and atomic persistence
- `web` — HTTP server, OAuth callback, sync orchestration, and templ pages
-- `cli` — command handlers for data import, backfill, and benchmarking
+- `backfill` — recomputes the data derived from stored rides: ride values first, then official climb attempts. The migration tool behind `go run . backfill`
+- `cli` — command entry points: `main.go` dispatches, and command bodies live with the packages they drive (`ride` import/benchmarks, `backfill`, `mountain_pass` OSM)
- test builders `internal/routetest`, `internal/ridetest`, `internal/dbtest`
```mermaid
@@ -80,6 +81,7 @@ flowchart TB
main["main (bootstrap: main.go)"]
cli["cli (import, backfill, benchmark)"]
+ backfill["backfill (ride values, climb attempts)"]
web["web (HTTP + templ, sync)"]
rideanalysis["rideanalysis (climbs + crossings)"]
ride["ride (GPX parsing, Ride value, metrics, persistence)"]
@@ -96,6 +98,13 @@ flowchart TB
cli --> ride
cli --> mpass
cli --> config
+ cli --> backfill
+
+ backfill --> ride
+ backfill --> rideanalysis
+ backfill --> official_climb
+ backfill --> mpass
+ backfill --> config
web --> rideanalysis
web --> strava