From 0139aa278ffa93c68234eee583fd5d5f9b5b6af2 Mon Sep 17 00:00:00 2001 From: Filipe Fernandes Date: Thu, 7 Nov 2024 09:29:34 +0100 Subject: [PATCH 1/4] group GHA PRs --- .github/dependabot.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 563dd9b..7818bef 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -9,3 +9,7 @@ updates: interval: "daily" labels: - "Bot" + groups: + github-actions: + patterns: + - '*' From 12a8c68fe872c18912ac8a4d0e45723c0e592dbb Mon Sep 17 00:00:00 2001 From: Filipe Fernandes Date: Thu, 7 Nov 2024 09:33:01 +0100 Subject: [PATCH 2/4] remove micromamba --- .github/workflows/test_code_generation.yml | 30 ++++++++++------------ .github/workflows/tests.yml | 27 ++++++++----------- 2 files changed, 23 insertions(+), 34 deletions(-) diff --git a/.github/workflows/test_code_generation.yml b/.github/workflows/test_code_generation.yml index 651a98b..f002920 100644 --- a/.github/workflows/test_code_generation.yml +++ b/.github/workflows/test_code_generation.yml @@ -5,30 +5,26 @@ on: push: branches: [main] +defaults: + run: + shell: bash + jobs: code-generation: runs-on: ubuntu-latest - defaults: - run: - shell: bash -l {0} steps: - - name: checkout - uses: actions/checkout@v4 - with: - fetch-depth: 0 + - uses: actions/checkout@v4 - - name: Setup Micromamba - uses: mamba-org/setup-micromamba@v2 + - name: Set up Python + uses: actions/setup-python@v5 with: - environment-name: TEST - init-shell: bash - create-args: >- - python=3 - python-build - numpy - --file requirements-dev.txt - --channel conda-forge + python-version: "3.x" + + - name: Install gsw + run: > + python -m pip install -r requirements-dev.txt + && python -m pip install -e . - name: Test Code Generation run: > diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 1666b82..91926de 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -5,6 +5,10 @@ on: push: branches: [main] +defaults: + run: + shell: bash + jobs: run: runs-on: ${{ matrix.os }} @@ -12,31 +16,20 @@ jobs: matrix: python-version: [ "3.9", "3.10", "3.11", "3.12" ] os: [ windows-latest, ubuntu-latest, macos-latest ] - # Oldest one based on NEP-29 and latest one. - # See https://numpy.org/neps/nep-0029-deprecation_policy.html - numpy-version: ["1.23", "1.26"] - exclude: - - python-version: "3.12" - numpy-version: "1.23" fail-fast: false - defaults: - run: - shell: bash -l {0} steps: - uses: actions/checkout@v4 - - name: Setup Micromamba Python ${{ matrix.python-version }} numpy ${{ matrix.numpy-version }} - uses: mamba-org/setup-micromamba@v2 + - name: Set up Python + uses: actions/setup-python@v5 with: - environment-name: TEST - init-shell: bash - create-args: >- - python=${{ matrix.python-version }} python-build numpy=${{ matrix.numpy-version }} --file requirements-dev.txt --channel conda-forge + python-version: ${{ matrix.python-version }} - name: Install gsw - run: | - python -m pip install -e . --no-deps --force-reinstall + run: > + python -m pip install -r requirements-dev.txt + && python -m pip install -e . - name: Tests run: | From 45297bcb1fa1715ac66a4beb51a80ae8c558f757 Mon Sep 17 00:00:00 2001 From: Filipe Fernandes Date: Thu, 7 Nov 2024 09:40:28 +0100 Subject: [PATCH 3/4] add numpy to the test matrix --- .github/workflows/tests.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 91926de..44f5cee 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -16,6 +16,9 @@ jobs: matrix: python-version: [ "3.9", "3.10", "3.11", "3.12" ] os: [ windows-latest, ubuntu-latest, macos-latest ] + # Oldest one based on NEP-29 and latest one. + # See https://numpy.org/neps/nep-0029-deprecation_policy.html + numpy-version: ["1.23", "1.26"] fail-fast: false steps: @@ -30,6 +33,7 @@ jobs: run: > python -m pip install -r requirements-dev.txt && python -m pip install -e . + && python -m pip install numpy==${{ matrix.numpy-version }} - name: Tests run: | From 4515482e2775c3ab661cb4991cc4abed28e9c6ba Mon Sep 17 00:00:00 2001 From: Filipe Fernandes Date: Thu, 7 Nov 2024 10:20:14 +0100 Subject: [PATCH 4/4] NEP29 was superseded by SPEC0 --- .github/workflows/tests.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 44f5cee..545d9e0 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -16,9 +16,11 @@ jobs: matrix: python-version: [ "3.9", "3.10", "3.11", "3.12" ] os: [ windows-latest, ubuntu-latest, macos-latest ] - # Oldest one based on NEP-29 and latest one. - # See https://numpy.org/neps/nep-0029-deprecation_policy.html - numpy-version: ["1.23", "1.26"] + # https://scientific-python.org/specs/spec-0000/ + numpy-version: ["==1.24", ">=2"] + exclude: + - python-version: "3.12" + numpy-version: "==1.24" fail-fast: false steps: @@ -33,7 +35,7 @@ jobs: run: > python -m pip install -r requirements-dev.txt && python -m pip install -e . - && python -m pip install numpy==${{ matrix.numpy-version }} + && python -m pip install numpy${{ matrix.numpy-version }} - name: Tests run: |