From 3b5578bfa2b9b1b0865f99bce92901cd6d771573 Mon Sep 17 00:00:00 2001 From: ssolson Date: Fri, 9 Aug 2024 09:03:20 -0400 Subject: [PATCH 1/2] 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 aac60a2d8226ed4c12983864f9249b38988bc947 Mon Sep 17 00:00:00 2001 From: ssolson Date: Fri, 9 Aug 2024 10:32:24 -0400 Subject: [PATCH 2/2] v0.8.2 --- mhkit/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mhkit/__init__.py b/mhkit/__init__.py index 82283fec3..116453146 100644 --- a/mhkit/__init__.py +++ b/mhkit/__init__.py @@ -17,7 +17,7 @@ # Ignore future warnings _warn.simplefilter(action="ignore", category=FutureWarning) -__version__ = "v0.8.1" +__version__ = "v0.8.2" __copyright__ = """ Copyright 2019, Alliance for Sustainable Energy, LLC under the terms of