1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
|
From: Antonio Valentino <antonio.valentino@tiscali.it>
Date: Sun, 17 Feb 2019 10:56:06 +0000
Subject: Disable extra dependency from geoviews
Forwarded: not-needed
---
pyproject.toml | 8 ++++----
satpy/tests/scene_tests/test_conversions.py | 7 +++++++
2 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/pyproject.toml b/pyproject.toml
index ba1f085..5d1e6ea 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -80,13 +80,13 @@ animations = ["imageio"]
# Documentation:
doc = ["sphinx", "sphinx_rtd_theme", "sphinxcontrib-apidoc"]
# Other
-geoviews = ["geoviews"]
-holoviews = ["holoviews"]
-hvplot = ["hvplot", "geoviews", "cartopy", "holoviews"]
+# geoviews = ["geoviews"]
+# holoviews = ["holoviews"]
+# hvplot = ["hvplot", "geoviews", "cartopy", "holoviews"]
overlays = ["pycoast", "pydecorate"]
satpos_from_tle = ["skyfield", "astropy"]
tests = ["behave", "h5py", "netCDF4", "pyhdf", "imageio",
- "rasterio", "geoviews", "trollimage", "fsspec", "bottleneck",
+ "rasterio", "trollimage", "fsspec", "bottleneck",
"rioxarray", "pytest", "pytest-lazy-fixtures", "defusedxml",
"s3fs", "eccodes", "h5netcdf", "xarray>=2024.10.0",
"skyfield", "ephem", "pint-xarray", "astropy", "dask-image", "python-geotiepoints", "numba"]
diff --git a/satpy/tests/scene_tests/test_conversions.py b/satpy/tests/scene_tests/test_conversions.py
index 96a19b7..7e0c231 100644
--- a/satpy/tests/scene_tests/test_conversions.py
+++ b/satpy/tests/scene_tests/test_conversions.py
@@ -27,6 +27,11 @@ from dask import array as da
from satpy import Scene
from satpy.tests.utils import skip_numba_unstable_if_missing
+try:
+ import geoviews
+except ImportError:
+ geoviews = None
+
# NOTE:
# The following fixtures are not defined in this file, but are used and injected by Pytest:
# - include_test_etc
@@ -53,6 +58,7 @@ class TestSceneSerialization:
class TestSceneConversions:
"""Test Scene conversion to geoviews, xarray, etc."""
+ @pytest.mark.skipif(geoviews is None, reason="'geoviews' not available")
def test_geoviews_basic_with_area(self):
"""Test converting a Scene to geoviews with an AreaDefinition."""
from pyresample.geometry import AreaDefinition
@@ -67,6 +73,7 @@ class TestSceneConversions:
# we assume that if we got something back, geoviews can use it
assert gv_obj is not None
+ @pytest.mark.skipif(geoviews is None, reason="'geoviews' not available")
def test_geoviews_basic_with_swath(self):
"""Test converting a Scene to geoviews with a SwathDefinition."""
from pyresample.geometry import SwathDefinition
|