Skip to content

[MNT,ENH] Update to allow Python 3.13 #2608

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 20 commits into from
Apr 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .github/actions/cpu_all_extras/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ name: Pip install all_extras with CPU versions
description: "For CI testing install the CPU version of dependencies with all extras if on ubuntu"

inputs:
python_version:
description: "Python version used"
required: false
default: "3.11"
additional_extras:
description: "Comma-separated list of additional extras to install"
required: false
Expand All @@ -11,7 +15,7 @@ runs:
using: "composite"
steps:
- name: Install CPU TensorFlow
if: runner.os == 'Linux'
if: ${{ runner.os == 'Linux' && inputs.python_version != '3.13' }}
uses: nick-fields/retry@v3
with:
timeout_minutes: 30
Expand Down
3 changes: 2 additions & 1 deletion .github/utilities/run_examples.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ set -euxo pipefail
CMD="jupyter nbconvert --to notebook --inplace --execute --ExecutePreprocessor.timeout=600"

excluded=(
"examples/transformations/signature_method.ipynb"
# try removing when 3.9 is dropped
"examples/transformations/signature_method.ipynb"
)
if [ "$1" = true ]; then
excluded+=(
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/fast_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
- name: Setup Python 3.11
uses: actions/setup-python@v5
with:
python-version: "3.10"
python-version: "3.11"

- name: Build project
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/issue_assigned.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ jobs:
with:
sparse-checkout: .github/utilities

- name: Setup Python 3.10
- name: Setup Python 3.11
uses: actions/setup-python@v5
with:
python-version: "3.10"
python-version: "3.11"

- name: Install PyGithub
run: pip install -Uq PyGithub
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/issue_comment_edited.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ jobs:
with:
sparse-checkout: .github/utilities

- name: Setup Python 3.10
- name: Setup Python 3.11
uses: actions/setup-python@v5
with:
python-version: "3.10"
python-version: "3.11"

- name: Install PyGithub
run: pip install -Uq PyGithub
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/issue_comment_posted.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ jobs:
with:
sparse-checkout: .github/utilities

- name: Setup Python 3.10
- name: Setup Python 3.11
uses: actions/setup-python@v5
with:
python-version: "3.10"
python-version: "3.11"

- name: Install PyGithub
run: pip install -Uq PyGithub
Expand Down
31 changes: 16 additions & 15 deletions .github/workflows/periodic_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Python 3.10
- name: Setup Python 3.11
uses: actions/setup-python@v5
with:
python-version: "3.10"
python-version: "3.11"

- name: Run check-manifest
uses: pre-commit/action@v3.0.1
Expand All @@ -35,10 +35,10 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Python 3.10
- name: Setup Python 3.11
uses: actions/setup-python@v5
with:
python-version: "3.10"
python-version: "3.11"

- name: Run pre-commit
uses: pre-commit/action@v3.0.1
Expand All @@ -57,17 +57,17 @@ jobs:
brew install bash
/opt/homebrew/bin/bash --version

- name: Setup Python 3.10
- name: Setup Python 3.11
uses: actions/setup-python@v5
with:
python-version: "3.10"
python-version: "3.11"

- name: Use numba cache to set env variables but not restore cache
uses: ./.github/actions/numba_cache
with:
cache_name: "run-notebook-examples"
runner_os: ${{ runner.os }}
python_version: "3.10"
python_version: "3.11"
restore_cache: "false"

- uses: ./.github/actions/cpu_all_extras
Expand All @@ -92,10 +92,10 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Python 3.10
- name: Setup Python 3.11
uses: actions/setup-python@v5
with:
python-version: "3.10"
python-version: "3.11"

- name: Install aeon and dependencies
uses: nick-fields/retry@v3
Expand All @@ -117,17 +117,17 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Python 3.10
- name: Setup Python 3.11
uses: actions/setup-python@v5
with:
python-version: "3.10"
python-version: "3.11"

- name: Use numba cache to set env variables but not restore cache
uses: ./.github/actions/numba_cache
with:
cache_name: "test-no-soft-deps"
runner_os: ${{ runner.os }}
python_version: "3.10"
python_version: "3.11"
restore_cache: "false"

- name: Install aeon and dependencies
Expand Down Expand Up @@ -157,7 +157,7 @@ jobs:
fail-fast: false
matrix:
os: [ ubuntu-24.04, macOS-14, windows-2022 ]
python-version: [ "3.9", "3.10", "3.11", "3.12" ]
python-version: [ "3.9", "3.10", "3.11", "3.12", "3.13" ]

steps:
- name: Checkout
Expand All @@ -184,6 +184,7 @@ jobs:

- uses: ./.github/actions/cpu_all_extras
with:
python_version: ${{ matrix.python-version }}
additional_extras: "dev"

- name: Show dependencies
Expand All @@ -206,10 +207,10 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Python 3.10
- name: Setup Python 3.11
uses: actions/setup-python@v5
with:
python-version: "3.10"
python-version: "3.11"

- name: Disable Numba JIT
run: echo "NUMBA_DISABLE_JIT=1" >> $GITHUB_ENV
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pr_core_dep_import.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Python 3.10
- name: Setup Python 3.11
uses: actions/setup-python@v5
with:
python-version: "3.10"
python-version: "3.11"

- name: Install aeon and dependencies
uses: nick-fields/retry@v3
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/pr_examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,18 @@ jobs:
brew install bash
/opt/homebrew/bin/bash --version

- name: Setup Python 3.10
- name: Setup Python 3.11
uses: actions/setup-python@v5
with:
python-version: "3.10"
python-version: "3.11"

- if: ${{ github.event_name != 'pull_request' || !contains(github.event.pull_request.labels.*.name, 'no numba cache') }}
name: Restore numba cache
uses: ./.github/actions/numba_cache
with:
cache_name: "run-notebook-examples"
runner_os: ${{ runner.os }}
python_version: "3.10"
python_version: "3.11"

- uses: ./.github/actions/cpu_all_extras
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pr_opened.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ jobs:
with:
sparse-checkout: .github/utilities

- name: Setup Python 3.10
- name: Setup Python 3.11
uses: actions/setup-python@v5
with:
python-version: "3.10"
python-version: "3.11"

- name: Install PyGithub
run: pip install -Uq PyGithub
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pr_precommit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ jobs:
ref: ${{ github.head_ref }}
token: ${{ steps.app-token.outputs.token }}

- name: Setup Python 3.10
- name: Setup Python 3.11
uses: actions/setup-python@v5
with:
python-version: "3.10"
python-version: "3.11"

- name: Get changed files
uses: tj-actions/changed-files@v46.0.4
Expand Down
15 changes: 9 additions & 6 deletions .github/workflows/pr_pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,18 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Python 3.10
- name: Setup Python 3.11
uses: actions/setup-python@v5
with:
python-version: "3.10"
python-version: "3.11"

- if: ${{ github.event_name != 'pull_request' || !contains(github.event.pull_request.labels.*.name, 'no numba cache') }}
name: Restore numba cache
uses: ./.github/actions/numba_cache
with:
cache_name: "test-no-soft-deps"
runner_os: ${{ runner.os }}
python_version: "3.10"
python_version: "3.11"

- name: Install aeon and dependencies
uses: nick-fields/retry@v3
Expand All @@ -57,13 +57,15 @@ jobs:
fail-fast: false
matrix:
os: [ ubuntu-24.04, macOS-14, windows-2022 ]
python-version: [ "3.9", "3.10", "3.11", "3.12" ]
python-version: [ "3.9", "3.10", "3.11", "3.12", "3.13" ]
# skip python versions unless the PR has the 'full pytest actions' label
pr-testing:
- ${{ (github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'full pytest actions')) }}
exclude:
- pr-testing: true
python-version: "3.10"
- pr-testing: true
python-version: "3.12"

