From f80d10c274397bc07d47ea6d864802ad8bbe9bf0 Mon Sep 17 00:00:00 2001 From: Tennessee Leeuwenburg Date: Fri, 4 Apr 2025 18:15:16 +1100 Subject: [PATCH 1/4] Modify code so that healpix reprojection code is not a required import --- .../pipeline/operations/xarray/remapping/__init__.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/packages/pipeline/src/pyearthtools/pipeline/operations/xarray/remapping/__init__.py b/packages/pipeline/src/pyearthtools/pipeline/operations/xarray/remapping/__init__.py index e153332f..beae61fa 100644 --- a/packages/pipeline/src/pyearthtools/pipeline/operations/xarray/remapping/__init__.py +++ b/packages/pipeline/src/pyearthtools/pipeline/operations/xarray/remapping/__init__.py @@ -19,6 +19,14 @@ import warnings -from .healpix import HEALPix # noqa: F401 - __all__ = ["HEALPix"] + +try: + from .healpix import HEALPix # noqa: F401 + +except: + + class HealPix(): + def __init__(self): + warnings.warn("Could not import the healpix projection, please install the 'healpy' and 'reproject' optional depenc") + From 741871e71c60321430e63cc6ee7e49183e31ab0b Mon Sep 17 00:00:00 2001 From: Tennessee Leeuwenburg Date: Fri, 4 Apr 2025 18:19:01 +1100 Subject: [PATCH 2/4] Fix typo --- .../pipeline/operations/xarray/remapping/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/pipeline/src/pyearthtools/pipeline/operations/xarray/remapping/__init__.py b/packages/pipeline/src/pyearthtools/pipeline/operations/xarray/remapping/__init__.py index beae61fa..32a842fb 100644 --- a/packages/pipeline/src/pyearthtools/pipeline/operations/xarray/remapping/__init__.py +++ b/packages/pipeline/src/pyearthtools/pipeline/operations/xarray/remapping/__init__.py @@ -28,5 +28,5 @@ class HealPix(): def __init__(self): - warnings.warn("Could not import the healpix projection, please install the 'healpy' and 'reproject' optional depenc") + warnings.warn("Could not import the healpix projection, please install the 'healpy' and 'reproject' optional depencies") From 61b8860c9739eceeb7d66f70ac99f6f48c828255 Mon Sep 17 00:00:00 2001 From: Tennessee Leeuwenburg Date: Fri, 4 Apr 2025 18:25:07 +1100 Subject: [PATCH 3/4] Fix the typo fix to the typo --- .../pipeline/operations/xarray/remapping/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/pipeline/src/pyearthtools/pipeline/operations/xarray/remapping/__init__.py b/packages/pipeline/src/pyearthtools/pipeline/operations/xarray/remapping/__init__.py index 32a842fb..c4220ebd 100644 --- a/packages/pipeline/src/pyearthtools/pipeline/operations/xarray/remapping/__init__.py +++ b/packages/pipeline/src/pyearthtools/pipeline/operations/xarray/remapping/__init__.py @@ -28,5 +28,5 @@ class HealPix(): def __init__(self): - warnings.warn("Could not import the healpix projection, please install the 'healpy' and 'reproject' optional depencies") + warnings.warn("Could not import the healpix projection, please install the 'healpy' and 'reproject' optional dependencies") From 79cdee7f2518314af0215cee2113f0f10657b673 Mon Sep 17 00:00:00 2001 From: Tennessee Leeuwenburg Date: Fri, 4 Apr 2025 18:44:44 +1100 Subject: [PATCH 4/4] Update branch with reformatted code following black version upgrade on develop --- .../pipeline/operations/xarray/remapping/__init__.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/pipeline/src/pyearthtools/pipeline/operations/xarray/remapping/__init__.py b/packages/pipeline/src/pyearthtools/pipeline/operations/xarray/remapping/__init__.py index c4220ebd..99832cec 100644 --- a/packages/pipeline/src/pyearthtools/pipeline/operations/xarray/remapping/__init__.py +++ b/packages/pipeline/src/pyearthtools/pipeline/operations/xarray/remapping/__init__.py @@ -21,12 +21,13 @@ __all__ = ["HEALPix"] -try: +try: from .healpix import HEALPix # noqa: F401 except: - class HealPix(): + class HealPix: def __init__(self): - warnings.warn("Could not import the healpix projection, please install the 'healpy' and 'reproject' optional dependencies") - + warnings.warn( + "Could not import the healpix projection, please install the 'healpy' and 'reproject' optional dependencies" + )