Feature: Add CI workflow for linting, testing, and security scanning#25
Merged
duartebarbosadev merged 16 commits intomainfrom Aug 10, 2025
Merged
Feature: Add CI workflow for linting, testing, and security scanning#25duartebarbosadev merged 16 commits intomainfrom
duartebarbosadev merged 16 commits intomainfrom
Conversation
…otation view tests
…lines in rotation tests
…ts across integration and unit tests
…larity and maintenance
…y with minimal Pillow builds
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR introduces a comprehensive CI/CD pipeline with GitHub Actions, enforces basic test coverage requirements, and restructures the test suite for better organization and reliability. The changes include adding automated workflows for linting, testing, and security scanning, while removing problematic GUI-heavy tests in favor of focused unit tests.
- Adds a complete GitHub Actions CI workflow with linting, testing, coverage enforcement, and basic security scanning
- Introduces test coverage enforcement with an 8% minimum threshold via pytest configuration
- Replaces unstable GUI integration tests with focused unit tests for the ModelRotationDetector
- Removes empty package
__init__.pyfiles and improves import handling for optional dependencies
Reviewed Changes
Copilot reviewed 13 out of 14 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
.github/workflows/ci.yml |
Comprehensive CI workflow with lint, test, security scan, and PR summary jobs |
pytest.ini |
Coverage threshold configuration enforcing 8% minimum |
requirements-dev.txt |
Development dependencies including pytest, pytest-cov, and ruff |
tests/test_model_rotation_detector_unit.py |
New focused unit tests for ModelRotationDetector |
tests/test_rotation_accept_unit.py |
Removed unstable GUI-dependent tests |
tests/test_rotation_accept_integration.py |
Removed integration tests dependent on sample folder |
src/core/image_pipeline.py |
Improved optional import handling for PIL.ImageQt |
Various __init__.py files |
Removed empty package initialization files |
DEVELOPER_GUIDE.md |
Minor formatting addition |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces significant improvements to the project's CI/CD pipeline, test coverage enforcement, and unit testing for the image rotation detection feature. The most important changes are the addition of a comprehensive GitHub Actions workflow for CI, basic security scanning, and PR summaries; enforcement of a minimal coverage threshold; and new, focused unit tests for the rotation detector. These changes collectively enhance code quality, reliability, and maintainability.
CI/CD and Quality Enforcement
.github/workflows/ci.ymlGitHub Actions workflow that runs linting, testing (with coverage), basic security scanning, and generates PR summaries. This workflow includes scheduled weekly runs and concurrency control to prevent overlapping CI jobs.pytest.ini, ensuring that builds fail if coverage drops below 8%. This sets a baseline for gradually increasing coverage.requirements-dev.txtto explicitly list testing and linting tools (pytest,pytest-cov,ruff), improving clarity and reproducibility of the development environment.Testing Enhancements
tests/test_model_rotation_detector_unit.py) for theModelRotationDetector, covering lazy initialization, prediction logic when the model is missing, stubbed session behavior, and disabled mode handling. This improves the reliability and testability of the image rotation detection feature.Documentation
DEVELOPER_GUIDE.md) to include a new section on adding image feature pipelines, supporting future extensibility and onboarding.These changes collectively improve the project's CI reliability, code quality enforcement, and test coverage.