steps:
- name: Checkout
Expand All @@ -90,6 +92,7 @@ jobs:

- uses: ./.github/actions/cpu_all_extras
with:
python_version: ${{ matrix.python-version }}
additional_extras: "dev"

- name: Show dependencies
Expand All @@ -109,10 +112,10 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Python 3.10
- name: Setup Python 3.11
uses: actions/setup-python@v5
with:
python-version: "3.10"
python-version: "3.11"

- name: Disable Numba JIT
run: echo "NUMBA_DISABLE_JIT=1" >> $GITHUB_ENV
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pr_typecheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Python 3.10
- name: Setup Python 3.11
uses: actions/setup-python@v5
with:
python-version: "3.10"
python-version: "3.11"

- name: Install aeon, dependencies and mypy
uses: nick-fields/retry@v3
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/precommit_autoupdate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
- name: Setup Python 3.11
uses: actions/setup-python@v5
with:
python-version: "3.10"
python-version: "3.11"

- uses: browniebroke/pre-commit-autoupdate-action@v1.0.0

Expand Down
12 changes: 7 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
- name: Setup Python 3.11
uses: actions/setup-python@v5
with:
python-version: "3.10"
python-version: "3.11"

- uses: pre-commit/action@v3.0.1
with:
Expand All @@ -28,9 +29,10 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
- name: Setup Python 3.11
uses: actions/setup-python@v5
with:
python-version: "3.10"
python-version: "3.11"

- name: Build project
run: |
Expand All @@ -52,7 +54,7 @@ jobs:
fail-fast: false
matrix:
os: [ ubuntu-24.04, macOS-14, windows-2022 ]
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
2 changes: 1 addition & 1 deletion aeon/anomaly_detection/tests/test_cblof.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def test_cblof_default():
pred = cblof.fit_predict(series, axis=0)

assert pred.shape == (80,)
assert pred.dtype == np.float_
assert np.issubdtype(pred.dtype, np.floating)
assert 50 <= np.argmax(pred) <= 60


Expand Down
2 changes: 1 addition & 1 deletion aeon/anomaly_detection/tests/test_copod.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def test_copod_default():
pred = copod.fit_predict(series, axis=0)

assert pred.shape == (80,)
assert pred.dtype == np.float_
assert np.issubdtype(pred.dtype, np.floating)
assert 50 <= np.argmax(pred) <= 60


Expand Down
Loading