Skip to content

Commit

Permalink
Merge pull request #260 from perrygeo/release-0.17
Browse files Browse the repository at this point in the history
Release 0.17
  • Loading branch information
perrygeo authored Jul 21, 2022
2 parents c5217b6 + 678dc08 commit 83220a6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 25 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
0.17.0
- Fix performance regression due to platform.architecture performance #258

0.16.0
- Fix deprecation warning with shapely 1.8+ #250

Expand Down Expand Up @@ -44,7 +47,7 @@
0.10.0
- Added a generator variant of zonal_stats (gen_zonal_stats) and point_query
(gen_point_query) which yield results instead of returning a list
- Dependency on cligj to standardize the geojson input/output args and opts
- Dependency on cligj to standardize the geojson input/output args and opts
- Input/Output can be geojson sequences; allows for stream processing

0.9.2
Expand Down
2 changes: 1 addition & 1 deletion src/rasterstats/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.16.0"
__version__ = "0.17.0"
23 changes: 0 additions & 23 deletions tests/test_zonal.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# test zonal stats
from datetime import datetime
import json
import os
import pytest
Expand Down Expand Up @@ -558,28 +557,6 @@ def test_nan_counts():
assert 'nan' not in res


def test_performance():
polygons_path = os.path.join(DATA, 'polygons.shp')
polygons = list(read_features(polygons_path))
polygons = [polygon for polygon in polygons for _ in range(100)]

start_time = datetime.now()
stats = zonal_stats(polygons, raster)
secs_taken = (datetime.now() - start_time).total_seconds()
for key in ['count', 'min', 'max', 'mean']:
assert key in stats[0]
assert len(stats) == len(polygons)
assert stats[0]['count'] == 75
assert round(stats[0]['mean'], 2) == 14.66

if sys.platform == "linux" or sys.platform == "linux2":
assert secs_taken < 1
elif sys.platform == "darwin": # OS X
assert secs_taken < 1
elif sys.platform == "win32":
assert secs_taken < 5


# Optional tests
def test_geodataframe_zonal():
polygons = os.path.join(DATA, 'polygons.shp')
Expand Down

0 comments on commit 83220a6

Please sign in to comment.