Skip to content

Commit

Permalink
Add support for Python 3.11 (#348)
Browse files Browse the repository at this point in the history
Include CI jobs and trove classifier. Bump some CI checks from "3.10" to 
"3.x" (currently 3.11). Didn't do it for `.github/workflows/style.yml`, 
because that would require upgrading pylint to a later version to 
support 3.11 but also introduce failing lint rules. Also bump some GitHub 
Actions to newer versions.
  • Loading branch information
hugovk authored Mar 29, 2023
1 parent 5136828 commit 9c57dd3
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 22 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:

# Checks-out your repository under $GITHUB_WORKSPACE
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
# Need to fetch more than the last commit so that setuptools-scm can
# create the correct version string. If the number of commits since
Expand All @@ -58,9 +58,9 @@ jobs:
run: git fetch origin 'refs/tags/*:refs/tags/*'

- name: Setup Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: "3.10"
python-version: "3.x"

- name: Collect requirements
run: |
Expand All @@ -86,7 +86,7 @@ jobs:
echo "::set-output name=dir::$(pip cache dir)"
- name: Setup caching for pip packages
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('requirements-full.txt') }}
Expand All @@ -113,7 +113,7 @@ jobs:

# Store the docs as a build artifact so we can deploy it later
- name: Upload HTML documentation as an artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: docs-${{ github.sha }}
path: doc/_build/html
Expand All @@ -127,11 +127,11 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

# Fetch the built docs from the "build" job
- name: Download HTML documentation artifact
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
name: docs-${{ github.sha }}
path: doc/_build/html
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
steps:
# Checks-out your repository under $GITHUB_WORKSPACE
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
# Need to fetch more than the last commit so that setuptools_scm can
# create the correct version string. If the number of commits since
Expand All @@ -45,9 +45,9 @@ jobs:
run: git fetch origin 'refs/tags/*:refs/tags/*'

- name: Setup Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: "3.10"
python-version: "3.x"

- name: Install requirements
run: |
Expand Down Expand Up @@ -79,7 +79,7 @@ jobs:
- name: Upload archives as artifacts
# Only if not a pull request
if: success() && github.event_name != 'pull_request'
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: pypi-${{ github.sha }}
path: dist
Expand All @@ -94,15 +94,15 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
# The GitHub token is preserved by default but this job doesn't need
# to be able to push to GitHub.
persist-credentials: false

# Fetch the built archives from the "build" job
- name: Download built archives artifact
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
name: pypi-${{ github.sha }}
path: dist
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
persist-credentials: false

- name: Setup Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: "3.10"

Expand All @@ -42,12 +42,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
persist-credentials: false

- name: Setup Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: "3.10"

Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
- windows
python:
- "3.7"
- "3.10"
- "3.11"
dependencies:
- latest
- optional
Expand All @@ -67,7 +67,7 @@ jobs:

# Checks-out your repository under $GITHUB_WORKSPACE
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
# Need to fetch more than the last commit so that setuptools-scm can
# create the correct version string. If the number of commits since
Expand All @@ -83,7 +83,7 @@ jobs:
run: git fetch origin 'refs/tags/*:refs/tags/*'

- name: Setup Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}

Expand Down Expand Up @@ -118,7 +118,7 @@ jobs:
echo "::set-output name=dir::$(pip cache dir)"
- name: Setup caching for pip packages
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('requirements-full.txt') }}
Expand Down
2 changes: 1 addition & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ channels:
- conda-forge
- defaults
dependencies:
- python==3.10
- python==3.11
- pip
# Run
- requests
Expand Down
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ classifiers =
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
url = https://github.com/fatiando/pooch
project_urls =
Documentation = https://www.fatiando.org/pooch
Expand Down

0 comments on commit 9c57dd3

Please sign in to comment.