Skip to content
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

LensModel to loop and avoid returning default values & LensModel add tests for sony raw files to avoid default values #1807

Merged
merged 13 commits into from
Nov 9, 2024

Conversation

qdraw
Copy link
Owner

@qdraw qdraw commented Nov 9, 2024

PR Details

Description / Motivation and Context

This pull request includes multiple changes to improve the codebase, enhance functionality, and add new tests. The most important changes include namespace adjustments, method reordering, and new test additions.

Codebase Improvements:

  • Changed namespace declarations to file-scoped namespaces in multiple files (IReadMeta.cs, ReadMetaHelpers/ReadMetaExif.cs, Services/ReadMeta.cs). [1] [2] [3]
  • Reordered and grouped methods logically within ReadMeta.cs to improve readability and maintainability. [1] [2] [3] [4] [5]

Functional Enhancements:

  • Added logic to handle Sony lens models more accurately in ReadMetaExif.cs, including ignoring generic E-mount and T-mount lenses. [1] [2]
  • Improved the handling of Make values by trimming trailing spaces in SetArrayBasedItemsMakeModel method.
  • Enhanced GetMakeLensModel to iterate over directories and avoid returning placeholder values.

New Tests:

  • Added a new test class SonyLensIdConverterTest to verify the functionality of Sony lens ID conversion methods.
  • Expanded ReadMetaExifTest with a new test method to validate parsing of EXIF directories with example data.
  • Updated ReadMetaSubPathStorageTest to include a summary comment and improve readability.

New Utility Classes:

  • Created utility classes CreateAnImageA330Raw and CreateAnImageA6600Raw to facilitate testing with raw image data. [1] [2]

Documentation:

  • Added README files to document the process of creating test image data. [1] [2]

Related Issue

How Has This Been Tested

  • C# Unit tests
  • Typescript Unit tests
  • Other Unit tests
  • Manual tests
  • Automatic End2end tests (starsky-tools/end2end)

Types of changes

  • Added for new features
  • Breaking change fix or feature that would cause existing functionality to change
  • Changed for non-breaking changes in existing functionality for example docs change / refactoring / dependency upgrades
  • Deprecated for soon-to-be removed features
  • Removed for now removed features
  • Fixed for any bug fixes
  • Security in case of vulnerabilities

Checklist

  • My code follows the code style of this project.
  • I have updated the documentation accordingly (update when needed)
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • I have updated the ./history.md document

@qdraw qdraw changed the title reformat ireadmeta ; add raw xample format exifcopy test LensModel to loop and avoid returning default values & LensModel add tests for sony raw files to avoid default values Nov 9, 2024
@qdraw qdraw linked an issue Nov 9, 2024 that may be closed by this pull request
Copy link

sonarqubecloud bot commented Nov 9, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
22.3% Duplication on New Code (required ≤ 3%)

See analysis details on SonarCloud

@qdraw qdraw merged commit d1dd779 into master Nov 9, 2024
9 of 10 checks passed
@qdraw qdraw deleted the feature/202411_camera_input branch November 9, 2024 21:13
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.

Profile correction not detected
1 participant