From 97e4d4eb0578efd6856fc16044958c81b4bdddad Mon Sep 17 00:00:00 2001 From: William Pringle Date: Mon, 27 Mar 2023 10:42:00 -0500 Subject: [PATCH 1/5] suggest change to be able to use StormEvents >=v2 otherwise I get conflicts with EnsemblePerturbation when I try to use >=v2 StormEvents --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index d220f0c1..ed624bfa 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = 'adcircpy' -version = '0.0.0' +version = '1.2.3' description = 'Python package for working with ADCIRC input and output files' authors = ['Zach Burnett ', 'Jaime R Calzada '] license = 'GPL-3.0-or-later' @@ -34,7 +34,7 @@ pyproj = '>=2.6' requests = '*' scipy = '*' shapely = '*' -stormevents = '^1.4.0' +stormevents = '>=1.4.0' typepigeon = '<2' # newer versions require code update utm = '*' isort = { version = '*', optional = true } From 73a22054fcd20a566cedebf56373b59c9c67389b Mon Sep 17 00:00:00 2001 From: Soroosh Mani <77082694+SorooshMani-NOAA@users.noreply.github.com> Date: Mon, 27 Mar 2023 13:07:57 -0400 Subject: [PATCH 2/5] Fixing test failures --- .github/workflows/quick_test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/quick_test.yml b/.github/workflows/quick_test.yml index a7318fe6..c7ac08ee 100644 --- a/.github/workflows/quick_test.yml +++ b/.github/workflows/quick_test.yml @@ -51,6 +51,7 @@ jobs: key: test-${{ runner.os }}-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml') }} - name: install dependencies run: | + sudo apt update sudo apt install libhdf5-dev sudo apt install libnetcdf-dev pip install ".[testing]" From b4046eb810ff7e6193d1a684f892342592d63415 Mon Sep 17 00:00:00 2001 From: Soroosh Mani <77082694+SorooshMani-NOAA@users.noreply.github.com> Date: Mon, 27 Mar 2023 13:10:37 -0400 Subject: [PATCH 3/5] Fixing CI tests --- .github/workflows/tests.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 34ad1d37..05a80927 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -63,6 +63,7 @@ jobs: key: test-${{ runner.os }}-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml') }} - name: install linux dependencies run: | + sudo apt update sudo apt install libhdf5-dev sudo apt install libnetcdf-dev if: runner.os == 'Linux' @@ -92,6 +93,7 @@ jobs: key: test-${{ runner.os }}-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml') }} - name: install linux dependencies run: | + sudo apt update sudo apt install libhdf5-dev sudo apt install libnetcdf-dev if: runner.os == 'Linux' From becd9025de0c233de88c5fa373b84378f6aaf0f6 Mon Sep 17 00:00:00 2001 From: "Soroosh.Mani" Date: Mon, 27 Mar 2023 13:39:23 -0400 Subject: [PATCH 4/5] Use latest stormevents --- adcircpy/cmd/plot_fort61.py | 2 +- adcircpy/fort15.py | 2 +- pyproject.toml | 7 +- .../test_Stations/stations_1.fort.15 | 104 +++++++++--------- .../test_Stations/stations_2.fort.15 | 26 ++--- .../test_Stations/stations_3.fort.15 | 8 +- 6 files changed, 75 insertions(+), 74 deletions(-) diff --git a/adcircpy/cmd/plot_fort61.py b/adcircpy/cmd/plot_fort61.py index 1f85f842..dc10f780 100644 --- a/adcircpy/cmd/plot_fort61.py +++ b/adcircpy/cmd/plot_fort61.py @@ -5,7 +5,7 @@ import matplotlib.pyplot as plt import pandas -from stormevents.coops import COOPS_Station +from searvey.coops import COOPS_Station from adcircpy.outputs import Fort61 diff --git a/adcircpy/fort15.py b/adcircpy/fort15.py index 3839cef8..8e696105 100644 --- a/adcircpy/fort15.py +++ b/adcircpy/fort15.py @@ -13,7 +13,7 @@ from shapely import ops from shapely.geometry import MultiPolygon, Polygon from shapely.geometry.base import BaseGeometry -from stormevents.coops import coops_stations, coops_stations_within_region +from searvey.coops import coops_stations, coops_stations_within_region from stormevents.nhc import VortexTrack import typepigeon diff --git a/pyproject.toml b/pyproject.toml index ed624bfa..1f5ed460 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = 'adcircpy' -version = '1.2.3' +version = '0.0.0' description = 'Python package for working with ADCIRC input and output files' authors = ['Zach Burnett ', 'Jaime R Calzada '] license = 'GPL-3.0-or-later' @@ -19,7 +19,7 @@ build-backend = 'poetry.core.masonry.api' enable = true [tool.poetry.dependencies] -python = '^3.6' +python = '^3.8' appdirs = '*' geopandas = '<0.11' haversine = '*' @@ -33,8 +33,9 @@ psutil = '*' pyproj = '>=2.6' requests = '*' scipy = '*' +searvey = '*' shapely = '*' -stormevents = '>=1.4.0' +stormevents = '>=2' typepigeon = '<2' # newer versions require code update utm = '*' isort = { version = '*', optional = true } diff --git a/tests/data/reference/test_Stations/stations_1.fort.15 b/tests/data/reference/test_Stations/stations_1.fort.15 index efe528ce..7417232f 100644 --- a/tests/data/reference/test_Stations/stations_1.fort.15 +++ b/tests/data/reference/test_Stations/stations_1.fort.15 @@ -1,56 +1,56 @@ 13 ! NSTAE --75.75 36.1875 ! 8651370 --75.5625 35.78125 ! 8652587 --75.6875 35.21875 ! 8654467 --76.6875 34.71875 ! 8656483 --77.9375 34.21875 ! 8658120 --77.8125 34.21875 ! 8658163 --78.9375 33.65625 ! 8661070 --79.9375 32.78125 ! 8665530 --80.875 32.03125 ! 8670870 --79.6875 32.84375 ! 8664941 --80.4375 32.34375 ! 8668498 --78.5 33.875 ! 8659897 --75.625 35.21875 ! 8654400 +-75.74669647216797 36.18330001831055 ! 8651370 +-75.54818725585938 35.79568862915039 ! 8652587 +-75.70419311523438 35.20861053466797 ! 8654467 +-76.67066192626953 34.71733093261719 ! 8656483 +-77.95361328125 34.227500915527344 ! 8658120 +-77.78668975830078 34.21331024169922 ! 8658163 +-78.91638946533203 33.65549850463867 ! 8661070 +-79.9236068725586 32.78083038330078 ! 8665530 +-80.90303039550781 32.034690856933594 ! 8670870 +-79.70670318603516 32.8567008972168 ! 8664941 +-80.46499633789062 32.34000015258789 ! 8668498 +-78.50669860839844 33.8650016784668 ! 8659897 +-75.63500213623047 35.22330093383789 ! 8654400 13 ! NSTAV --75.75 36.1875 ! 8651370 --75.5625 35.78125 ! 8652587 --75.6875 35.21875 ! 8654467 --76.6875 34.71875 ! 8656483 --77.9375 34.21875 ! 8658120 --77.8125 34.21875 ! 8658163 --78.9375 33.65625 ! 8661070 --79.9375 32.78125 ! 8665530 --80.875 32.03125 ! 8670870 --79.6875 32.84375 ! 8664941 --80.4375 32.34375 ! 8668498 --78.5 33.875 ! 8659897 --75.625 35.21875 ! 8654400 +-75.74669647216797 36.18330001831055 ! 8651370 +-75.54818725585938 35.79568862915039 ! 8652587 +-75.70419311523438 35.20861053466797 ! 8654467 +-76.67066192626953 34.71733093261719 ! 8656483 +-77.95361328125 34.227500915527344 ! 8658120 +-77.78668975830078 34.21331024169922 ! 8658163 +-78.91638946533203 33.65549850463867 ! 8661070 +-79.9236068725586 32.78083038330078 ! 8665530 +-80.90303039550781 32.034690856933594 ! 8670870 +-79.70670318603516 32.8567008972168 ! 8664941 +-80.46499633789062 32.34000015258789 ! 8668498 +-78.50669860839844 33.8650016784668 ! 8659897 +-75.63500213623047 35.22330093383789 ! 8654400 13 ! NSTAC --75.75 36.1875 ! 8651370 --75.5625 35.78125 ! 8652587 --75.6875 35.21875 ! 8654467 --76.6875 34.71875 ! 8656483 --77.9375 34.21875 ! 8658120 --77.8125 34.21875 ! 8658163 --78.9375 33.65625 ! 8661070 --79.9375 32.78125 ! 8665530 --80.875 32.03125 ! 8670870 --79.6875 32.84375 ! 8664941 --80.4375 32.34375 ! 8668498 --78.5 33.875 ! 8659897 --75.625 35.21875 ! 8654400 +-75.74669647216797 36.18330001831055 ! 8651370 +-75.54818725585938 35.79568862915039 ! 8652587 +-75.70419311523438 35.20861053466797 ! 8654467 +-76.67066192626953 34.71733093261719 ! 8656483 +-77.95361328125 34.227500915527344 ! 8658120 +-77.78668975830078 34.21331024169922 ! 8658163 +-78.91638946533203 33.65549850463867 ! 8661070 +-79.9236068725586 32.78083038330078 ! 8665530 +-80.90303039550781 32.034690856933594 ! 8670870 +-79.70670318603516 32.8567008972168 ! 8664941 +-80.46499633789062 32.34000015258789 ! 8668498 +-78.50669860839844 33.8650016784668 ! 8659897 +-75.63500213623047 35.22330093383789 ! 8654400 13 ! NSTAM --75.75 36.1875 ! 8651370 --75.5625 35.78125 ! 8652587 --75.6875 35.21875 ! 8654467 --76.6875 34.71875 ! 8656483 --77.9375 34.21875 ! 8658120 --77.8125 34.21875 ! 8658163 --78.9375 33.65625 ! 8661070 --79.9375 32.78125 ! 8665530 --80.875 32.03125 ! 8670870 --79.6875 32.84375 ! 8664941 --80.4375 32.34375 ! 8668498 --78.5 33.875 ! 8659897 --75.625 35.21875 ! 8654400 \ No newline at end of file +-75.74669647216797 36.18330001831055 ! 8651370 +-75.54818725585938 35.79568862915039 ! 8652587 +-75.70419311523438 35.20861053466797 ! 8654467 +-76.67066192626953 34.71733093261719 ! 8656483 +-77.95361328125 34.227500915527344 ! 8658120 +-77.78668975830078 34.21331024169922 ! 8658163 +-78.91638946533203 33.65549850463867 ! 8661070 +-79.9236068725586 32.78083038330078 ! 8665530 +-80.90303039550781 32.034690856933594 ! 8670870 +-79.70670318603516 32.8567008972168 ! 8664941 +-80.46499633789062 32.34000015258789 ! 8668498 +-78.50669860839844 33.8650016784668 ! 8659897 +-75.63500213623047 35.22330093383789 ! 8654400 \ No newline at end of file diff --git a/tests/data/reference/test_Stations/stations_2.fort.15 b/tests/data/reference/test_Stations/stations_2.fort.15 index 5cf37209..3eb6b87a 100644 --- a/tests/data/reference/test_Stations/stations_2.fort.15 +++ b/tests/data/reference/test_Stations/stations_2.fort.15 @@ -1,14 +1,14 @@ 13 ! NSTAE --75.75 36.1875 ! 8651370 --75.5625 35.78125 ! 8652587 --75.6875 35.21875 ! 8654467 --76.6875 34.71875 ! 8656483 --77.9375 34.21875 ! 8658120 --77.8125 34.21875 ! 8658163 --78.9375 33.65625 ! 8661070 --79.9375 32.78125 ! 8665530 --80.875 32.03125 ! 8670870 --79.6875 32.84375 ! 8664941 --80.4375 32.34375 ! 8668498 --78.5 33.875 ! 8659897 --75.625 35.21875 ! 8654400 \ No newline at end of file +-75.74669647216797 36.18330001831055 ! 8651370 +-75.54818725585938 35.79568862915039 ! 8652587 +-75.70419311523438 35.20861053466797 ! 8654467 +-76.67066192626953 34.71733093261719 ! 8656483 +-77.95361328125 34.227500915527344 ! 8658120 +-77.78668975830078 34.21331024169922 ! 8658163 +-78.91638946533203 33.65549850463867 ! 8661070 +-79.9236068725586 32.78083038330078 ! 8665530 +-80.90303039550781 32.034690856933594 ! 8670870 +-79.70670318603516 32.8567008972168 ! 8664941 +-80.46499633789062 32.34000015258789 ! 8668498 +-78.50669860839844 33.8650016784668 ! 8659897 +-75.63500213623047 35.22330093383789 ! 8654400 \ No newline at end of file diff --git a/tests/data/reference/test_Stations/stations_3.fort.15 b/tests/data/reference/test_Stations/stations_3.fort.15 index 6b2eca6e..89adad08 100644 --- a/tests/data/reference/test_Stations/stations_3.fort.15 +++ b/tests/data/reference/test_Stations/stations_3.fort.15 @@ -1,6 +1,6 @@ 3 ! NSTAE --77.9375 34.21875 ! 8658120 --80.875 32.03125 ! 8670870 --75.5625 35.78125 ! 8652587 +-77.95361328125 34.227500915527344 ! 8658120 +-80.90303039550781 32.034690856933594 ! 8670870 +-75.54818725585938 35.79568862915039 ! 8652587 1 ! NSTAV --77.9375 34.21875 ! 8658120 \ No newline at end of file +-77.95361328125 34.227500915527344 ! 8658120 \ No newline at end of file From 153f0fd06d27a25a9162f9413e59565a5905e218 Mon Sep 17 00:00:00 2001 From: "Soroosh.Mani" Date: Mon, 27 Mar 2023 13:45:57 -0400 Subject: [PATCH 5/5] Remove python 3.7 as searvey doesn't support it --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 05a80927..f8295a56 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -44,7 +44,7 @@ jobs: strategy: matrix: os: [ ubuntu-latest, macos-latest ] - python-version: [ '3.7', '3.8', '3.9', '3.x' ] + python-version: [ '3.8', '3.9', '3.x' ] exclude: - os: macos-latest python-version: '3.x'