Skip to content

feat: add --since/--until date filters to workouts list#18

Merged
marinsalinas merged 1 commit into
mainfrom
feat/workouts-date-filter
May 8, 2026
Merged

feat: add --since/--until date filters to workouts list#18
marinsalinas merged 1 commit into
mainfrom
feat/workouts-date-filter

Conversation

@marinsalinas
Copy link
Copy Markdown
Owner

@marinsalinas marinsalinas commented May 8, 2026

Summary

  • Adds --since / --until to hevy workouts list. Both accept YYYY-MM-DD, both inclusive on the date portion.
  • Filtering is client-side — the Hevy /v1/workouts endpoint has no native date params (only /v1/workouts/events does). Applied in both --all (generator) and paginated branches against Workout.start_time.
  • Updates the bundled Claude Code skill so the agent knows about the new flags and rewrites the "this week's workouts" example to push filtering into the CLI rather than jq.

Test plan

  • make format clean
  • make lint / mypy clean (pre-commit hooks confirmed)
  • 4 new tests pass: --since excludes older, --until excludes newer, range narrows to one workout, invalid date rejected by BadParameter
  • Existing test suite still passes (one pre-existing local-env failure for test_workouts_list_no_api_key due to XDG config leakage — unrelated, separate issue)
  • Manual smoke against real account: hevy workouts list --since 2026-05-01 --format json

@codecov
Copy link
Copy Markdown

codecov Bot commented May 8, 2026

Codecov Report

❌ Patch coverage is 95.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 82.28%. Comparing base (a11b8e3) to head (16721b8).

Files with missing lines Patch % Lines
src/hevy_cli/commands/workouts.py 95.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #18      +/-   ##
==========================================
+ Coverage   82.02%   82.28%   +0.26%     
==========================================
  Files          14       14              
  Lines        1157     1174      +17     
  Branches      112      115       +3     
==========================================
+ Hits          949      966      +17     
  Misses        176      176              
  Partials       32       32              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Both flags accept YYYY-MM-DD and are inclusive on the date portion.
Filtering is client-side (Hevy /v1/workouts has no native date params),
applied in both --all and paginated branches against Workout.start_time.

Updates the Claude Code skill to surface the new flags and rewrites the
"this week's workouts" example to push filtering into the CLI rather
than jq.
@marinsalinas marinsalinas force-pushed the feat/workouts-date-filter branch from ab65593 to 16721b8 Compare May 8, 2026 03:24
@marinsalinas marinsalinas merged commit c25254f into main May 8, 2026
11 checks passed
@marinsalinas marinsalinas deleted the feat/workouts-date-filter branch May 8, 2026 03:27
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