-
Notifications
You must be signed in to change notification settings - Fork 0
Feat/imageio avif #9
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
Conversation
- Introduced a new `.coveragerc` file to configure coverage reporting for the project, excluding test files and build artifacts. - Updated the `Makefile` to include a new target for running tests with coverage. - Enhanced the `README.md` to document the new coverage command for users. - Modified the GitHub Actions workflow to run tests with coverage and upload results to Codecov. This commit improves test coverage tracking and documentation for better developer experience.
- Clarified that AVIF compression requires the `imageio` library in the README.md. - Updated requirements.txt to specify the minimum version of `imageio` needed for AVIF support. - Enhanced error handling in compressor.py to log specific import errors for AVIF compression. - Modified tests to check for AVIF compression support based on the availability of `imageio`. These changes improve documentation and ensure users are aware of the dependencies required for AVIF image processing.
- Added full AVIF format support with imageio integration and enhanced error handling for AVIF processing. - Introduced code coverage reporting with Codecov integration and a coverage badge in README.md. - Implemented a comprehensive integration test suite covering real image processing scenarios. - Updated documentation to reflect changes, including breaking changes related to imageio as a required dependency. - Improved CI workflow to run coverage tests and upload results to Codecov. This release enhances image processing capabilities and improves project maintainability through better testing and documentation.
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.
Pull Request Overview
This PR adds full AVIF format support using the imageio library, replacing the previous placeholder implementation that always failed. It also introduces code coverage reporting with Codecov integration.
- Implements functional AVIF compression using imageio v3 API
- Adds comprehensive code coverage reporting with Codecov integration
- Updates test suite to expect AVIF compression to succeed instead of fail
Reviewed Changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
imgc/compressor.py | Implements AVIF compression using imageio v3 API with proper error handling |
tests/test_compressor_extra.py | Updates AVIF test to expect successful compression with fallback for missing imageio |
.github/workflows/test-build.yml | Adds coverage testing and Codecov upload to CI workflow |
.coveragerc | Adds coverage configuration for XML/HTML reporting |
README.md | Updates documentation with coverage badge and AVIF requirements |
Makefile | Adds coverage target to help documentation |
CHANGELOG.md | Documents all changes in v0.0.3 release |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
import imageio | ||
import imageio.v3 as iio | ||
img = Image.open(path) | ||
arr = img.convert('RGB') |
Copilot
AI
Sep 17, 2025
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.
Converting PIL Image to RGB and then passing to imageio.imwrite will not work correctly. The imageio.imwrite function expects a numpy array, but img.convert('RGB') returns a PIL Image object. You need to convert to numpy array first: arr = np.array(img.convert('RGB'))
Copilot uses AI. Check for mistakes.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #9 +/- ##
=======================================
Coverage ? 73.37%
=======================================
Files ? 6
Lines ? 323
Branches ? 0
=======================================
Hits ? 237
Misses ? 86
Partials ? 0 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
No description provided.