From 68341ba12a3deba7018f699d7811cdc174e544da Mon Sep 17 00:00:00 2001 From: Joseph Franck Date: Wed, 5 Nov 2025 09:58:39 -0600 Subject: [PATCH 1/4] make generic xmp tags universal to allow for new cameras to be more easily used --- imgparse/xmp_tags.py | 18 +++--------------- pyproject.toml | 2 +- 2 files changed, 4 insertions(+), 16 deletions(-) diff --git a/imgparse/xmp_tags.py b/imgparse/xmp_tags.py index 14a404c..5365276 100644 --- a/imgparse/xmp_tags.py +++ b/imgparse/xmp_tags.py @@ -14,9 +14,9 @@ class XMPTags: PITCH: str = "" YAW: str = "" FOCAL_LEN: str = "" - WAVELENGTH_CENTRAL: str = "" - WAVELENGTH_FWHM: str = "" - BANDNAME: str = "" + WAVELENGTH_CENTRAL: str = "Camera:CentralWavelength" + WAVELENGTH_FWHM: str = "Camera:WavelengthFWHM" + BANDNAME: str = "Camera:BandName" LRF_ALT: str = "" LRF_ALT2: str = "" # See SenteraTags below ILS: str = "" @@ -39,9 +39,6 @@ class SenteraTags(XMPTags): PITCH = "Camera:Pitch" YAW = "Camera:Yaw" FOCAL_LEN = "Camera:PerspectiveFocalLength" - WAVELENGTH_CENTRAL = "Camera:CentralWavelength" - WAVELENGTH_FWHM = "Camera:WavelengthFWHM" - BANDNAME = "Camera:BandName" LRF_ALT = "Sentera:AltimeterCalculatedAGL" LRF_ALT2 = "Sentera:AltimeterCalcuatedAGL" # l was left out in Quad v1.0.0 ILS = "Camera:SunSensor" @@ -61,9 +58,6 @@ class DJITags(XMPTags): PITCH = "drone-dji:GimbalPitchDegree" YAW = "drone-dji:GimbalYawDegree" FOCAL_LEN = "drone-dji:CalibratedFocalLength" - WAVELENGTH_CENTRAL = "Camera:CentralWavelength" - WAVELENGTH_FWHM = "Camera:WavelengthFWHM" - BANDNAME = "Camera:BandName" SELF_DATA = "drone-dji:SelfData" ILS = "Camera:SunSensor" IRRADIANCE = "Camera:Irradiance" @@ -75,9 +69,6 @@ class DJITags(XMPTags): class MicaSenseTags(XMPTags): """MicaSense XMP Tags.""" - WAVELENGTH_CENTRAL = "Camera:CentralWavelength" - WAVELENGTH_FWHM = "Camera:WavelengthFWHM" - BANDNAME = "Camera:BandName" CAPTURE_UUID = "MicaSense:CaptureId" IRRADIANCE = "Camera:Irradiance" @@ -85,7 +76,4 @@ class MicaSenseTags(XMPTags): class ParrotTags(XMPTags): """Parrot XMP Tags.""" - WAVELENGTH_CENTRAL = "Camera:CentralWavelength" - WAVELENGTH_FWHM = "Camera:WavelengthFWHM" - BANDNAME = "Camera:BandName" CAPTURE_UUID = "Camera:CaptureUUID" diff --git a/pyproject.toml b/pyproject.toml index 358d506..73c20d7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "imgparse" -version = "2.0.7" +version = "2.0.8" description = "Python image-metadata-parser utilities" authors = [] include = [ From a19431c728fd0c3a58376fa11eda6f5732a850ae Mon Sep 17 00:00:00 2001 From: Joseph Franck Date: Wed, 5 Nov 2025 11:44:35 -0600 Subject: [PATCH 2/4] make generic xmp tags universal to allow for new cameras to be more easily used --- imgparse/s3.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imgparse/s3.py b/imgparse/s3.py index 8120a89..eab69a4 100644 --- a/imgparse/s3.py +++ b/imgparse/s3.py @@ -25,7 +25,7 @@ def from_uri(cls, image_path: str) -> S3PathStub: from s3path import S3Path except ImportError: # Use the stub class as a fallback - S3Path = S3PathStub # type: ignore + S3Path = S3PathStub def s3_resource(role_arn: str | None = None) -> S3ServiceResource: From 1b13ba28f71e674b248f1fcfcdf7f0ba0e9046eb Mon Sep 17 00:00:00 2001 From: Joseph Franck Date: Wed, 5 Nov 2025 11:51:31 -0600 Subject: [PATCH 3/4] update mypy file --- imgparse/xmp_tags.py | 4 +--- mypy.ini | 1 + 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/imgparse/xmp_tags.py b/imgparse/xmp_tags.py index 5365276..d963346 100644 --- a/imgparse/xmp_tags.py +++ b/imgparse/xmp_tags.py @@ -19,7 +19,7 @@ class XMPTags: BANDNAME: str = "Camera:BandName" LRF_ALT: str = "" LRF_ALT2: str = "" # See SenteraTags below - ILS: str = "" + ILS: str = "Camera:SunSensor" HOMEPOINT_LAT: str = "" HOMEPOINT_LON: str = "" PRINCIPAL_POINT: str = "" @@ -41,7 +41,6 @@ class SenteraTags(XMPTags): FOCAL_LEN = "Camera:PerspectiveFocalLength" LRF_ALT = "Sentera:AltimeterCalculatedAGL" LRF_ALT2 = "Sentera:AltimeterCalcuatedAGL" # l was left out in Quad v1.0.0 - ILS = "Camera:SunSensor" HOMEPOINT_LAT = "SENTERA:HomePointLatitude" HOMEPOINT_LON = "SENTERA:HomePointLongitude" PRINCIPAL_POINT = "Camera:PrincipalPoint" @@ -59,7 +58,6 @@ class DJITags(XMPTags): YAW = "drone-dji:GimbalYawDegree" FOCAL_LEN = "drone-dji:CalibratedFocalLength" SELF_DATA = "drone-dji:SelfData" - ILS = "Camera:SunSensor" IRRADIANCE = "Camera:Irradiance" CAPTURE_UUID = "drone-dji:CaptureUUID" DEWARP_FLAG = "drone-dji:DewarpFlag" diff --git a/mypy.ini b/mypy.ini index 99a46de..a6b71af 100644 --- a/mypy.ini +++ b/mypy.ini @@ -4,3 +4,4 @@ namespace_packages = True explicit_package_bases = True scripts_are_modules = True strict = True +warn_unused_ignores = False From cfa4c19e51547e9f4ced883673b5b16b6cf216ca Mon Sep 17 00:00:00 2001 From: Joseph Franck Date: Wed, 5 Nov 2025 13:09:03 -0600 Subject: [PATCH 4/4] add ignore back --- imgparse/s3.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imgparse/s3.py b/imgparse/s3.py index eab69a4..8120a89 100644 --- a/imgparse/s3.py +++ b/imgparse/s3.py @@ -25,7 +25,7 @@ def from_uri(cls, image_path: str) -> S3PathStub: from s3path import S3Path except ImportError: # Use the stub class as a fallback - S3Path = S3PathStub + S3Path = S3PathStub # type: ignore def s3_resource(role_arn: str | None = None) -> S3ServiceResource: