From 92141ef9c651125899d2005464e7a32cc1f69468 Mon Sep 17 00:00:00 2001 From: Rafael M Mudafort Date: Fri, 15 Nov 2024 12:42:42 -0600 Subject: [PATCH] Test on all supported Python versions (#1019) * Test on all supported Python versions Pages build and speed check are on the latest version only * Support Python 3.8 The pip to merge dicts is supported in Python 3.9+; replace with the dict.update method --- .github/workflows/check-working-examples.yaml | 2 +- .github/workflows/continuous-integration-workflow.yaml | 2 +- .github/workflows/deploy-pages.yaml | 2 +- .github/workflows/quality-metrics-workflow.yaml | 2 +- floris/flow_visualization.py | 5 +++-- 5 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/check-working-examples.yaml b/.github/workflows/check-working-examples.yaml index 032f77fc0..7580ae3b5 100644 --- a/.github/workflows/check-working-examples.yaml +++ b/.github/workflows/check-working-examples.yaml @@ -8,7 +8,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - python-version: ["3.9", "3.10", "3.11"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] os: [ubuntu-latest] #, macos-latest, windows-latest] fail-fast: False diff --git a/.github/workflows/continuous-integration-workflow.yaml b/.github/workflows/continuous-integration-workflow.yaml index 5e27b3c38..0035cdb0e 100644 --- a/.github/workflows/continuous-integration-workflow.yaml +++ b/.github/workflows/continuous-integration-workflow.yaml @@ -8,7 +8,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - python-version: ["3.8", "3.9", "3.10", "3.11"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] os: [ubuntu-latest] #, macos-latest, windows-latest] fail-fast: False env: diff --git a/.github/workflows/deploy-pages.yaml b/.github/workflows/deploy-pages.yaml index 3da057988..708ba1930 100644 --- a/.github/workflows/deploy-pages.yaml +++ b/.github/workflows/deploy-pages.yaml @@ -18,7 +18,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v4 with: - python-version: "3.10" + python-version: "3.13" - name: Install dependencies run: | diff --git a/.github/workflows/quality-metrics-workflow.yaml b/.github/workflows/quality-metrics-workflow.yaml index 3e8365ff0..f2b9a073f 100644 --- a/.github/workflows/quality-metrics-workflow.yaml +++ b/.github/workflows/quality-metrics-workflow.yaml @@ -8,7 +8,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - python-version: ["3.10"] + python-version: ["3.13"] os: [ubuntu-latest] fail-fast: False diff --git a/floris/flow_visualization.py b/floris/flow_visualization.py index 735dc9ddd..41c340ac2 100644 --- a/floris/flow_visualization.py +++ b/floris/flow_visualization.py @@ -760,8 +760,9 @@ def add_ref_lines( 'color': 'k', 'linewidth': 1.1 } - kwargs = default_params | kwargs + params = copy.deepcopy(default_params) + params.update(kwargs) for ax in self.axs[row]: for coordinate in ref_lines_D: - ax.plot([0.0, 1.0], [coordinate, coordinate], **kwargs) + ax.plot([0.0, 1.0], [coordinate, coordinate], **params)