-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updated image compression #2256
Conversation
Reviewer's Guide by SourceryThis pull request refactors the Sequence diagram for simplified image compression processsequenceDiagram
participant C as Client
participant IC as ImageCompression
participant F as fmain
C->>IC: apply(image)
IC->>IC: get_params()
Note over IC: Generate random quality
Note over IC: Determine image type (.jpg/.webp)
IC->>F: image_compression(img, quality, image_type)
F-->>C: compressed_image
Class diagram showing changes to ImageCompression initialization schemaclassDiagram
class InitSchema {
+quality_range: tuple[int, int]
+compression_type: Literal["jpeg", "webp"]
}
note for InitSchema "Removed deprecated quality_lower and quality_upper fields
Simplified validation logic"
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @ternaus - I've reviewed your changes - here's some feedback:
Overall Comments:
- Please add back test cases for the current initialization parameters (quality_range and compression_type) to maintain test coverage of the core functionality.
Here's what I looked at during the review
- 🟡 General issues: 1 issue found
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2256 +/- ##
=========================================
+ Coverage 0 89.90% +89.90%
=========================================
Files 0 50 +50
Lines 0 8963 +8963
=========================================
+ Hits 0 8058 +8058
- Misses 0 905 +905
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Summary by Sourcery
Remove deprecated
quality_lower
andquality_upper
parameters fromImageCompression
transform, and update tests accordingly.Enhancements:
ImageCompression
transform by removing deprecated parameters.Tests:
ImageCompression
transform.