Skip to content

Commit

Permalink
no shapely, skip doctests (#2297)
Browse files Browse the repository at this point in the history
GitOrigin-RevId: af02ac67fb03b5f1b8e6b951a285b9bda8d6764f
  • Loading branch information
jpoehnelt authored and Descartes Labs Build committed Aug 27, 2018
1 parent 5a281b9 commit d261478
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
7 changes: 3 additions & 4 deletions descarteslabs/scenes/scene.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
"""
Expand Down
6 changes: 3 additions & 3 deletions descarteslabs/scenes/scenecollection.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit d261478

Please sign in to comment.