From 3b5578bfa2b9b1b0865f99bce92901cd6d771573 Mon Sep 17 00:00:00 2001 From: ssolson Date: Fri, 9 Aug 2024 09:03:20 -0400 Subject: [PATCH 1/4] matplotlib >=3.8 --- environment.yml | 2 +- mhkit/wave/contours.py | 8 +------- requirements.txt | 2 +- setup.py | 2 +- 4 files changed, 4 insertions(+), 10 deletions(-) diff --git a/environment.yml b/environment.yml index ac679176d..ee1b37bf0 100644 --- a/environment.yml +++ b/environment.yml @@ -8,7 +8,7 @@ dependencies: - pandas>=1.0.0 - numpy>=1.21.0, <2.0.0 - scipy<=1.13.1 - - matplotlib + - matplotlib>=3.8.0 - requests - lxml - scikit-learn diff --git a/mhkit/wave/contours.py b/mhkit/wave/contours.py index 905c560b8..b2a054c4c 100644 --- a/mhkit/wave/contours.py +++ b/mhkit/wave/contours.py @@ -8,11 +8,8 @@ import numpy as np import warnings from mhkit.utils import to_numeric_array - import matplotlib -mpl_version = tuple(map(int, matplotlib.__version__.split("."))) - # Contours def environmental_contours(x1, x2, sea_state_duration, return_period, method, **kwargs): @@ -1696,10 +1693,7 @@ def _bivariate_KDE(x1, x2, bw, fit, nb_steps, Ndata_bivariate_KDE, kwargs): x1_bivariate_KDE = [] x2_bivariate_KDE = [] - if mpl_version < (3, 8): # For versions before 3.8 - segments = vals.allsegs[0] - else: - segments = [path.vertices for path in vals.get_paths()] + segments = [path.vertices for path in vals.get_paths()] for seg in segments: x1_bivariate_KDE.append(seg[:, 1]) diff --git a/requirements.txt b/requirements.txt index 381f1068f..1f68d7614 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,7 @@ pandas>=1.0.0 numpy>=1.21.0, <2.0.0 scipy<=1.13.1 -matplotlib +matplotlib>=3.8.0 requests pecos>=0.3.0 fatpack diff --git a/setup.py b/setup.py index c30ff2e9f..8d2825b3b 100644 --- a/setup.py +++ b/setup.py @@ -21,7 +21,7 @@ "pandas>=1.0.0", "numpy>=1.21.0, <2.0.0", "scipy<=1.13.1", - "matplotlib", + "matplotlib>=3.8.0", "requests", "pecos>=0.3.0", "fatpack", From 087aff3b309ebf887875d1f96dc09cf1fba329da Mon Sep 17 00:00:00 2001 From: ssolson Date: Mon, 14 Oct 2024 08:55:27 -0400 Subject: [PATCH 2/4] Disable Too many positional arguments --- mhkit/loads/graphics.py | 1 + 1 file changed, 1 insertion(+) diff --git a/mhkit/loads/graphics.py b/mhkit/loads/graphics.py index 26847f5ef..9cd835b81 100644 --- a/mhkit/loads/graphics.py +++ b/mhkit/loads/graphics.py @@ -113,6 +113,7 @@ def plot_statistics( # pylint: disable=R0913 +# pylint: disable=R0917 def plot_bin_statistics( bin_centers: np.ndarray, bin_mean: np.ndarray, From fa1c478096a5d1ca1e3406a691624e1a01d4f04b Mon Sep 17 00:00:00 2001 From: ssolson Date: Mon, 14 Oct 2024 08:56:38 -0400 Subject: [PATCH 3/4] increase CDIP time due to reoccuring failures --- .github/workflows/generate_notebook_matrix.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/generate_notebook_matrix.py b/.github/workflows/generate_notebook_matrix.py index 03a6b2ab4..b20e2f92b 100644 --- a/.github/workflows/generate_notebook_matrix.py +++ b/.github/workflows/generate_notebook_matrix.py @@ -11,7 +11,7 @@ "ADCP_Delft3D_TRTS_example.ipynb": 1200, "adcp_example.ipynb": 240, "adv_example.ipynb": 180, - "cdip_example.ipynb": 180, + "cdip_example.ipynb": 240, "Delft3D_example.ipynb": 180, "directional_waves.ipynb": 180, "environmental_contours_example.ipynb": 360, From 565cef439ae6918dc695d2f4a9911dabfe22d4e3 Mon Sep 17 00:00:00 2001 From: ssolson Date: Mon, 14 Oct 2024 09:37:52 -0400 Subject: [PATCH 4/4] increase cdip example time to 7 minutes --- .github/workflows/generate_notebook_matrix.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/generate_notebook_matrix.py b/.github/workflows/generate_notebook_matrix.py index b20e2f92b..02f81a00a 100644 --- a/.github/workflows/generate_notebook_matrix.py +++ b/.github/workflows/generate_notebook_matrix.py @@ -11,7 +11,7 @@ "ADCP_Delft3D_TRTS_example.ipynb": 1200, "adcp_example.ipynb": 240, "adv_example.ipynb": 180, - "cdip_example.ipynb": 240, + "cdip_example.ipynb": 420, "Delft3D_example.ipynb": 180, "directional_waves.ipynb": 180, "environmental_contours_example.ipynb": 360,