Skip to content

Commit 724f5b9

Browse files
committed
Add Python 3.13 support & drop python 3.8 & upgrade package version (#314)
1 parent 563fb26 commit 724f5b9

File tree

108 files changed

+789
-7206
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

108 files changed

+789
-7206
lines changed

.github/workflows/docker.yml

Lines changed: 0 additions & 47 deletions
This file was deleted.

.github/workflows/docs.yml

Lines changed: 41 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,58 @@
1-
name: build-docs
1+
name: Build Documentation
2+
23
on:
34
push:
45
tags:
56
- "**"
7+
8+
env:
9+
PYTHON_VERSION: "3.13"
10+
611
jobs:
712
build:
13+
name: Build and deploy documentation
814
runs-on: ubuntu-latest
15+
16+
permissions:
17+
contents: write
18+
pages: write
19+
id-token: write
20+
921
steps:
10-
- uses: actions/[email protected]
11-
- uses: actions/[email protected]
22+
- name: Checkout code
23+
uses: actions/checkout@v4
24+
with:
25+
fetch-depth: 0
26+
27+
- name: Set up Python ${{ env.PYTHON_VERSION }}
28+
uses: actions/setup-python@v5
1229
with:
13-
python-version: "3.12"
14-
architecture: "x64"
30+
python-version: ${{ env.PYTHON_VERSION }}
31+
architecture: x64
32+
cache: 'pip'
1533

16-
- name: Install Dependencies
34+
- name: Cache pip dependencies
35+
uses: actions/cache@v4
36+
with:
37+
path: ~/.cache/pip
38+
key: ${{ runner.os }}-pip-${{ env.PYTHON_VERSION }}-${{ hashFiles('**/pyproject.toml') }}
39+
restore-keys: |
40+
${{ runner.os }}-pip-${{ env.PYTHON_VERSION }}-
41+
42+
- name: Install dependencies
1743
run: |
1844
python -m pip install --upgrade pip
1945
python -m pip install .[docs]
2046
21-
- name: Build Docs
47+
- name: Configure Git
2248
run: |
2349
git config --local user.email "[email protected]"
2450
git config --local user.name "Hakan Celik"
25-
git fetch --all
26-
mike deploy ${{github.ref_name}} latest --update-aliases --push
51+
52+
- name: Fetch all branches
53+
run: git fetch --all
54+
55+
- name: Deploy documentation
56+
run: |
57+
mike deploy ${{ github.ref_name }} latest --update-aliases --push
58+
timeout-minutes: 10

.github/workflows/pre-commit.yml

Lines changed: 33 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,40 @@
1-
name: pre-commit
1+
name: Pre-commit Checks
22
on: [push, pull_request]
3+
4+
env:
5+
PYTHON_VERSION: "3.13"
6+
37
jobs:
4-
run:
8+
pre-commit:
9+
name: Run pre-commit checks
510
runs-on: ubuntu-latest
11+
612
steps:
7-
- uses: actions/[email protected]
8-
- uses: actions/[email protected]
9-
- name: Install dependencies for pre-commit
13+
- name: Checkout code
14+
uses: actions/checkout@v4
15+
with:
16+
fetch-depth: 0
17+
18+
- name: Set up Python ${{ env.PYTHON_VERSION }}
19+
uses: actions/setup-python@v5
20+
with:
21+
python-version: ${{ env.PYTHON_VERSION }}
22+
architecture: x64
23+
cache: 'pip'
24+
25+
- name: Cache pip dependencies
26+
uses: actions/cache@v4
27+
with:
28+
path: ~/.cache/pip
29+
key: ${{ runner.os }}-pip-${{ env.PYTHON_VERSION }}-${{ hashFiles('**/pyproject.toml') }}
30+
restore-keys: |
31+
${{ runner.os }}-pip-${{ env.PYTHON_VERSION }}-
32+
33+
- name: Install dependencies
1034
run: |
1135
python -m pip install --upgrade pip
1236
python -m pip install tox
13-
- name: pre-commit
14-
run: |
15-
tox -e pre-commit
37+
38+
- name: Run pre-commit checks
39+
run: tox -e pre-commit
40+
timeout-minutes: 10

.github/workflows/pypi.yml

Lines changed: 58 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,91 @@
1-
name: publish-package-on-pypi
1+
name: Publish to PyPI
2+
23
on:
34
push:
45
tags:
56
- "**"
7+
8+
env:
9+
PYTHON_VERSION: "3.13"
10+
611
jobs:
712
test:
13+
name: Test package build
814
runs-on: ubuntu-latest
15+
916
steps:
10-
- uses: actions/[email protected]
11-
- uses: actions/[email protected]
17+
- name: Checkout code
18+
uses: actions/checkout@v4
19+
20+
- name: Set up Python ${{ env.PYTHON_VERSION }}
21+
uses: actions/setup-python@v5
22+
with:
23+
python-version: ${{ env.PYTHON_VERSION }}
24+
architecture: x64
25+
cache: 'pip'
26+
27+
- name: Cache pip dependencies
28+
uses: actions/cache@v4
1229
with:
13-
python-version: "3.12"
14-
architecture: "x64"
30+
path: ~/.cache/pip
31+
key: ${{ runner.os }}-pip-${{ env.PYTHON_VERSION }}-${{ hashFiles('**/pyproject.toml') }}
32+
restore-keys: |
33+
${{ runner.os }}-pip-${{ env.PYTHON_VERSION }}-
1534
16-
- name: Install Dependencies
35+
- name: Install dependencies
1736
run: |
1837
python -m pip install --upgrade pip
1938
python -m pip install --upgrade build
2039
21-
- run: python -m build
22-
- name: Publish package to TestPyPI
40+
- name: Build package
41+
run: python -m build
42+
timeout-minutes: 5
43+
44+
- name: Publish to TestPyPI
2345
uses: pypa/gh-action-pypi-publish@release/v1
2446
with:
2547
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
2648
repository_url: https://test.pypi.org/legacy/
2749
verbose: true
50+
skip_existing: true
2851

2952
publish:
53+
name: Publish to PyPI
3054
runs-on: ubuntu-latest
55+
needs: test
56+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
57+
3158
steps:
32-
- uses: actions/[email protected]
33-
- uses: actions/[email protected]
59+
- name: Checkout code
60+
uses: actions/checkout@v4
61+
62+
- name: Set up Python ${{ env.PYTHON_VERSION }}
63+
uses: actions/setup-python@v5
3464
with:
35-
python-version: "3.12"
36-
architecture: "x64"
65+
python-version: ${{ env.PYTHON_VERSION }}
66+
architecture: x64
67+
cache: 'pip'
3768

38-
- name: Install Dependencies
69+
- name: Cache pip dependencies
70+
uses: actions/cache@v4
71+
with:
72+
path: ~/.cache/pip
73+
key: ${{ runner.os }}-pip-${{ env.PYTHON_VERSION }}-${{ hashFiles('**/pyproject.toml') }}
74+
restore-keys: |
75+
${{ runner.os }}-pip-${{ env.PYTHON_VERSION }}-
76+
77+
- name: Install dependencies
3978
run: |
4079
python -m pip install --upgrade pip
4180
python -m pip install --upgrade build
4281
43-
- run: python -m build
44-
- name: Publish a Python distribution to PyPI
82+
- name: Build package
83+
run: python -m build
84+
timeout-minutes: 5
85+
86+
- name: Publish to PyPI
4587
uses: pypa/gh-action-pypi-publish@release/v1
4688
with:
4789
password: ${{ secrets.PYPI_API_TOKEN }}
4890
verbose: true
91+
skip_existing: true

.github/workflows/test-legacy.yml

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
name: Test Legacy Python Versions
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
test-legacy:
7+
name: Test Legacy Python ${{ matrix.python-version }} on ${{ matrix.os }}
8+
runs-on: ${{ matrix.os }}
9+
strategy:
10+
fail-fast: false
11+
matrix:
12+
os: [ubuntu-latest, windows-latest]
13+
python-version: ["3.9", "3.10"]
14+
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v4
18+
with:
19+
fetch-depth: 0
20+
21+
- name: Set up Python ${{ matrix.python-version }}
22+
uses: actions/setup-python@v5
23+
with:
24+
python-version: ${{ matrix.python-version }}
25+
architecture: x64
26+
cache: 'pip'
27+
28+
- name: Cache pip dependencies
29+
uses: actions/cache@v4
30+
with:
31+
path: ~/.cache/pip
32+
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('**/pyproject.toml') }}
33+
restore-keys: |
34+
${{ runner.os }}-pip-${{ matrix.python-version }}-
35+
36+
- name: Install dependencies
37+
run: |
38+
python -m pip install --upgrade pip
39+
python -m pip install tox
40+
41+
- name: Run tests with tox
42+
run: tox -e ${{ matrix.python-version }}
43+
timeout-minutes: 10
44+
45+
test-legacy-macos:
46+
name: Test Legacy Python ${{ matrix.python-version }} on macOS
47+
runs-on: macos-latest
48+
strategy:
49+
fail-fast: false
50+
matrix:
51+
python-version: ["3.9", "3.10"]
52+
53+
steps:
54+
- name: Checkout code
55+
uses: actions/checkout@v4
56+
with:
57+
fetch-depth: 0
58+
59+
- name: Set up Python ${{ matrix.python-version }}
60+
uses: actions/setup-python@v5
61+
with:
62+
python-version: ${{ matrix.python-version }}
63+
# No architecture specified for macOS with Python <3.11 to avoid arm64 issues
64+
cache: 'pip'
65+
66+
- name: Cache pip dependencies
67+
uses: actions/cache@v4
68+
with:
69+
path: ~/.cache/pip
70+
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('**/pyproject.toml') }}
71+
restore-keys: |
72+
${{ runner.os }}-pip-${{ matrix.python-version }}-
73+
74+
- name: Install dependencies
75+
run: |
76+
python -m pip install --upgrade pip
77+
python -m pip install tox
78+
79+
- name: Run tests with tox
80+
run: tox -e ${{ matrix.python-version }}
81+
timeout-minutes: 10

0 commit comments

Comments
 (0)