Add Python 3.14 support and improve coverage#6
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6 +/- ##
==========================================
+ Coverage 95.34% 96.40% +1.05%
==========================================
Files 11 11
Lines 473 473
==========================================
+ Hits 451 456 +5
+ Misses 22 17 -5
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
✅ Files skipped from review due to trivial changes (1)
📝 WalkthroughWalkthroughExpanded CI/testing to include Python 3.14, added Codecov status configuration, updated packaging/pytest metadata, bumped a pre-commit hook, and added several new tests (integration and state unit tests); README badge updated to show Python 3.12–3.14. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
tests/integration/test_talk_polls.py (1)
373-376: Avoid order-coupled assertion on voter details.At Line 376, indexing
details[0]assumes stable ordering. This can make the test flaky if the API returns the same entries in a different order.Suggested test hardening
- assert poll["details"][0]["actorId"] == "admin" + assert any(d.get("actorId") == "admin" for d in poll["details"])🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@tests/integration/test_talk_polls.py` around lines 373 - 376, The test currently assumes a stable order by asserting poll["details"][0]["actorId"] == "admin"; change this to a order-agnostic check by verifying that poll contains a "details" list and that at least one element in poll["details"] has actorId == "admin" (e.g., replace the index-based assertion with an any(...) style check over poll["details"]). This targets the assertions around poll and its "details" list to avoid flakiness when ordering changes.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/tests-unit.yml:
- Line 15: The package classifiers in pyproject.toml are missing Python 3.14
even though CI runs tests on 3.14; update the "classifiers" list in
pyproject.toml (the "Programming Language :: Python ::" entries) to include
"Programming Language :: Python :: 3.14" alongside the existing 3.12 and 3.13
entries so the declared supported Python versions match the CI-tested versions.
---
Nitpick comments:
In `@tests/integration/test_talk_polls.py`:
- Around line 373-376: The test currently assumes a stable order by asserting
poll["details"][0]["actorId"] == "admin"; change this to a order-agnostic check
by verifying that poll contains a "details" list and that at least one element
in poll["details"] has actorId == "admin" (e.g., replace the index-based
assertion with an any(...) style check over poll["details"]). This targets the
assertions around poll and its "details" list to avoid flakiness when ordering
changes.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: b88b42e5-c760-4e83-8a1c-7bfdaa4123bc
📒 Files selected for processing (6)
.github/workflows/tests-unit.ymlREADME.mdcodecov.ymltests/integration/test_server.pytests/integration/test_talk_polls.pytests/test_state.py
Summary
Test plan
Summary by CodeRabbit
Documentation
Chores
Tests