+
Skip to content

Conversation

cvele
Copy link
Owner

@cvele cvele commented Sep 17, 2025

No description provided.

- 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.
@Copilot Copilot AI review requested due to automatic review settings September 17, 2025 19:54
Copy link
Contributor

@Copilot Copilot AI left a 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')
Copy link

Copilot AI Sep 17, 2025

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-commenter
Copy link

codecov-commenter commented Sep 17, 2025

Codecov Report

❌ Patch coverage is 28.57143% with 5 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (main@adcdecd). Learn more about missing BASE report.

Files with missing lines Patch % Lines
imgc/compressor.py 28.57% 5 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@cvele cvele merged commit 3ebb47e into main Sep 17, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载