From 919c57bfe4e2552b17f2dfe3f6bdc3b48ea96777 Mon Sep 17 00:00:00 2001 From: Chuck Daniels Date: Mon, 13 May 2024 18:04:21 -0400 Subject: [PATCH] Add Python 3.12 to test matrix Fixes #457 --- .github/workflows/integration-test.yml | 20 +++++++++++++------- .github/workflows/test.yml | 20 +++++++++++++------- CHANGELOG.md | 6 ++++-- pyproject.toml | 4 +++- 4 files changed, 33 insertions(+), 17 deletions(-) diff --git a/.github/workflows/integration-test.yml b/.github/workflows/integration-test.yml index 8b47f607..217cad3b 100644 --- a/.github/workflows/integration-test.yml +++ b/.github/workflows/integration-test.yml @@ -17,12 +17,16 @@ concurrency: group: integration-tests-${{ github.ref }} cancel-in-progress: true +defaults: + run: + shell: bash -l {0} + jobs: - test: + integration-tests: runs-on: ubuntu-latest strategy: matrix: - python-version: [3.8, 3.9, "3.10", "3.11"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] fail-fast: false steps: @@ -35,17 +39,17 @@ jobs: id: full-python-version run: echo ::set-output name=version::$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info))") - name: Install poetry - run: | - curl -sSL https://install.python-poetry.org | python3 - - echo "$HOME/.poetry/bin" >> $GITHUB_PATH + uses: abatilo/actions-poetry@v3 - name: Configure poetry - run: poetry config virtualenvs.in-project true + run: | + poetry config virtualenvs.create true --local + poetry config virtualenvs.in-project true --local - name: Set up cache uses: actions/cache@v4 id: cache with: path: .venv - key: venv-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('**/poetry.lock') }} + key: venv-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('poetry.lock') }} - name: Ensure cache is healthy if: steps.cache.outputs.cache-hit == 'true' run: poetry run pip --version >/dev/null 2>&1 || rm -rf .venv @@ -59,4 +63,6 @@ jobs: EARTHACCESS_TEST_PASSWORD: ${{ secrets.EDL_PASSWORD }} run: poetry run bash scripts/integration-test.sh - name: Upload coverage + # Don't upload coverage when using the `act` tool to run the workflow locally + if: ${{ !env.ACT }} uses: codecov/codecov-action@v4 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c0939e49..44b332c0 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -5,12 +5,16 @@ on: pull_request: types: [opened, synchronize] +defaults: + run: + shell: bash -l {0} + jobs: - test: + unit-tests: runs-on: ubuntu-latest strategy: matrix: - python-version: [3.8, 3.9, "3.10", "3.11"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] fail-fast: false steps: @@ -23,17 +27,17 @@ jobs: id: full-python-version run: echo "version=$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info))")" >> $GITHUB_OUTPUT - name: Install poetry - run: | - curl -sSL https://install.python-poetry.org | python3 - - echo "$HOME/.poetry/bin" >> $GITHUB_PATH + uses: abatilo/actions-poetry@v3 - name: Configure poetry - run: poetry config virtualenvs.in-project true + run: | + poetry config virtualenvs.create true --local + poetry config virtualenvs.in-project true --local - name: Set up cache uses: actions/cache@v4 id: cache with: path: .venv - key: venv-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('**/poetry.lock') }} + key: venv-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('poetry.lock') }} - name: Ensure cache is healthy if: steps.cache.outputs.cache-hit == 'true' run: poetry run pip --version >/dev/null 2>&1 || rm -rf .venv @@ -42,4 +46,6 @@ jobs: - name: Test run: poetry run bash scripts/test.sh - name: Upload coverage + # Don't upload coverage when using the `act` tool to run the workflow locally + if: ${{ !env.ACT }} uses: codecov/codecov-action@v4 diff --git a/CHANGELOG.md b/CHANGELOG.md index ee595c50..67634d80 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,8 +24,10 @@ * [#421](https://github.com/nsidc/earthaccess/issues/421): Enabled queries to Earthdata User Acceptance Testing (UAT) system for authenticated accounts. * [#562](https://github.com/nsidc/earthaccess/issues/562): The destination - path is now created prior to direct S3 downloads, if it doesn't already - exist. + path is now created prior to direct S3 downloads, if it doesn't already + exist. + * [#457](https://github.com/nsidc/earthaccess/issues/457): Add Python 3.12 to + automated test matrix. ## [v0.9.0] 2024-02-28 diff --git a/pyproject.toml b/pyproject.toml index a5eb13f7..b7778293 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,7 +8,8 @@ maintainers = [ "Luis Lopez ", "Joseph H. Kennedy ", "James Bourbeau ", - "Matt Fisher " + "Matt Fisher ", + "Chuck Daniels " ] license = "MIT" readme = "README.md" @@ -24,6 +25,7 @@ classifiers = [ "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "Topic :: Software Development :: Libraries", "Topic :: Software Development", "License :: OSI Approved :: MIT License",