Skip to content

test: add pytest coverage for practice session recording and stats - #11

Merged
OmikronApex merged 1 commit into
mainfrom
chore/add-basic-tests
Jul 8, 2026
Merged

test: add pytest coverage for practice session recording and stats#11
OmikronApex merged 1 commit into
mainfrom
chore/add-basic-tests

Conversation

@OmikronApex

Copy link
Copy Markdown
Contributor

Twenty-second repo from the org test-coverage audit.

12 pytest tests over routes.py (FastAPI TestClient):

  • /session: missing-filename error, sub-5-second sessions skipped (not persisted), valid sessions appear in stats
  • /stats: empty-database shape, today/week time windows via explicit started_at timestamps, top-songs ordered by total practice time (with per-song session counts), unique-song counting, recent list ordered newest-first, 30-day daily grouping excludes older sessions
  • /song/{filename}: empty history for an unknown song, total-time + session-count aggregation, chronological speed-progression ordering vs. newest-first session ordering, loops_used JSON decoding

🤖 Generated with Claude Code

Covers session validation (missing filename, sub-5s skip), aggregate
stats (today/week windows, top-songs ordering, unique-song counting,
recent capped+ordered, 30-day daily grouping), and per-song history
(aggregation, chronological speed progression, loops_used decoding).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 8, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@OmikronApex, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 1 minute

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 22a59cce-e57f-47c6-ab1e-559edf15846b

📥 Commits

Reviewing files that changed from the base of the PR and between e2fa462 and cfb66de.

📒 Files selected for processing (2)
  • tests/conftest.py
  • tests/test_sessions_and_stats.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/add-basic-tests

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

@OmikronApex
OmikronApex merged commit ce51819 into main Jul 8, 2026
3 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.

1 participant