From 684cd69d83547a78db8d44b4f51a912c2bc42506 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 22 Nov 2024 16:14:01 -0500 Subject: [PATCH] Fix typos and import order in the spatial outgest (#3381) (#3382) Co-authored-by: Julia Dark <24235303+jp-dark@users.noreply.github.com> --- .../src/tiledbsoma/experimental/_xarray_backend.py | 4 ++-- apis/python/src/tiledbsoma/experimental/outgest.py | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/apis/python/src/tiledbsoma/experimental/_xarray_backend.py b/apis/python/src/tiledbsoma/experimental/_xarray_backend.py index bc7240948f..34214f0a91 100644 --- a/apis/python/src/tiledbsoma/experimental/_xarray_backend.py +++ b/apis/python/src/tiledbsoma/experimental/_xarray_backend.py @@ -15,12 +15,12 @@ import spatialdata as sd from spatialdata.models.models import DataTree except ImportError as err: - warnings.warn("Experimental spatial exporter requires the spatialdatda package.") + warnings.warn("Experimental spatial exporter requires the spatialdata package.") raise err try: import xarray as xr except ImportError as err: - warnings.warn("Experimental spatial exporter requires the spatialdatda package.") + warnings.warn("Experimental spatial exporter requires the xarray package.") raise err from .. import DenseNDArray diff --git a/apis/python/src/tiledbsoma/experimental/outgest.py b/apis/python/src/tiledbsoma/experimental/outgest.py index 174a32cc3a..5886c8dfed 100644 --- a/apis/python/src/tiledbsoma/experimental/outgest.py +++ b/apis/python/src/tiledbsoma/experimental/outgest.py @@ -5,11 +5,6 @@ import warnings from typing import TYPE_CHECKING, Dict, Optional, Tuple, Union -try: - import geopandas as gpd -except ImportError as err: - warnings.warn("Experimental spatial outgestor requires the geopandas package.") - raise err import pandas as pd import somacore @@ -18,6 +13,11 @@ except ImportError as err: warnings.warn("Experimental spatial outgestor requires the spatialdata package.") raise err +try: + import geopandas as gpd +except ImportError as err: + warnings.warn("Experimental spatial outgestor requires the geopandas package.") + raise err from .. import MultiscaleImage, PointCloudDataFrame from .._constants import SOMA_JOINID