Repository navigation
chore: lint the whole repository — ruff check . in CI (#54) - #126
Conversation
CI linted only src/tests; repo-wide ruff had 368 errors. Now zero: - notebooks: import sorting + PLR0402 alias fix (ruff --fix; the ipynb rewrite also normalized cell ids and unicode escapes — content unchanged, all notebooks still valid JSON) - benchmarks: wrapped genuinely long code lines (bench.py, harness_metrics.py, results_schema.py); fixed RET504/E741/F841/PLE0604 (dead gold-labels block in harness_metrics removed; __all__ now literal and verified against REGISTRY keys); per-file-ignores extended with the established conventions: PLC0415 for all of benchmarks/ (lazy optional-dep imports are the point), E501 for fixtures/ (defect tables read as one row per line), PLR0915 for the two linear builder/orchestration functions - freshdata-benchmarks/: excluded via extend-exclude — ASV-managed sub-project with tool-generated layout and per-machine result artifacts, not shipped, not held to the package lint bar - CI: ci.yml + release.yml lint steps widened to 'ruff check .' No runtime behavior changes; full gate green, coverage 93.55%.
Strix Security ReviewNo security issues found. Updated for Reviewed by Strix |
|
Warning Review limit reached
Next review available in: 5 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the 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 configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (21)
✨ 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 |
FreshData benchmark report —
|
| fixture | n_rows | n_cols | p50 s | p95 s | peak MB | repair % | false-repair % | preserve % | trust | monotonic | export % |
|---|---|---|---|---|---|---|---|---|---|---|---|
| crm | 10,200 | 40 | 1.303 | 1.304 | 13.8 | 100.0 | 0.0 | 100.0 | 93.84 | ✅ | 100.0 |
| event_log | 10,000 | 25 | 0.486 | 0.487 | 5.1 | 100.0 | 0.0 | 100.0 | 99.677 | ✅ | 100.0 |
| finance | 10,200 | 60 | 1.651 | 1.675 | 18.3 | 100.0 | 0.0 | 100.0 | 99.499 | ✅ | 100.0 |
| gold | 10,200 | 7 | 0.187 | 0.187 | 3.7 | 100.0 | 0.0 | 100.0 | 98.3 | ✅ | 100.0 |
| provenance | 10,000 | 18 | 0.403 | 0.404 | 7.3 | 100.0 | 0.0 | 100.0 | 99.765 | ✅ | 100.0 |
| wide_schema | 10,000 | 100 | 3.089 | 3.089 | 13.4 | 100.0 | 0.0 | 100.0 | 96.042 | ✅ | 100.0 |
Authored-code reduction (Metric 6)
- FreshData: 3 lines
- pandas baseline: 25 lines (88.0% reduction)
Summary
Closes #54. CI linted only
src tests;ruff check .had 368 errors across benchmarks and notebooks. This PR takes it to zero and widens both CI lint steps (ci.yml + release.yml) toruff check .so it stays there.What was fixed vs. ignored (and why)
Fixed (code changes, no behavior change):
PLR0402alias (ruff --fix; the ipynb rewrite also normalized cell ids and unicode escapes — content identical, all notebooks re-validated as JSON)benchmarks/: wrapped 20 genuinely long code lines (bench.py, harness_metrics.py, results_schema.py); RET504 ×3 inlined; E741lrenamed ×2; F841 dead assignments removed — including a genuinely dead gold-labels block inharness_metrics.py(assigned, conditionally reassigned, never read); PLE0604__all__made literal and verified at runtime againstREGISTRYkeysIgnored via the repo's established per-file-ignore conventions:
benchmarks/*→ PLC0415 (lazy imports of optional heavy deps are the point; consolidates 4 existing per-file entries)benchmarks/fixtures/*→ E501 (defect tables read as one row per line; wrapping destroys the tabular readability the fixtures exist for)Excluded:
freshdata-benchmarks/(extend-exclude) — ASV-managed sub-project with tool-generated layout and per-machine result artifacts (.asv/results/Johnnys-MacBook-Air.local/...); not shipped, not held to the package lint bar.Verification
ruff check .→ All checks passedfixtures.REGISTRY['crm'].generate(200));__all__asserted equal to registry keyspytest -m "not online and not large": green, coverage 93.55%mypy src/freshdataclean