Skip to content

add -hrv parameters to fetch HRV data#29

Merged
veerendra2 merged 3 commits intoveerendra2:mainfrom
eskimokk:main
Apr 3, 2026
Merged

add -hrv parameters to fetch HRV data#29
veerendra2 merged 3 commits intoveerendra2:mainfrom
eskimokk:main

Conversation

@eskimokk
Copy link
Copy Markdown
Contributor

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds HRV (Heart Rate Variability) support to fitbit-cli, enabling users to fetch and display HRV summary data from the Fitbit Web API in table, JSON, and raw-JSON output modes.

Changes:

  • Introduces a new --hrv [DATE[,DATE]|RELATIVE] CLI flag wired through all output modes.
  • Adds Fitbit API client support for HRV summary fetching.
  • Adds an HRV formatter and CLI parsing tests, plus accompanying design/plan docs.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tests/cli_test.py Adds parsing tests covering --hrv alone, with JSON/raw-JSON, and with several date formats.
fitbit_cli/output.py Plumbs args.hrv into table_display, json_display, and raw_json_display.
fitbit_cli/formatter.py Adds display_hrv() to render HRV data as a rich table or snake_case JSON structure.
fitbit_cli/fitbit_api.py Adds get_hrv_summary() (and an intraday variant) to call the HRV endpoint(s).
fitbit_cli/cli.py Adds the --hrv flag using the shared parse_date_range mechanism and default-to-today behavior.
docs/superpowers/specs/2026-03-31-hrv-support-design.md Design doc describing endpoints, response shape, and implementation approach.
docs/superpowers/plans/2026-03-31-hrv-support.md Step-by-step implementation plan for adding HRV support.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@veerendra2
Copy link
Copy Markdown
Owner

veerendra2 commented Apr 1, 2026

Hi @eskimokk, thanks for the PR. One small request — could you please remove the docs/superpowers/ directory (plans/ and specs/ files) from this PR? as those are AI agent planning artifacts and not required be included in the repository.

Meanwhile, I will create another PR to fix the Pytest pipline

EDIT

Copy link
Copy Markdown
Owner

@veerendra2 veerendra2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally. LGTM

@veerendra2
Copy link
Copy Markdown
Owner

@eskimokk Feel free to merge, when are you ready

@eskimokk
Copy link
Copy Markdown
Contributor Author

eskimokk commented Apr 3, 2026

@eskimokk Feel free to merge, when are you ready

please merge

@veerendra2 veerendra2 merged commit 5fd88fc into veerendra2:main Apr 3, 2026
1 of 2 checks passed
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.

3 participants