Skip to content

Commit

Permalink
migrate more to 3.9+ only
Browse files Browse the repository at this point in the history
  • Loading branch information
kratsg committed Dec 21, 2024
1 parent 196ec6f commit a8d518c
Show file tree
Hide file tree
Showing 10 changed files with 25 additions and 38 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/bump-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -195,11 +195,11 @@ jobs:
echo "steps.script.outputs.old_tag=v${current_tag}"
echo "old_tag=v${current_tag}" >> $GITHUB_OUTPUT
- name: Set up Python 3.12
- name: Set up Python 3.13
if: success()
uses: actions/setup-python@v5
with:
python-version: '3.12'
python-version: '3.13'

- name: Install Python dependencies
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
strategy:
matrix:
os: [windows-latest]
python-version: ['3.9', '3.10', '3.11', '3.12']
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']

steps:
- uses: actions/checkout@v4
Expand Down
24 changes: 8 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
include:
- os: macos-latest
python-version: '3.12'
python-version: '3.13'
# Intel runner
- os: macos-13
python-version: '3.12'
python-version: '3.13'

steps:
- uses: actions/checkout@v4
Expand All @@ -47,18 +47,10 @@ jobs:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
if: matrix.python-version != '3.8'
run: |
python -m pip install uv
uv pip install --system --upgrade ".[all,test]"
# c.f. https://github.com/astral-sh/uv/issues/2062
- name: Install dependencies (Python 3.8)
if: matrix.python-version == '3.8'
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade ".[all,test]"
- name: List installed Python packages
run: python -m pip list

Expand Down Expand Up @@ -97,7 +89,7 @@ jobs:
coverage xml
- name: Report contrib coverage with Codecov
if: github.event_name != 'schedule' && matrix.python-version == '3.12' && matrix.os == 'ubuntu-latest'
if: github.event_name != 'schedule' && matrix.python-version == '3.13' && matrix.os == 'ubuntu-latest'
uses: codecov/codecov-action@v5
with:
fail_ci_if_error: true
Expand All @@ -107,17 +99,17 @@ jobs:

- name: Test docstring examples with doctest
# TODO: Don't currently try to match amd64 and arm64 floating point for docs, but will in the future.
if: matrix.python-version == '3.12' && matrix.os != 'macos-latest'
if: matrix.python-version == '3.13' && matrix.os != 'macos-latest'
run: coverage run --data-file=.coverage-doctest --module pytest src/ README.rst

- name: Coverage report for doctest only
if: matrix.python-version == '3.12' && matrix.os != 'macos-latest'
if: matrix.python-version == '3.13' && matrix.os != 'macos-latest'
run: |
coverage report --data-file=.coverage-doctest
coverage xml --data-file=.coverage-doctest -o doctest-coverage.xml
- name: Report doctest coverage with Codecov
if: github.event_name != 'schedule' && matrix.python-version == '3.12' && matrix.os == 'ubuntu-latest'
if: github.event_name != 'schedule' && matrix.python-version == '3.13' && matrix.os == 'ubuntu-latest'
uses: codecov/codecov-action@v5
with:
fail_ci_if_error: true
Expand All @@ -126,6 +118,6 @@ jobs:
token: ${{ secrets.CODECOV_TOKEN }}

- name: Run benchmarks
if: github.event_name == 'schedule' && matrix.python-version == '3.12'
if: github.event_name == 'schedule' && matrix.python-version == '3.13'
run: |
pytest --benchmark-sort=mean tests/benchmarks/test_benchmark.py
12 changes: 6 additions & 6 deletions .github/workflows/dependencies-head.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, macos-13]
python-version: ['3.12']
python-version: ['3.13']

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -50,7 +50,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
python-version: ['3.12']
python-version: ['3.13']

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -79,7 +79,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
python-version: ['3.12']
python-version: ['3.13']

steps:
- uses: actions/checkout@v4
Expand All @@ -105,7 +105,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
python-version: ['3.12']
python-version: ['3.13']

steps:
- uses: actions/checkout@v4
Expand All @@ -130,7 +130,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
python-version: ['3.12']
python-version: ['3.13']

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -168,7 +168,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
python-version: ['3.12']
python-version: ['3.13']

steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
python-version: '3.13'

- name: Install Python dependencies
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lower-bound-requirements.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
matrix:
os: [ubuntu-latest]
# minimum supported Python
python-version: ['3.8']
python-version: ['3.9']

steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/notebooks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.12']
python-version: ['3.13']

steps:
- uses: actions/checkout@v4
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ jobs:
with:
fetch-depth: 0

- name: Set up Python 3.12
- name: Set up Python 3.13
uses: actions/setup-python@v5
with:
python-version: '3.12'
python-version: '3.13'

- name: Install python-build and twine
run: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
include:
- os: macos-latest
python-version: '3.12'
python-version: '3.13'
# Intel runner
- os: macos-13
python-version: '3.12'
python-version: '3.13'
fail-fast: false

steps:
Expand Down
5 changes: 0 additions & 5 deletions tests/contrib/test_viz.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import json
import sys

import matplotlib
import matplotlib.pyplot as plt
Expand Down Expand Up @@ -68,10 +67,6 @@ def test_plot_results(datadir):


@pytest.mark.mpl_image_compare
@pytest.mark.xfail(
sys.version_info < (3, 8),
reason="baseline image generated with matplotlib v3.6.0 which is Python 3.8+",
)
def test_plot_results_no_axis(datadir):
data = json.load(datadir.joinpath("hypotest_results.json").open(encoding="utf-8"))

Expand Down

0 comments on commit a8d518c

Please sign in to comment.