improve configs, update docs
This commit is contained in:
@@ -2,6 +2,33 @@
|
||||
|
||||
## [Unreleased] — 2026-03-30
|
||||
|
||||
### Data ingestion
|
||||
|
||||
- **`bincio import strava`** — OAuth2 Strava importer (`bincio/import_/strava.py` + `bincio/import_/cli.py`)
|
||||
- One-shot local OAuth2 callback server (port 8976); opens browser, receives code, exchanges for tokens
|
||||
- Tokens saved to `~/.config/bincio/strava.json`; auto-refreshed on expiry (6h TTL)
|
||||
- Fetches paginated activity list with `after=` timestamp for efficient incremental runs
|
||||
- Per activity: `GET /activities/{id}/streams` → `_strava_to_parsed()` → `compute()` → `write_activity()`
|
||||
- `_patch_from_summary()`: fills `None` metrics from Strava summary when sensors are missing (manual entries, indoor rides)
|
||||
- Sync state persisted in `data_dir/_strava_sync.json` (imported IDs + last sync timestamp)
|
||||
- Rate limit tracking via `X-RateLimit-Usage`; warns at 85% of 15-min window; auto-retries on 429
|
||||
- Credentials read from (in order): CLI flags → env vars → `extract_config.yaml` under `import.strava`
|
||||
- Install: `uv sync --extra strava`
|
||||
|
||||
- **Web file upload** — `POST /api/upload` in `bincio/edit/server.py`
|
||||
- Accepts FIT/GPX/TCX (`.gz` variants too); 409 if activity already exists
|
||||
- Runs full extract pipeline inline: `parse_file()` → `compute()` → `write_activity()` → `merge_all()`
|
||||
- Staged to `data_dir/_uploads/` during processing; cleaned up in `finally`
|
||||
- `↑` button in site nav, gated behind `PUBLIC_EDIT_URL`; drag-and-drop modal; auto-redirects on success
|
||||
|
||||
- **`extract_config.yaml` is now gitignored** — safe to store credentials under `import.strava`
|
||||
- `StravaConfig` dataclass added to `bincio/extract/config.py`; parsed from `import.strava:` block
|
||||
- `extract_config.example.yaml` is the tracked template
|
||||
|
||||
- **Theme-aware heatmap** (`StatsView.svelte`) — `applyIntensity()` now lerps from the correct
|
||||
background colour in both dark (zinc-800 `#27272a`) and light (zinc-200 `#e4e4e7`) modes;
|
||||
`emptyColor` and `baseRgb` reactive to `data-theme` via `MutationObserver`
|
||||
|
||||
### Athlete page
|
||||
|
||||
- **`/athlete` page** — three-tab layout: Power Curve · Records · Profile
|
||||
|
||||
Reference in New Issue
Block a user