Skip to content

Commit 894ee71

Browse files
authored
👷 Test on Python 3.13 and update pre-commit hooks (#82)
* 👷 Test on Python 3.13 and update pre-commit hooks * 👷 Remove save-always from cache action
1 parent bd6dd10 commit 894ee71

9 files changed

Lines changed: 19 additions & 15 deletions

File tree

.github/workflows/CI.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ concurrency: # https://stackoverflow.com/questions/66335225#comment133398800_72
1111

1212
jobs:
1313
build:
14-
runs-on: ubuntu-20.04
14+
runs-on: ubuntu-24.04
1515
permissions:
1616
id-token: write # codecov/codecov-action
1717
strategy:
1818
matrix:
19-
python-version: ['3.9', '3.10', '3.11', '3.12']
19+
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
2020

2121
steps:
2222
- uses: actions/checkout@v4
@@ -31,14 +31,12 @@ jobs:
3131
- name: Pip cache
3232
uses: actions/cache@v4
3333
with:
34-
save-always: true
3534
path: ~/.cache/pip
3635
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('**/requirements/*.txt') }}
3736

3837
- name: Pre-commit cache
3938
uses: actions/cache@v4
4039
with:
41-
save-always: true
4240
path: ~/.cache/pre-commit
4341
key: ${{ runner.os }}-pre-commit-${{ matrix.python-version }}-${{ hashFiles('**/requirements/ci.txt') }}-${{ hashFiles('.pre-commit-config.yaml')
4442
}}
@@ -49,14 +47,14 @@ jobs:
4947
make install
5048
5149
- name: Lint
52-
if: matrix.python-version == 3.12
50+
if: matrix.python-version == '3.13'
5351
run: make lint
5452

5553
- name: Test
5654
run: make test
5755

5856
- name: Docs
59-
if: matrix.python-version == 3.12
57+
if: matrix.python-version == '3.13'
6058
run: SPHINXOPTS=-W make builddocs
6159

6260
- uses: codecov/codecov-action@v4

.pre-commit-config.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
---
22
repos:
33
- repo: https://github.com/astral-sh/ruff-pre-commit
4-
rev: v0.2.2
4+
rev: v0.6.9
55
hooks:
66
- id: ruff
77
args: [--fix, --exit-non-zero-on-fix]
88
- id: ruff-format
99

1010
# should be replaced in the future ref https://github.com/astral-sh/ruff/issues/458
1111
- repo: https://github.com/jsh9/pydoclint
12-
rev: 0.4.1
12+
rev: 0.5.9
1313
hooks:
1414
- id: pydoclint
1515

1616
- repo: https://github.com/Yelp/detect-secrets
1717
# for new repo init run: `detect-secrets scan > .secrets.baseline`
18-
rev: v1.4.0
18+
rev: v1.5.0
1919
hooks:
2020
- id: detect-secrets
2121
args: [--baseline, .secrets.baseline]
@@ -24,10 +24,10 @@ repos:
2424

2525
# should be replaced in the future ref https://github.com/astral-sh/ruff/issues/3792
2626
- repo: https://github.com/asottile/blacken-docs
27-
rev: 1.16.0
27+
rev: 1.19.0
2828
hooks:
2929
- id: blacken-docs
30-
additional_dependencies: [black==24.2.0]
30+
additional_dependencies: [black==24.10.0]
3131

3232
- repo: local
3333
hooks:
@@ -51,7 +51,7 @@ repos:
5151
args: [--mapping=2, --sequence=2, --offset=0]
5252

5353
- repo: https://github.com/pre-commit/pre-commit-hooks
54-
rev: v4.5.0
54+
rev: v5.0.0
5555
hooks:
5656
- id: mixed-line-ending
5757
args: [--fix=lf]
@@ -66,7 +66,7 @@ repos:
6666
- id: debug-statements
6767

6868
- repo: https://github.com/python-jsonschema/check-jsonschema
69-
rev: 0.28.0
69+
rev: 0.29.3
7070
hooks:
7171
- id: check-dependabot
7272
- id: check-github-workflows

.readthedocs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ version: 2
88

99
# Set the OS, Python version and other tools you might need
1010
build:
11-
os: ubuntu-22.04
11+
os: ubuntu-24.04
1212
tools:
1313
python: '3.12'
1414

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ classifiers = [
2020
"Programming Language :: Python :: 3.10",
2121
"Programming Language :: Python :: 3.11",
2222
"Programming Language :: Python :: 3.12",
23+
"Programming Language :: Python :: 3.13",
2324
"Topic :: Software Development :: Libraries :: Python Modules",
2425
"Topic :: Utilities"
2526
]

src/mapply/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
5050
df["squared"] = df.A.mapply(lambda x: x ** 2)
5151
"""
52+
5253
import contextlib
5354
from functools import partialmethod
5455
from importlib.metadata import PackageNotFoundError, version

src/mapply/mapply.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
4343
df["squared"] = mapply(df.A, lambda x: x ** 2, progressbar=False)
4444
"""
45+
4546
from __future__ import annotations
4647

4748
import warnings

src/mapply/parallel.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ def some_heavy_computation(x, power):
5050
)
5151
)
5252
"""
53+
5354
from __future__ import annotations
5455

5556
import logging

tests/test_mapply.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,12 @@
3030
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3131
#
3232
# SPDX-License-Identifier: BSD-3-Clause
33-
import mapply
3433
import numpy as np
3534
import pandas as pd
3635
import pytest
3736

37+
import mapply
38+
3839

3940
def test_df_mapply():
4041
"""Assert DataFrame behaviour is equivalent."""

tests/test_parallel.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
#
3232
# SPDX-License-Identifier: BSD-3-Clause
3333
import pytest
34+
3435
from mapply.parallel import multiprocessing_imap
3536

3637

0 commit comments

Comments
 (0)