Skip to content

Add Activity.update() method for renaming activities#174

Merged
matin merged 4 commits intomainfrom
add-activity-update
Jan 12, 2026
Merged

Add Activity.update() method for renaming activities#174
matin merged 4 commits intomainfrom
add-activity-update

Conversation

@matin
Copy link
Copy Markdown
Owner

@matin matin commented Jan 12, 2026

Summary

  • Adds Activity.update() class method to update activity name and/or description
  • Uses PUT /activity-service/activity/{activity_id} endpoint
  • Validates that at least one of name or description is provided

Closes #88

Usage

# Rename an activity
Activity.update(12345678901, name="Morning Run")

# Update description
Activity.update(12345678901, description="Great weather!")

# Update both
Activity.update(12345678901, name="Morning Run", description="5K")

Test plan

  • Added validation test (raises ValueError if neither name nor description provided)
  • Added integration test with VCR cassette
  • All 122 tests pass

🤖 Generated with Claude Code

Adds class method to update activity name and/or description via PUT
request to /activity-service/activity/{activity_id}.

Closes #88

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jan 12, 2026

Warning

Rate limit exceeded

@matin has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 6 minutes and 2 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between d1bd012 and 4b0695c.

⛔ Files ignored due to path filters (3)
  • tests/data/cassettes/test_activity_update[both].yaml is excluded by !tests/**/cassettes/**
  • tests/data/cassettes/test_activity_update[description_only].yaml is excluded by !tests/**/cassettes/**
  • tests/data/cassettes/test_activity_update[name_only].yaml is excluded by !tests/**/cassettes/**
📒 Files selected for processing (3)
  • docs/api/data.md
  • src/garth/data/activity.py
  • tests/data/test_activity.py
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch add-activity-update

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.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@codecov
Copy link
Copy Markdown

codecov Bot commented Jan 12, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (d1bd012) to head (4b0695c).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #174   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           66        66           
  Lines         3020      3044   +24     
=========================================
+ Hits          3020      3044   +24     
Flag Coverage Δ
unittests 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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.

matin and others added 2 commits January 12, 2026 15:24
Tests all three cases:
- name only
- description only
- both name and description

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Document get() with full response structure
- Document list() with pagination examples
- Document update() with all use cases
- Add tips and notes for common patterns

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@matin matin merged commit cd02e1a into main Jan 12, 2026
26 checks passed
@matin matin deleted the add-activity-update branch January 12, 2026 21:34
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.

Renaming activities?

1 participant