From d261478c21c38148d7120da432e2f5563590b0e3 Mon Sep 17 00:00:00 2001 From: Justin Poehnelt Date: Mon, 27 Aug 2018 07:25:11 -0600 Subject: [PATCH] no shapely, skip doctests (#2297) GitOrigin-RevId: af02ac67fb03b5f1b8e6b951a285b9bda8d6764f --- descarteslabs/scenes/scene.py | 7 +++---- descarteslabs/scenes/scenecollection.py | 6 +++--- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/descarteslabs/scenes/scene.py b/descarteslabs/scenes/scene.py index 88197487..242cdce9 100644 --- a/descarteslabs/scenes/scene.py +++ b/descarteslabs/scenes/scene.py @@ -265,15 +265,14 @@ def coverage(self, ctx): Returns ------- - coverage : float + float Example ------- >>> import descarteslabs as dl >>> scene, ctx = dl.scenes.Scene.from_id("landsat:LC08:PRE:TOAR:meta_LC80270312016188_v1") - >>> ctx # this ``GeoContext`` is based upon the scene - >>> coverage = scene.coverage(ctx) - >>> coverage + >>> coverage = scene.coverage(ctx) # doctest: +SKIP + >>> coverage # doctest: +SKIP 1.0 """ diff --git a/descarteslabs/scenes/scenecollection.py b/descarteslabs/scenes/scenecollection.py index df80b84e..dbc36a69 100644 --- a/descarteslabs/scenes/scenecollection.py +++ b/descarteslabs/scenes/scenecollection.py @@ -148,11 +148,11 @@ def filter_coverage(self, ctx, minimum_coverage=1): >>> import descarteslabs as dl >>> aoi_geometry = { ... 'type': 'Polygon', - ... 'coordinates': (((-95, 42),(-93, 42),(-93, 40),(-95, 41),(-95, 42)))} + ... 'coordinates': [[[-95, 42],[-93, 42],[-93, 40],[-95, 41],[-95, 42]]]} >>> scenes, ctx = dl.scenes.search(aoi_geometry, products=["landsat:LC08:PRE:TOAR"], limit=20, ... sort_field='processed') - >>> filtered_scenes = scenes.filter_coverage(ctx, 0.50) - >>> assert len(filtered_scenes) < len(scenes) + >>> filtered_scenes = scenes.filter_coverage(ctx, 0.50) # doctest: +SKIP + >>> assert len(filtered_scenes) < len(scenes) # doctest: +SKIP """ return self.filter(lambda scene: scene.coverage(ctx) >= minimum_coverage)