From 638f6f02cb09c01e8d40b04fab17b718680b4745 Mon Sep 17 00:00:00 2001 From: Josh Cunningham Date: Tue, 3 Sep 2024 16:34:19 -0500 Subject: [PATCH] remove fiona dep, require non-dev geopandas --- .github/workflows/ubuntu-latest.yml | 2 +- src/troute-network/pyproject.toml | 3 +-- src/troute-network/troute/HYFeaturesNetwork.py | 4 +--- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ubuntu-latest.yml b/.github/workflows/ubuntu-latest.yml index 8746a6637..c38f46157 100644 --- a/.github/workflows/ubuntu-latest.yml +++ b/.github/workflows/ubuntu-latest.yml @@ -40,7 +40,7 @@ jobs: sudo apt-get install libstdc++-10-dev libgfortran-10-dev glibc-source openmpi-bin openmpi-common libopenmpi-dev libopenmpi3 libgtk-3-bin libgtk-3-common libgtk-3-dev -y sudo apt-get install netcdf-bin libnetcdf-dev libnetcdff-dev libnetcdf-c++4 libnetcdf-c++4-dev -y python -m pip install --upgrade pip - pip3 install wheel dask pyproj fiona bmipy opencv-contrib-python-headless + pip3 install wheel dask pyproj bmipy opencv-contrib-python-headless if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - name: Install t-route diff --git a/src/troute-network/pyproject.toml b/src/troute-network/pyproject.toml index 77ad761c0..cd498a035 100644 --- a/src/troute-network/pyproject.toml +++ b/src/troute-network/pyproject.toml @@ -7,8 +7,7 @@ name = "troute.network" version = "0.0.0" dependencies = [ "deprecated", - "geopandas", - "fiona", + "geopandas>=1.0.0", "joblib", "netcdf4", "numpy", diff --git a/src/troute-network/troute/HYFeaturesNetwork.py b/src/troute-network/troute/HYFeaturesNetwork.py index fb8a19225..6d0a6e027 100644 --- a/src/troute-network/troute/HYFeaturesNetwork.py +++ b/src/troute-network/troute/HYFeaturesNetwork.py @@ -10,10 +10,8 @@ from joblib import delayed, Parallel from collections import defaultdict import xarray as xr -from datetime import datetime from pprint import pformat import os -import fiona import troute.nhd_io as nhd_io #FIXME from troute.nhd_network import reverse_dict, extract_connections, reverse_network, reachable from .rfc_lake_gage_crosswalk import get_rfc_lake_gage_crosswalk, get_great_lakes_climatology @@ -32,7 +30,7 @@ def find_layer_name(layers, pattern): def read_geopkg(file_path, compute_parameters, waterbody_parameters, cpu_pool): # Retrieve available layers from the GeoPackage - available_layers = fiona.listlayers(file_path) + available_layers = gpd.list_layers(file_path) # patterns for the layers we want to find layer_patterns = {