Skip to content

Implement querying daily lifestyle logging data#304

Merged
cyberjunky merged 1 commit intocyberjunky:masterfrom
fulopm:master
Nov 28, 2025
Merged

Implement querying daily lifestyle logging data#304
cyberjunky merged 1 commit intocyberjunky:masterfrom
fulopm:master

Conversation

@fulopm
Copy link
Contributor

@fulopm fulopm commented Nov 16, 2025

This PR implements querying lifestyle logging service to get daily lifestyle logging data, this is the initial commit to implement #291

Summary by CodeRabbit

Release Notes

  • New Features
    • Added daily lifestyle logging data retrieval functionality, enabling users to fetch and access lifestyle logging information for specified dates via the API.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 16, 2025

Walkthrough

Added support for fetching daily lifestyle logging data from the Garmin Connect API. The implementation introduces a new get_lifestyle_logging_data method to the Garmin class and updates the demo application to expose this functionality through the Daily Health & Activity menu.

Changes

Cohort / File(s) Summary
API endpoint support
garminconnect/__init__.py
Added new instance attribute garmin_connect_daily_lifestyle_logging_url and public method get_lifestyle_logging_data(cdate: str) that validates date format, constructs URL, logs request, and executes API call
Demo menu integration
demo.py
Added new menu entry in Daily Health & Activity category to call get_lifestyle_logging_data and mapped API execution dispatch for the new endpoint with descriptive label

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

  • New method follows established patterns used by existing data-fetch methods in the codebase
  • Date validation and URL construction are straightforward and consistent with existing implementations
  • Menu additions in demo are mechanical integrations
  • Limited scope with clear, single-purpose changes in two files

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Implement querying daily lifestyle logging data' directly and specifically describes the main change: adding support to query daily lifestyle logging data through a new API method.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Tip

📝 Customizable high-level summaries are now available!

You can now customize how CodeRabbit generates the high-level summary in your pull requests — including its content, structure, tone, and formatting.

  • Provide custom instructions to shape the summary (bullet lists, tables, contributor stats, etc.).
  • Use high_level_summary_in_walkthrough to move the summary from the description to the walkthrough section.

Example:

"Create a concise high-level summary as a bullet-point list. Then include a Markdown table showing lines added and removed by each contributing author."


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@fulopm fulopm changed the title Implement daily lifestyle logging data Implement querying daily lifestyle logging data Nov 16, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ce83437 and 2991759.

📒 Files selected for processing (2)
  • demo.py (2 hunks)
  • garminconnect/__init__.py (2 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
garminconnect/**

⚙️ CodeRabbit configuration file

garminconnect/**: - prefer modern Python patterns (3.10+)

  • use type hints consistently
  • follow PEP 8 and modern Python conventions
  • suggest performance improvements where applicable

Files:

  • garminconnect/__init__.py
🧬 Code graph analysis (1)
demo.py (1)
garminconnect/__init__.py (1)
  • get_lifestyle_logging_data (1307-1314)
🔇 Additional comments (3)
demo.py (2)

156-159: Menu option wiring looks good

New option is consistent with existing style and numbering; text and key align with the dispatch mapping.


3236-3241: Dispatch mapping correctly added

Executes api.get_lifestyle_logging_data for today via call_and_display with clear labels. No issues spotted.

garminconnect/__init__.py (1)

280-283: New endpoint constant fits naming/placement conventions

Consistent with other URL attributes. No further changes needed.

@cyberjunky
Copy link
Owner

Thanks for this nice addition!

@cyberjunky cyberjunky merged commit 422c53b into cyberjunky:master Nov 28, 2025
1 check 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.

2 participants