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

Bugfx/force numpy version #128

Merged
merged 2 commits into from
Aug 19, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion build-test.bat
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ for %%f in (dist\*.whl) do (

pip install %WHEEL_FILE%

ripple1d start --flask_debug
@REM ripple1d start --flask_debug
20 changes: 11 additions & 9 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "ripple1d"
version = "0.4.0-rc"
version = "0.4.0"
description = "HEC-RAS model automation"
readme = "README.md"
maintainers = [
Expand All @@ -24,21 +24,23 @@ classifiers = [
]

dependencies = [
"boto3",
"boto3==1.35.0",
"contextily==1.6.0",
"python-dotenv",
"flask>=3.0.3",
"fiona>=1.9.6",
"h5py>=3.11.0",
"flask==3.0.3",
"fiona==1.9.6",
"h5py==3.11.0",
"huey==2.5.1",
"geopandas>=1.0.0",
"matplotlib>=3.9.0",
"geopandas==1.0.1",
"matplotlib==3.9.0",
"mypy_boto3_s3==1.34.120",
"numpy==2.0.1",
"psutil==6.0.0",
"pystac>=1.10.0",
"pystac==1.10.0",
"pyarrow==16.1.0",
"rasterio==1.3.10",
"requests>=2.32.3",
"requests==2.32.3",
"shapely==2.0.5",
"pywin32==306"
]

Expand Down
1 change: 0 additions & 1 deletion ripple1d/__version__.py

This file was deleted.

9 changes: 7 additions & 2 deletions ripple1d/api/postman_collection.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"info": {
"_postman_id": "9c07b074-5f35-4309-bbaf-3ed3f1aec045",
"name": "ripple1d",
"description": "Collection for processing existing HEC-RAS models for use in the production of Flood Inundation Maps (FIMs) and rating curves for use in near-real time flood forecasting on the NOAA National Water Model networkEndFragment",
"description": "Collection for processing existing HEC-RAS models for use in the production of Flood Inundation Maps (FIMs) and rating curves for use in near-real time flood forecasting on the NOAA National Water Model",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
"_exporter_id": "11115435"
},
Expand Down Expand Up @@ -75,7 +75,7 @@
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"source_model_directory\": \"C:\\\\Users\\\\mdeshotel\\\\Downloads\\\\12040101_Models\\\\ripple1d\\\\tests\\\\ras-data\\\\Baxter\",\r\n \"submodel_directory\": \"{{submodels_base_directory}}\\\\{{nwm_reach_id}}\",\r\n \"nwm_id\": \"{{nwm_reach_id}}\"\r\n}",
"raw": "{\r\n \"source_model_directory\": \"{{source_model_directory}}\",\r\n \"submodel_directory\": \"{{submodels_base_directory}}\\\\{{nwm_reach_id}}\",\r\n \"nwm_id\": \"{{nwm_reach_id}}\"\r\n}",
"options": {
"raw": {
"language": "json"
Expand Down Expand Up @@ -500,6 +500,11 @@
"key": "jobID",
"value": "",
"type": "string"
},
{
"key": "source_model_directory",
"value": "~\\\\repos\\\\ripple1d\\\\tests\\\\ras-data\\\\Baxter",
"type": "string"
}
]
}
7 changes: 4 additions & 3 deletions tests/conflation_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
import geopandas as gpd
import pandas as pd
import pytest
from shapely.geometry import LineString, MultiLineString, Point, Polygon

from ripple1d.conflate.rasfim import (
RasFimConflater,
cacl_avg_nearest_points,
Expand All @@ -15,15 +17,14 @@
nearest_line_to_point,
)
from ripple1d.ops.ras_conflate import conflate
from shapely.geometry import LineString, MultiLineString, Point, Polygon

TEST_DIR = os.path.dirname(__file__)
TEST_ITEM_FILE = "ras-data/Baxter.json"
TEST_ITEM_PATH = os.path.join(TEST_DIR, TEST_ITEM_FILE)

# Expected counts
NWM_REACHES = 36
LOCAL_NWM_REACHES = 16
LOCAL_NWM_REACHES = 18
RAS_CENTERLINES = 3
RAS_XS = 173
GAGES = 1
Expand Down Expand Up @@ -77,7 +78,7 @@ def test_nwm_reaches_exist(self):

def test_local_nwm_reaches_exist(self):
local_reaches = self.conflater.local_nwm_reaches
self.assertEqual(local_reaches.shape[0], LOCAL_NWM_REACHES)
self.assertEqual(local_reaches().shape[0], LOCAL_NWM_REACHES)

def test_local_gages_exist(self):
gages = self.conflater.local_gages
Expand Down
24 changes: 12 additions & 12 deletions tests/ras-data/Baxter/Baxter.conflation.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"nwm_to_id": "2820002",
"gage": "11290000",
"gage_url": "https://waterdata.usgs.gov/nwis/uv?site_no=11290000&legacy=1",
"source_nwm_reach": "C:\\Users\\mdeshotel\\Downloads\\nwm_flows_v3.parquet"
"source_nwm_reach": "nwm_flows_v3.parquet"
},
"2826228": {
"us_xs": {
Expand All @@ -39,7 +39,7 @@
"low_flow_cfs": 5668,
"high_flow_cfs": 19588,
"nwm_to_id": "2823932",
"source_nwm_reach": "C:\\Users\\mdeshotel\\Downloads\\nwm_flows_v3.parquet"
"source_nwm_reach": "nwm_flows_v3.parquet"
},
"2823932": {
"us_xs": {
Expand All @@ -59,7 +59,7 @@
"low_flow_cfs": 5669,
"high_flow_cfs": 19588,
"nwm_to_id": "2826230",
"source_nwm_reach": "C:\\Users\\mdeshotel\\Downloads\\nwm_flows_v3.parquet"
"source_nwm_reach": "nwm_flows_v3.parquet"
},
"2823960": {
"us_xs": {
Expand All @@ -79,7 +79,7 @@
"low_flow_cfs": 5694,
"high_flow_cfs": 19607,
"nwm_to_id": "2823972",
"source_nwm_reach": "C:\\Users\\mdeshotel\\Downloads\\nwm_flows_v3.parquet"
"source_nwm_reach": "nwm_flows_v3.parquet"
},
"2826230": {
"us_xs": {
Expand All @@ -99,7 +99,7 @@
"low_flow_cfs": 5671,
"high_flow_cfs": 19588,
"nwm_to_id": "2823934",
"source_nwm_reach": "C:\\Users\\mdeshotel\\Downloads\\nwm_flows_v3.parquet"
"source_nwm_reach": "nwm_flows_v3.parquet"
},
"2823934": {
"us_xs": {
Expand All @@ -119,7 +119,7 @@
"low_flow_cfs": 5672,
"high_flow_cfs": 19589,
"nwm_to_id": "2826224",
"source_nwm_reach": "C:\\Users\\mdeshotel\\Downloads\\nwm_flows_v3.parquet"
"source_nwm_reach": "nwm_flows_v3.parquet"
},
"2826224": {
"us_xs": {
Expand All @@ -139,7 +139,7 @@
"low_flow_cfs": 5673,
"high_flow_cfs": 19588,
"nwm_to_id": "2823960",
"source_nwm_reach": "C:\\Users\\mdeshotel\\Downloads\\nwm_flows_v3.parquet"
"source_nwm_reach": "nwm_flows_v3.parquet"
},
"2823920": {
"us_xs": {
Expand All @@ -159,7 +159,7 @@
"low_flow_cfs": 550,
"high_flow_cfs": 9392,
"nwm_to_id": "2823972",
"source_nwm_reach": "C:\\Users\\mdeshotel\\Downloads\\nwm_flows_v3.parquet"
"source_nwm_reach": "nwm_flows_v3.parquet"
},
"2821866": {
"us_xs": {
Expand All @@ -179,7 +179,7 @@
"low_flow_cfs": 5707,
"high_flow_cfs": 21516,
"nwm_to_id": "2820026",
"source_nwm_reach": "C:\\Users\\mdeshotel\\Downloads\\nwm_flows_v3.parquet"
"source_nwm_reach": "nwm_flows_v3.parquet"
},
"2820012": {
"us_xs": {
Expand All @@ -199,7 +199,7 @@
"low_flow_cfs": 5707,
"high_flow_cfs": 21520,
"nwm_to_id": "2821866",
"source_nwm_reach": "C:\\Users\\mdeshotel\\Downloads\\nwm_flows_v3.parquet"
"source_nwm_reach": "nwm_flows_v3.parquet"
},
"2820006": {
"us_xs": {
Expand All @@ -219,7 +219,7 @@
"low_flow_cfs": 5707,
"high_flow_cfs": 21527,
"nwm_to_id": "2820012",
"source_nwm_reach": "C:\\Users\\mdeshotel\\Downloads\\nwm_flows_v3.parquet"
"source_nwm_reach": "nwm_flows_v3.parquet"
},
"2820002": {
"us_xs": {
Expand All @@ -239,6 +239,6 @@
"low_flow_cfs": 5707,
"high_flow_cfs": 21526,
"nwm_to_id": "2820006",
"source_nwm_reach": "C:\\Users\\mdeshotel\\Downloads\\nwm_flows_v3.parquet"
"source_nwm_reach": "nwm_flows_v3.parquet"
}
}
2 changes: 1 addition & 1 deletion tests/ras-data/MissFldwy/MissFldwy.conflation.json

Large diffs are not rendered by default.

Loading