From 677ae840b1d466a82bf1b332d1d6e0101135ad31 Mon Sep 17 00:00:00 2001 From: Filippo Gori <79844904+fg320@users.noreply.github.com> Date: Fri, 8 Dec 2023 20:02:57 +0000 Subject: [PATCH] Bug fix: GCH effective yaw angle in FLORIS v2 (#734) * bug fix: GCH effective yaw angle * Update the minimum supported Python versions * Change sklearn to scikit-learn As an installable package, sklearn is deprecated and the package is now called scikit-learn * Wrap Python versions in quotes * Ignore codecov upload failure --------- Co-authored-by: Rafael M Mudafort --- .github/workflows/continuous-integration-workflow.yaml | 4 ++-- floris/simulation/wake_deflection/gauss.py | 2 +- requirements.txt | 2 +- setup.py | 6 +++--- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/continuous-integration-workflow.yaml b/.github/workflows/continuous-integration-workflow.yaml index c35913ae9..00376d66c 100644 --- a/.github/workflows/continuous-integration-workflow.yaml +++ b/.github/workflows/continuous-integration-workflow.yaml @@ -23,7 +23,7 @@ jobs: strategy: matrix: # 3.5 fails with a bad comparison in TurbineMap unit tests - python-version: [3.6, 3.7, 3.8, 3.9] # 3.5 + python-version: ["3.8", "3.9", "3.10", "3.11"] # windows-latest fails in codecov os: [ubuntu-latest, macos-latest] fail-fast: False @@ -60,4 +60,4 @@ jobs: uses: codecov/codecov-action@v1 with: token: ${{ secrets.CODECOV_TOKEN }} - fail_ci_if_error: true + fail_ci_if_error: false diff --git a/floris/simulation/wake_deflection/gauss.py b/floris/simulation/wake_deflection/gauss.py index 4209b2938..e23da1545 100644 --- a/floris/simulation/wake_deflection/gauss.py +++ b/floris/simulation/wake_deflection/gauss.py @@ -348,7 +348,7 @@ def calculate_effective_yaw_angle( yaw_effective = max_yaw # check edge case, if true, assign min yaw value elif idx_1 == 0 or idx_2 == 0: - yaw_effective = -min_yaw + yaw_effective = min_yaw # for each identified minimum residual, use adjacent points to determine # two equations of line and find the intersection of the two lines to # determine the effective yaw angle to add; the if/else structure is based diff --git a/requirements.txt b/requirements.txt index 2661759e4..327aea187 100644 --- a/requirements.txt +++ b/requirements.txt @@ -10,7 +10,7 @@ scipy>=1.1 pandas>=0.24 pyproj>=2.1 seaborn>=0.9 -sklearn>=0.0 +scikit-learn shapely>=1.7.1 # utilities diff --git a/setup.py b/setup.py index 334b8627f..ad5ff61f3 100644 --- a/setup.py +++ b/setup.py @@ -34,7 +34,7 @@ URL = "https://github.com/NREL/FLORIS" EMAIL = "rafael.mudafort@nrel.gov" AUTHOR = "NREL National Wind Technology Center" -REQUIRES_PYTHON = ">=3.6.0" +REQUIRES_PYTHON = ">=3.8.0" # What packages are required for this module to be executed? REQUIRED = [ @@ -48,7 +48,7 @@ "pandas>=0.24", "pyproj>=2.1", "seaborn>=0.9", - "sklearn>=0.0", + "scikit-learn", "shapely>=1.7.1", ] @@ -105,7 +105,7 @@ "License :: OSI Approved :: Apache Software License", "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.8", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", ],