Repository navigation
ci: add ruff for python linting and formatting - #26
Conversation
Add ruff config, CI job (astral-sh/ruff-action), and npm scripts for lint:python / format:python. Fix existing violations in generate_video.py.
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughAdds GIF encoding (two-pass FFmpeg palette) to the video generator, exposes --output-gif and --crf CLI options, consolidates frame generation for MP4 and GIF, and integrates Ruff-based Python lint/format tooling into CI and npm scripts. Changes
Sequence Diagram(s)sequenceDiagram
%% Colors: Client (rgba), Generator, FFmpeg, Filesystem
participant CLI as "CLI\n(rgba(52,160,235,0.5))"
participant Gen as "Frame Generator\n(rgba(72,201,176,0.5))"
participant FF as "FFmpeg\n(rgba(255,203,5,0.5))"
participant FS as "Filesystem\n(rgba(155,89,182,0.5))"
CLI->>Gen: run (generate frames)
Gen->>FS: write frames to frames_dir
CLI->>FF: invoke MP4 encode with frames_dir
FF->>FS: write MP4 output
CLI->>FF: invoke two-pass GIF encode (palettegen + paletteuse) with frames_dir
FF->>FS: write GIF output
FS-->>CLI: return output paths
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Summary
ruff.toml) targeting py313 with E/F/I/W/UP/B/SIM/RUF rulespython-checkCI job usingastral-sh/ruff-action@v3for lint + format checkslint:python,format:python,format:python:checknpm scriptsgenerate_video.py(tuple unpacking, lambda loop var binding)ruffto knipignoreBinaries(system binary, not an npm dep)Test plan
python-checkCI job passes (lint + format)checkCI job still passesSummary by CodeRabbit
New Features
Chores