Skip to content

Read Activity fields directly in summarize_archive.py - #39

Merged
tabishm52 merged 1 commit into
mainfrom
summarize-archive-uses-activity-directly
Sep 5, 2026
Merged

tabishm52 merged 1 commit into
mainfrom
summarize-archive-uses-activity-directly

Conversation

@tabishm52

@tabishm52 tabishm52 commented Sep 5, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • summarize_activity returns the parsed Activity directly instead of a near-duplicate ActivitySummary dataclass
  • TCX/GPX now populate total_elapsed_time/total_distance themselves, so the script's hand-rolled derivation from records is gone
  • Per-sport rollup gains total_ascent, avg_power, and avg_heart_rate; every sum() uses min_count=1 so an all-None sport group reports NaN instead of 0.0

Test plan

  • uv run pytest (195 passed)
  • uv run ruff check / uv run ruff format --check
  • uv run pyright
  • uv run pre-commit run --all-files
  • Ran summarize_archive.py against a real ~1200-file Strava archive

TCX/GPX now populate total_elapsed_time/total_distance, so the script
no longer re-derives them from records. summarize_activity returns
Activity directly instead of a near-duplicate ActivitySummary, and the
per-sport rollup gains total_ascent, avg_power, and avg_heart_rate.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@tabishm52
tabishm52 merged commit d9acf76 into main Sep 5, 2026
4 checks passed
@tabishm52
tabishm52 deleted the summarize-archive-uses-activity-directly branch September 5, 2026 19:13
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