Skip to content

add description to workouts#339

Open
miki134 wants to merge 1 commit intocyberjunky:masterfrom
miki134:workout-description
Open

add description to workouts#339
miki134 wants to merge 1 commit intocyberjunky:masterfrom
miki134:workout-description

Conversation

@miki134
Copy link

@miki134 miki134 commented Mar 22, 2026

Summary by CodeRabbit

  • New Features
    • Workouts now support optional descriptions to provide additional context and details about each workout session.
    • Sample workout data updated with descriptive summaries for each workout type.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 22, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 3ee2f0f9-a8f7-4edb-9217-f5d74c55a99f

📥 Commits

Reviewing files that changed from the base of the PR and between 418cc3d and e14bfeb.

📒 Files selected for processing (6)
  • garminconnect/workout.py
  • test_data/sample_cycling_workout.py
  • test_data/sample_hiking_workout.py
  • test_data/sample_running_workout.py
  • test_data/sample_swimming_workout.py
  • test_data/sample_walking_workout.py

Walkthrough

Added an optional description field to the BaseWorkout class and populated all sample workout data across test files with corresponding workout descriptions. The field is conditionally serialized when present.

Changes

Cohort / File(s) Summary
Core Model Schema
garminconnect/workout.py
Extended BaseWorkout with optional description: str | None = None field that serializes only when set to a non-None value.
Test Data Samples
test_data/sample_cycling_workout.py, test_data/sample_hiking_workout.py, test_data/sample_running_workout.py, test_data/sample_swimming_workout.py, test_data/sample_walking_workout.py
Added human-readable description field to each sample workout factory function's returned instance, detailing workout structure (warmup, intervals, recovery, cooldown components).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 3
✅ 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 'add description to workouts' directly and concisely describes the main change: adding a description field to the BaseWorkout model and sample workout implementations.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

Tip

CodeRabbit can scan for known vulnerabilities in your dependencies using OSV Scanner.

OSV Scanner will automatically detect and report security vulnerabilities in your project's dependencies. No additional configuration is required.

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