Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pin dependencies #218

Merged
merged 6 commits into from
Oct 21, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Breaking changes
^^^^^^^^^^^^^^^^
* The `xhydro` testing utilities have been rewritten to use `pooch` for downloading and caching testing datasets from `hydrologie/xhydro-testdata`. (:pull:`212`).
* The `xhydro` testing utilities now require `pytest-xdist` as a development dependency. (:pull:`212`).
* Many core dependencies have been updated to more modern versions. (:pull:`218`).

Internal changes
^^^^^^^^^^^^^^^^
Expand Down
24 changes: 12 additions & 12 deletions environment-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,30 +5,30 @@ dependencies:
- python >=3.10,<3.13
# Don't forget to sync changes between environment.yml, environment-dev.yml, and pyproject.toml!
# Main packages
- cartopy
- geopandas
- haversine
- cartopy >=0.23.0
- geopandas >=1.0
- haversine >=2.8.0
- importlib-metadata <8.0 # Required for xesmf >=8.4.0,<8.6 to work on Windows
- leafmap
- numpy <2.0.0
- numpy >=1.23,<2.0.0
- pandas >=2.2.0
- planetary-computer
- pystac
- pystac-client
- pooch >=1.8.0
- pydantic >=2.0,<2.5.3 # FIXME: Remove pin once our dependencies (xclim, xscen) support pydantic 2.5.3
- pyyaml
- pyyaml >=6.0.2
- rasterio <=1.3.11 # temporary pin until https://github.com/xarray-contrib/xvec/issues/85 is addressed.
- ravenpy >=0.15.0
- rioxarray
- rioxarray >=0.15.0
- s3fs <=2024.6.1
- spotpy
- spotpy >=1.6.2
- stackstac >=0.5.1
- statsmodels
- statsmodels >=0.14.0
- tqdm
- xarray >=2023.11.0
- xarray-spatial
- xclim >=0.48.2
- xarray-spatial >=0.3.7
- xclim >=0.48.2,<0.53
- xdatasets >=0.3.6
- xscen >=0.8.3
- xvec
Expand All @@ -42,10 +42,10 @@ dependencies:
- flake8-rst-docstrings >=0.3.0
- furo
- ipykernel
- ipython
- ipython >=8.5.0
- isort ==5.13.2
- jupyter_client
- lmoments3
- lmoments3 >=1.0.7
- nbsphinx
- nbval >=0.11.0
- numpydoc >=1.8.0
Expand Down
20 changes: 10 additions & 10 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,29 @@ dependencies:
- pip >=24.2.0
# Don't forget to sync changes between environment.yml, environment-dev.yml, and pyproject.toml!
# Main packages
- cartopy
- geopandas
- haversine
- cartopy >=0.23.0
- geopandas >=1.0
- haversine >=2.8.0
- importlib-metadata <8.0 # Required for xesmf >=8.4.0,<8.6 to work on Windows
- leafmap
- numpy <2.0.0
- numpy >=1.23,<2.0.0
- pandas >=2.2.0
- planetary-computer
- pooch >=1.8.0
- pydantic >=2.0,<2.5.3 # FIXME: Remove pin once our dependencies (xclim, xscen) support pydantic 2.5.3
- pystac
- pystac-client
- pyyaml
- pyyaml >=6.0.2
- rasterio <=1.3.11 # temporary pin until https://github.com/xarray-contrib/xvec/issues/85 is addressed.
- ravenpy >=0.15.0
- rioxarray
- spotpy
- rioxarray >=0.15.0
- spotpy >=1.6.2
- stackstac >=0.5.1
- statsmodels
- statsmodels >=0.14.0
- tqdm
- xarray >=2023.11.0
- xarray-spatial
- xclim >=0.48.2
- xarray-spatial >=0.3.7
- xclim >=0.48.2,<0.53
- xdatasets >=0.3.5
- xscen >=0.8.3
- xvec
22 changes: 11 additions & 11 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,29 +36,29 @@ classifiers = [
dynamic = ["description", "version"]
dependencies = [
# Don't forget to sync changes between environment.yml, environment-dev.yml, and pyproject.toml!
"cartopy",
"geopandas",
"haversine",
"cartopy >=0.23.0",
"geopandas >=1.0",
"haversine >=2.8.0",
"importlib-metadata <8.0", # Required for xesmf >=8.4.0,<8.6 to work on Windows
"leafmap",
"numpy <2.0.0",
"numpy >=1.23,<2.0.0",
"pandas >=2.2.0",
"planetary-computer",
"pooch >=1.8.0",
"pydantic >=2.0,<2.5.3",
"pystac",
"pystac-client",
"pyyaml",
"pyyaml >=6.0.2",
"rasterio <=1.3.11", # temporary pin until https://github.com/xarray-contrib/xvec/issues/85 is addressed.
"ravenpy >=0.15.0",
"rioxarray",
"spotpy",
"rioxarray >=0.15.0",
"spotpy >=1.6.2",
"stackstac >=0.5.1",
"statsmodels",
"statsmodels >=0.14.0",
"tqdm",
"xarray >=2023.11.0",
"xarray-spatial",
"xclim >=0.48.2",
"xarray-spatial >=0.3.7",
"xclim >=0.48.2,<0.53",
"xdatasets >=0.3.6",
"xscen >=0.8.3",
"xvec"
Expand Down Expand Up @@ -93,7 +93,7 @@ docs = [
"furo",
"hvplot",
"ipykernel",
"ipython",
"ipython >=8.5.0",
"jupyter_client",
"nbsphinx",
"nbval",
Expand Down
7 changes: 3 additions & 4 deletions src/xhydro/gis.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,13 @@
import planetary_computer
import pystac_client
import rasterio
import rasterio.features
import rioxarray # noqa: F401
import stackstac
import xarray as xr
import xvec # noqa: F401
from matplotlib.colors import ListedColormap
from pystac.extensions.item_assets import ItemAssetsExtension
from pystac.extensions.projection import ProjectionExtension as proj # noqa: N813
from pystac.extensions.projection import ProjectionExtension
from shapely import Point
from tqdm.auto import tqdm
from xrspatial import aspect, slope
Expand All @@ -39,7 +38,7 @@

# FIXME: `map` is a reserved keyword in Python, so it should not be used as a variable name.
def watershed_delineation(
coordinates: list[tuple] | tuple | None = None,
coordinates: list[tuple] | tuple,
map: leafmap.Map | None = None,
) -> gpd.GeoDataFrame:
"""Calculate watershed delineation from pour point.
Expand Down Expand Up @@ -591,7 +590,7 @@ def land_use_plot(

merged, item = _merge_stac_dataset(catalog, bbox_of_interest, year)

epsg = proj.ext(item).epsg
epsg = ProjectionExtension.ext(item).epsg

class_count = len(class_names)

Expand Down
Loading