Use --dist=worksteal to speed up tests + move -n auto to config to make it default#145
Use --dist=worksteal to speed up tests + move -n auto to config to make it default#145
--dist=worksteal to speed up tests + move -n auto to config to make it default#145Conversation
…o make it default
|
ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (8)
💤 Files with no reviewable changes (1)
✅ Files skipped from review due to trivial changes (4)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughPyproject.toml adds pytest-xdist defaults; justfile and CI recipes remove or override parallel pytest flags to run most suites serially and run benchmarks/snapshot-updates with explicit -n0; documentation and a claude workflow were updated/removed to match. ChangesTest Execution and Coverage Configuration
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 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: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@justfile`:
- Around line 8-10: The comment on the justfile "test" target is wrong because
the pytest marker expression in the test recipe (uv run pytest -m "not (tui or
browser or benchmark)" -v) still allows integration tests; either adjust the
comment to say integration is included, or change the marker to exclude
integration as well (update the -m expression to "not (tui or browser or
integration or benchmark)") so the test target truly runs only unit tests; edit
the justfile test recipe accordingly.
In `@pyproject.toml`:
- Around line 49-53: The comment next to the addopts = "-n auto
--dist=worksteal" line should be updated to document the pdb workaround: note
that if developers run pytest -n0 --pdb they must also pass --dist=no because
the configured --dist=worksteal in addopts triggers pytest-xdist's "--pdb is
incompatible with distributing tests" guard; update the comment by adding one
sentence explaining to explicitly include "--dist=no" when using "-n0 --pdb" so
the debugger can run.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
Got horrified by 46 minutes long tests on Windows with Python 3.10 in CI, so got Claude to try a bunch of different ways to optimise the run time and
--dist=workstealseemed to be the one that made a big difference without a lot of effort.Before
After
Summary by CodeRabbit
Chores
Documentation