Skip to content

Improve Exif coverage for orientation, lens, and person helpers - #23

Merged
iustin merged 3 commits into
mainfrom
copilot/improve-code-coverage-exif
Sep 7, 2026
Merged

iustin merged 3 commits into
mainfrom
copilot/improve-code-coverage-exif

Conversation

Copilot AI commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Exif helper coverage had blind spots around orientation transforms, lens classification, and name formatting. This patch exercises the branches that were previously untested so the module’s JSON and formatting behavior is covered more completely.

  • Orientation helpers

    • Covers every Orientation → Transform mapping.
    • Verifies transformParams and transformMatrix outputs for representative rotations/flips.
  • Lens helpers

    • Covers lensDisplayName fallback behavior.
    • Covers lensShortName with and without serial numbers.
    • Covers lensType classification across prime, zoom, constant-aperture, variable-aperture, and unknown cases.
  • Person formatting

    • Covers formatPerson for slash-separated, space-separated, and single-token names.

Example:

affineTransform OrientationRightBot
transformParams (Transform RLeft True False)
lensType (LensInfo ... (Just (Zoom 24 70)) (Just (FixedAperture 4.0)) ...)
formatPerson False "Doe/John"

Copilot AI and others added 3 commits September 7, 2026 15:42
Co-authored-by: iustin <550045+iustin@users.noreply.github.com>
Co-authored-by: iustin <550045+iustin@users.noreply.github.com>
Co-authored-by: iustin <550045+iustin@users.noreply.github.com>
@codecov

codecov Bot commented Sep 7, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 88.13559% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 65.47%. Comparing base (2355f09) to head (21bd8b1).

Files with missing lines Patch % Lines
test/ExifSpec.hs 88.13% 2 Missing and 5 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #23      +/-   ##
==========================================
+ Coverage   64.70%   65.47%   +0.77%     
==========================================
  Files          61       61              
  Lines        7044     7103      +59     
  Branches      431      440       +9     
==========================================
+ Hits         4558     4651      +93     
+ Misses       2055     2012      -43     
- Partials      431      440       +9     

☔ View full report in Codecov by Harness.
📢 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@iustin
iustin marked this pull request as ready for review September 7, 2026 16:17
Copilot AI lite review requested due to automatic review settings September 7, 2026 16:17

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The changes are isolated to tests and the added assertions align with the current Exif helper implementations and exported API types.

Pull request overview

This PR strengthens the Haskell test suite’s coverage of src/Exif.hs helper behavior by adding targeted spec assertions for orientation transforms, lens naming/classification, and person-name formatting.

Changes:

  • Adds tests covering all Orientation -> Transform mappings via affineTransform and validates transformParams plus representative transformMatrix outputs.
  • Adds tests for lensDisplayName fallback, lensShortName serial formatting, and lensType classification for prime/zoom/unknown cases.
  • Adds tests for formatPerson handling of slash-separated, space-separated, and single-token names.
File summaries
File Description
test/ExifSpec.hs Adds new spec coverage for orientation, lens, and person helper functions in Exif.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@iustin
iustin requested a lite review from Copilot September 7, 2026 16:27
@iustin
iustin merged commit bbd8a47 into main Sep 7, 2026
5 checks passed
@iustin
iustin removed the request for review from Copilot September 7, 2026 16:27
@iustin
iustin deleted the copilot/improve-code-coverage-exif branch September 7, 2026 16:27
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.

3 participants