Skip to content

Commit

Permalink
Merge pull request #45 from leosaffin/fix_geopandas_usage
Browse files Browse the repository at this point in the history
Fix geopandas usage
  • Loading branch information
leosaffin authored Sep 12, 2024
2 parents 5546e1e + 5c095bc commit c435827
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion huracanpy/utils/geography.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def get_basin(lon, lat, convention="WMO", crs=None):
# Running this on lots of tracks was very slow if the file is reopened every time this
# is called
_natural_earth_feature_cache = {
f"physical_{key}_0_basin": value.rename_axis("basin")
f"physical_{key}_0_basin": value.rename_axis("basin").reset_index()
for key, value in basins_def.items()
}

Expand Down
8 changes: 7 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,13 @@ dependencies = [
"parse",
"shapely",
"pandas",
"geopandas",
# Issue with newer versions of fiona when using old versions of geopandas
# see https://stackoverflow.com/a/78949565/8270394
# Normally just specify the newer geopandas, but it does not exist for python3.8
# so pin the version of fiona when using python3.8
"geopandas>=0.14.4;python_version>='3.9'",
"geopandas;python_version<'3.9'",
"fiona<=1.9.6;python_version<'3.9'",
"matplotlib",
"seaborn",
"netcdf4",
Expand Down

0 comments on commit c435827

Please sign in to comment.