Repository navigation
Improve Exif coverage for orientation, lens, and person helpers - #23
Conversation
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 Report❌ Patch coverage is
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. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
🟢 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 -> Transformmappings viaaffineTransformand validatestransformParamsplus representativetransformMatrixoutputs. - Adds tests for
lensDisplayNamefallback,lensShortNameserial formatting, andlensTypeclassification for prime/zoom/unknown cases. - Adds tests for
formatPersonhandling 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.
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
Orientation→Transformmapping.transformParamsandtransformMatrixoutputs for representative rotations/flips.Lens helpers
lensDisplayNamefallback behavior.lensShortNamewith and without serial numbers.lensTypeclassification across prime, zoom, constant-aperture, variable-aperture, and unknown cases.Person formatting
formatPersonfor slash-separated, space-separated, and single-token names.Example: