Skip to content

Export weekly training summaries as CSV and JSON #49

Closed

Description

@johnnyhuy

Part of #6.

WeeklyTrainingSummary already aggregates parsed workouts into calendar weeks, but the pipeline only exposes CSV and JSON export for daily health summaries. Add equivalent exports for weekly training summaries so product experiments can consume weekly training totals without custom serialisation.

  • Add deterministic CSV and JSON export for [WeeklyTrainingSummary], following the existing daily export API.
  • Include week start, workout count, duration in seconds, active energy in kilocalories, distance in metres, heart-rate summaries, and per-activity counts.
  • Keep missing metrics distinct from measured zero, and preserve activity names safely in CSV.
  • Test empty and missing data, round trips, ordering and escaping, and an XML parser-to-export flow.
  • Keep the implementation in the UI-independent Swift package. No app UI changes.

Verify with mise run lint, mise run build, and mise run test. Attach the test transcript to the pull request. Leave the parent epic open.

Activity

  1. johnnyhuy commented on Nov 13, 2026

    @johnnyhuy
    ContributorAuthor

    agent claim: agent/issue-49-weekly-training-export @ f71a296

  2. johnnyhuy commented on Nov 13, 2026

    @johnnyhuy
    ContributorAuthor

    agent claim: agent/issue-49-weekly-training-export @ 19d9db4. Continuing PR #50 in a fresh worktree and investigating its failed UI coverage check.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agentclaimed by the BetterFit work loop

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions