Skip to content

Commit 89105fc

Browse files
authored
ci(upload-pypi): bump versions of gha and manage supported python versions (#356)
* ci(upload-pypi): upgrade version of artefact upload action An error is thrown when uploading an artefact (`actions/upload-artifact`) because the version is too old https://github.blog/changelog/2024-02-13-deprecation-notice-v1-and-v2-of-the-artifact-actions/ * ci(upload-to-pypi): correct mistakes on versions * ci(upload-to-pypi): remove wheels for py36 and py37 * Give a name to each new artefact * Update upload-to-pypi.yml https://learn.scientific-python.org/development/guides/gha-wheels/ * prevent artifact name colision * adding support for py314 * skipping py314t for win32 * bumping versions of various gha * remove pp* from skip selector Build wheels on ubuntu-latest cibuildwheel: Invalid skip selector: 'pp*'. This selector matches a group that wasn't enabled. Enable it using the `enable` option or remove this selector. This selector will have no effect. * only build wheels for python >= 3.8 * updater python version for cibuildwheel Warning: cibuildwheel 3 will require Python 3.11+, please upgrade the Python version used to run cibuildwheel. This does not affect the versions you can target when building wheels. See: https://cibuildwheel.pypa.io/en/stable/#what-does-it-do * upgrade python version to build dist I mean, why not? * only support python >= 3.9 because one wheel is bugging on python 3.8 and win amd64 * no wheel for py38 * bum versions of gha and remove python3.8 from tests * bump python version and gha * bump python version and gha versions * adding py3.14 to the test * only support up to python3.13 * Update README.md with supported python versions * Update run-test.yml to remove py314 * Update setup.cfg (typo)
1 parent 684b2ed commit 89105fc

File tree

6 files changed

+42
-37
lines changed

6 files changed

+42
-37
lines changed

.github/workflows/check-docs.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ jobs:
99
docs:
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@v2
13-
- name: Set up Python 3.8
14-
uses: actions/setup-python@v2
12+
- uses: actions/checkout@v5
13+
- name: Set up Python 3.x
14+
uses: actions/setup-python@v6
1515
with:
16-
python-version: '3.8'
16+
python-version: '3.13'
1717
- name: Install sndfile library # for librose, see https://github.com/deepcharles/ruptures/pull/121
1818
run: |
1919
sudo apt-get install libsndfile1-dev

.github/workflows/publish-doc-to-remote.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ jobs:
1010
docs:
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@v2
13+
- uses: actions/checkout@v5
1414
- name: Set up Python 3.x
15-
uses: actions/setup-python@v2
15+
uses: actions/setup-python@v6
1616
with:
17-
python-version: '3.8'
17+
python-version: '3.13'
1818
- name: Install sndfile library # for librose, see https://github.com/deepcharles/ruptures/pull/121
1919
run: |
2020
sudo apt-get install libsndfile1-dev

.github/workflows/run-test.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ jobs:
1919
tests:
2020
strategy:
2121
matrix:
22-
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
22+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
2323
os: [ubuntu-latest, windows-latest, macos-latest]
2424
runs-on: ${{ matrix.os }}
2525
steps:
26-
- uses: actions/checkout@v4
26+
- uses: actions/checkout@v5
2727
- name: Set up Python ${{ matrix.python-version }}
28-
uses: actions/setup-python@v2
28+
uses: actions/setup-python@v6
2929
with:
3030
python-version: ${{ matrix.python-version }}
3131
- name: Install ruptures
@@ -39,11 +39,11 @@ jobs:
3939
coverage:
4040
runs-on: ubuntu-latest
4141
steps:
42-
- uses: actions/checkout@v2
43-
- name: Set up Python 3.10
44-
uses: actions/setup-python@v2
42+
- uses: actions/checkout@v5
43+
- name: Set up Python 3.13
44+
uses: actions/setup-python@v6
4545
with:
46-
python-version: '3.10'
46+
python-version: '3.13'
4747
- name: Install ruptures
4848
run: |
4949
python -m pip install --upgrade pip

.github/workflows/upload-to-pypi.yml

Lines changed: 25 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ on:
66
overrideVersion:
77
description: Manually force a version
88
uploadToPyPI:
9-
description: Upload to PyPI
10-
required: false
11-
default: false
12-
type: boolean
9+
description: Upload to PyPI
10+
required: false
11+
default: false
12+
type: boolean
1313

1414
env:
1515
CIBW_BUILD_VERBOSITY: 3
@@ -23,17 +23,18 @@ jobs:
2323
name: Make SDist
2424
runs-on: ubuntu-latest
2525
steps:
26-
- uses: actions/checkout@v2
26+
- uses: actions/checkout@v5
2727
- name: Setup Python
28-
uses: actions/setup-python@v2
28+
uses: actions/setup-python@v6
2929
with:
30-
python-version: "3.10"
30+
python-version: "3.13"
3131
- name: Install deps
3232
run: python -m pip install build twine
3333
- name: Build SDist
3434
run: python -m build --sdist
35-
- uses: actions/upload-artifact@v2
35+
- uses: actions/upload-artifact@v4
3636
with:
37+
name: cibw-sdist
3738
path: dist/*.tar.gz
3839
- name: Check metadata
3940
run: twine check dist/*
@@ -45,43 +46,45 @@ jobs:
4546
matrix:
4647
os: [ubuntu-latest, windows-latest, macos-latest]
4748
steps:
48-
- uses: actions/checkout@v2
49+
- uses: actions/checkout@v5
4950

5051
# Used to host cibuildwheel
51-
- uses: actions/setup-python@v2
52-
52+
- uses: actions/setup-python@v6
53+
with:
54+
python-version: "3.13"
5355
- name: Install cibuildwheel
5456
run: python -m pip install cibuildwheel
5557

5658
- name: Build wheels
5759
run: python -m cibuildwheel --output-dir wheelhouse
5860
env:
5961
# Disable explicitly building PyPI wheels for specific configurations
60-
CIBW_SKIP: pp* cp{38,39,310,311,312,313}-manylinux_i686 *-musllinux_* cp{38,39,310,311,312,313}-win32
62+
CIBW_SKIP: cp{38,39,310,311,312,313,314}-manylinux_i686 *-musllinux_* cp{38,39,310,311,312,313,314,314t}-win32
6163
CIBW_PRERELEASE_PYTHONS: False
6264
# Manually force a version (and avoid building local wheels)
6365
CIBW_ENVIRONMENT: "SETUPTOOLS_SCM_PRETEND_VERSION=${{ github.event.inputs.overrideVersion }}"
6466
CIBW_ARCHS_MACOS: x86_64 arm64
6567

66-
- uses: actions/upload-artifact@v2
68+
- uses: actions/upload-artifact@v4
6769
with:
70+
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
6871
path: wheelhouse/*.whl
6972

7073
build_aarch64_wheels:
7174
name: Build wheels manylinux_aarch64
7275
runs-on: ubuntu-latest
7376
strategy:
7477
matrix:
75-
python: [36, 37, 38, 39, 310, 311, 312, 313]
78+
python: [39, 310, 311, 312, 313, 314]
7679
include:
7780
- os: ubuntu-latest
7881
arch: aarch64
7982
platform_id: manylinux_aarch64
8083
steps:
81-
- uses: actions/checkout@v2
84+
- uses: actions/checkout@v5
8285

8386
- name: Set up QEMU
84-
uses: docker/setup-qemu-action@v1
87+
uses: docker/setup-qemu-action@v3
8588

8689
- name: Install cibuildwheel
8790
run: python -m pip install cibuildwheel
@@ -93,18 +96,20 @@ jobs:
9396
CIBW_BUILD: cp${{ matrix.python }}-${{ matrix.platform_id }}
9497
# Manually force a version (and avoid building local wheels)
9598
CIBW_ENVIRONMENT: "SETUPTOOLS_SCM_PRETEND_VERSION=${{ github.event.inputs.overrideVersion }}"
96-
- uses: actions/upload-artifact@v2
99+
- uses: actions/upload-artifact@v4
97100
with:
101+
name: cibw-aarch64_wheels-${{ matrix.os }}-${{ strategy.job-index }}
98102
path: wheelhouse/*.whl
99103

100104
upload_all:
101105
needs: [build_wheels, build_aarch64_wheels, make_sdist]
102106
runs-on: ubuntu-latest
103107
steps:
104-
- uses: actions/download-artifact@v2
108+
- uses: actions/download-artifact@v5
105109
with:
106-
name: artifact
110+
pattern: cibw-*
107111
path: dist
112+
merge-multiple: true
108113
- name: Publish to PyPI
109114
if: ${{ github.event.inputs.uploadToPyPI == 'true' }}
110115
uses: pypa/gh-action-pypi-publish@release/v1
@@ -113,4 +118,4 @@ jobs:
113118
password: ${{ secrets.PYPI_PASSWORD }}
114119
- name: Skipped PyPI Upload
115120
if: ${{ github.event.inputs.uploadToPyPI != 'true' }}
116-
run: echo "Upload to PyPI was skipped due to workflow input."
121+
run: echo "Upload to PyPI was skipped due to workflow input."

README.md

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

33
[![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://GitHub.com/deepcharles/ruptures/graphs/commit-activity)
44
[![build](https://github.com/deepcharles/ruptures/actions/workflows/run-test.yml/badge.svg)](https://github.com/deepcharles/ruptures/actions/workflows/run-test.yml)
5-
![python](https://img.shields.io/badge/python-3.8%20|%203.9%20|%203.10%20|%203.11%20|%203.12%20|%203.13-blue)
5+
![python](https://img.shields.io/badge/python-%203.9%20|%203.10%20|%203.11%20|%203.12%20|%203.13-blue)
66
[![PyPI version](https://badge.fury.io/py/ruptures.svg)](https://badge.fury.io/py/ruptures)
77
[![Conda Version](https://img.shields.io/conda/vn/conda-forge/ruptures.svg)](https://anaconda.org/conda-forge/ruptures)
88
[![docs](https://github.com/deepcharles/ruptures/actions/workflows/check-docs.yml/badge.svg)](https://github.com/deepcharles/ruptures/actions/workflows/check-docs.yml)

setup.cfg

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ classifiers =
3030
[options]
3131
zip_safe = True
3232
include_package_data = True
33-
python_requires = >= 3.6
33+
python_requires = >=3.9, <3.14
3434
install_requires =
3535
numpy
3636
scipy
@@ -65,4 +65,4 @@ docs =
6565
inplace=1
6666

6767
[coverage:run]
68-
source_pkgs = ruptures
68+
source_pkgs = ruptures

0 commit comments

Comments
 (0)