Skip to content

Commit f533844

Browse files
author
DDiyash
committed
Update Python version support and CI to include Python 3.14
1 parent 17d690f commit f533844

6 files changed

Lines changed: 127 additions & 110 deletions

File tree

.github/workflows/dist.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
- name: Setup Python
2828
uses: actions/setup-python@v5
2929
with:
30-
python-version: 3.8
30+
python-version: 3.10
3131
- name: Build dist
3232
run: |
3333
pip install build

.github/workflows/docs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
- name: Setup Python
2929
uses: actions/setup-python@v5
3030
with:
31-
python-version: 3.8
31+
python-version: 3.10
3232
- name: Install dependencies
3333
run: |
3434
pip install -e .[docs,examples]

.github/workflows/test.yml

Lines changed: 109 additions & 100 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
---
12
name: Tests
23

34
on:
@@ -21,117 +22,125 @@ concurrency:
2122

2223
jobs:
2324
test:
24-
name: (${{ matrix.os }}, Py${{ matrix.python-version }}, sk${{ matrix.scikit-learn }}, sk-only:${{ matrix.sklearn-only }})
25+
name: (${{ matrix.os }},Py${{ matrix.python-version }},sk${{ matrix.scikit-learn }},sk-only:${{ matrix.sklearn-only }})
2526
runs-on: ${{ matrix.os }}
2627
strategy:
28+
fail-fast: false
2729
matrix:
28-
python-version: ["3.9"]
29-
scikit-learn: ["1.0.*", "1.1.*", "1.2.*", "1.3.*", "1.4.*", "1.5.*"]
30-
os: [ubuntu-latest]
31-
sklearn-only: ["true"]
3230
include:
3331
- os: ubuntu-latest
34-
python-version: "3.8" # no scikit-learn 0.23 release for Python 3.9
35-
scikit-learn: "0.23.1"
36-
sklearn-only: "true"
37-
# scikit-learn 0.24 relies on scipy defaults, so we need to fix the version
38-
# c.f. https://github.com/openml/openml-python/pull/1267
32+
python-version: "3.10"
33+
scikit-learn: "1.0.*"
34+
scipy: "1.10.0"
35+
sklearn-only: true
3936
- os: ubuntu-latest
40-
python-version: "3.9"
41-
scikit-learn: "0.24"
37+
python-version: "3.11"
38+
scikit-learn: "1.3.*"
4239
scipy: "1.10.0"
43-
sklearn-only: "true"
44-
# Do a Windows and Ubuntu test for _all_ openml functionality
45-
# I am not sure why these are on 3.8 and older scikit-learn
40+
sklearn-only: true
41+
- os: ubuntu-latest
42+
python-version: "3.12"
43+
scikit-learn: "1.5.*"
44+
scipy: ">=1.11"
45+
sklearn-only: true
46+
- os: ubuntu-latest
47+
python-version: "3.13"
48+
scikit-learn: "1.6.*"
49+
scipy: ">=1.10"
50+
sklearn-only: true
51+
- os: ubuntu-latest
52+
python-version: "3.14"
53+
scikit-learn: "1.7.*"
54+
scipy: ">=1.10"
55+
sklearn-only: true
4656
- os: windows-latest
47-
python-version: "3.8"
48-
scikit-learn: 0.24.*
49-
scipy: "1.10.0"
50-
sklearn-only: 'false'
51-
# Include a code cov version
57+
python-version: "3.10"
58+
scikit-learn: "1.5.*"
59+
scipy: "1.10.1"
60+
sklearn-only: false
61+
- os: windows-latest
62+
python-version: "3.13"
63+
scikit-learn: "1.6.*"
64+
scipy: ">=1.10"
65+
sklearn-only: false
5266
- os: ubuntu-latest
53-
code-cov: true
54-
python-version: "3.8"
55-
scikit-learn: 0.23.1
56-
sklearn-only: 'false'
57-
fail-fast: false
58-
67+
code-cov: false
68+
python-version: "3.10"
69+
scikit-learn: "1.5.*"
70+
scipy: ">=1.10"
71+
sklearn-only: false
5972
steps:
60-
- uses: actions/checkout@v4
61-
with:
62-
fetch-depth: 2
63-
- name: Setup Python ${{ matrix.python-version }}
64-
if: matrix.os != 'windows-latest' # windows-latest only uses preinstalled Python (3.9.13)
65-
uses: actions/setup-python@v5
66-
with:
67-
python-version: ${{ matrix.python-version }}
68-
- name: Install test dependencies
69-
run: |
70-
python -m pip install --upgrade pip
71-
pip install -e .[test]
72-
- name: Install scikit-learn ${{ matrix.scikit-learn }}
73-
run: |
74-
pip install scikit-learn==${{ matrix.scikit-learn }}
75-
- name: Install numpy for Python 3.8
76-
# Python 3.8 & scikit-learn<0.24 requires numpy<=1.23.5
77-
if: ${{ matrix.python-version == '3.8' && matrix.scikit-learn == '0.23.1' }}
78-
run: |
79-
pip install numpy==1.23.5
80-
- name: "Install NumPy 1.x and SciPy <1.11 for scikit-learn < 1.4"
81-
if: ${{ contains(fromJSON('["1.0.*", "1.1.*", "1.2.*", "1.3.*"]'), matrix.scikit-learn) }}
82-
run: |
83-
# scipy has a change to the 'mode' behavior which breaks scikit-learn < 1.4
84-
# numpy 2.0 has several breaking changes
85-
pip install "numpy<2.0" "scipy<1.11"
86-
- name: Install scipy ${{ matrix.scipy }}
87-
if: ${{ matrix.scipy }}
88-
run: |
89-
pip install scipy==${{ matrix.scipy }}
90-
- name: Store repository status
91-
id: status-before
92-
if: matrix.os != 'windows-latest'
93-
run: |
94-
git_status=$(git status --porcelain -b)
95-
echo "BEFORE=$git_status" >> $GITHUB_ENV
96-
echo "Repository status before tests: $git_status"
97-
- name: Show installed dependencies
98-
run: python -m pip list
99-
- name: Run tests on Ubuntu Test
100-
if: matrix.os == 'ubuntu-latest'
101-
run: |
102-
if [ ${{ matrix.code-cov }} ]; then codecov='--cov=openml --long --cov-report=xml'; fi
103-
# Most of the time, running only the scikit-learn tests is sufficient
104-
if [ ${{ matrix.sklearn-only }} = 'true' ]; then marks='sklearn and not production'; else marks='not production'; fi
105-
echo pytest -n 4 --durations=20 --dist load -sv $codecov -o log_cli=true -m "$marks"
106-
pytest -n 4 --durations=20 --dist load -sv $codecov -o log_cli=true -m "$marks"
107-
- name: Run tests on Ubuntu Production
108-
if: matrix.os == 'ubuntu-latest'
109-
run: |
110-
if [ ${{ matrix.code-cov }} ]; then codecov='--cov=openml --long --cov-report=xml'; fi
111-
# Most of the time, running only the scikit-learn tests is sufficient
112-
if [ ${{ matrix.sklearn-only }} = 'true' ]; then marks='sklearn and production'; else marks='production'; fi
113-
echo pytest -n 4 --durations=20 --dist load -sv $codecov -o log_cli=true -m "$marks"
114-
pytest -n 4 --durations=20 --dist load -sv $codecov -o log_cli=true -m "$marks"
115-
- name: Run tests on Windows
116-
if: matrix.os == 'windows-latest'
117-
run: | # we need a separate step because of the bash-specific if-statement in the previous one.
118-
pytest -n 4 --durations=20 --dist load -sv --reruns 5 --reruns-delay 1
119-
- name: Check for files left behind by test
120-
if: matrix.os != 'windows-latest' && always()
121-
run: |
122-
before="${{ env.BEFORE }}"
123-
after="$(git status --porcelain -b)"
124-
if [[ "$before" != "$after" ]]; then
73+
- uses: actions/checkout@v4
74+
with:
75+
fetch-depth: 2
76+
- name: Setup Python ${{ matrix.python-version }}
77+
uses: actions/setup-python@v5
78+
with:
79+
python-version: ${{ matrix.python-version }}
80+
allow-prereleases: true
81+
- name: Install test dependencies
82+
run: |
83+
python -m pip install --upgrade pip
84+
pip install -e .[test]
85+
- name: Install scikit-learn ${{ matrix.scikit-learn }}
86+
run: |
87+
pip install scikit-learn==${{ matrix.scikit-learn }}
88+
- name: "Install NumPy 1.x and SciPy <1.11 for scikit-learn < 1.4"
89+
if: ${{ contains(fromJSON('["1.0.*", "1.1.*", "1.2.*", "1.3.*"]'), matrix.scikit-learn) }}
90+
shell: bash
91+
run: |
92+
# scipy has a change to the 'mode' behavior which breaks scikit-learn < 1.4
93+
# numpy 2.0 has several breaking changes
94+
pip install "numpy<2.0" "scipy<1.11"
95+
- name: Install scipy ${{ matrix.scipy }}
96+
if: ${{ matrix.scipy }}
97+
run: |
98+
pip install scipy${{ matrix.scipy }}
99+
- name: Store repository status
100+
id: status-before
101+
if: matrix.os != 'windows-latest'
102+
run: |
103+
git_status=$(git status --porcelain -b)
104+
echo "BEFORE=$git_status" >> $GITHUB_ENV
105+
echo "Repository status before tests: $git_status"
106+
- name: Show installed dependencies
107+
run: python -m pip list
108+
- name: Run tests on Ubuntu Test
109+
if: matrix.os == 'ubuntu-latest'
110+
run: |
111+
if [ "${{ matrix.code-cov }}" = "true" ]; then codecov='--cov=openml --long --cov-report=xml'; fi
112+
# Most of the time, running only the scikit-learn tests is sufficient
113+
if [ "${{ matrix.sklearn-only }}" = "true" ]; then marks='sklearn and not production'; else marks='not production'; fi
114+
echo pytest -n 4 --durations=20 --dist load -sv $codecov -o log_cli=true -m "$marks"
115+
pytest -n 4 --durations=20 --dist load -sv $codecov -o log_cli=true -m "$marks"
116+
- name: Run tests on Ubuntu Production
117+
if: matrix.os == 'ubuntu-latest'
118+
run: |
119+
if [ "${{ matrix.code-cov }}" = "true" ]; then codecov='--cov=openml --long --cov-report=xml'; fi
120+
# Most of the time, running only the scikit-learn tests is sufficient
121+
if [ "${{ matrix.sklearn-only }}" = "true" ]; then marks='sklearn and production'; else marks='production'; fi
122+
echo pytest -n 4 --durations=20 --dist load -sv $codecov -o log_cli=true -m "$marks"
123+
pytest -n 4 --durations=20 --dist load -sv $codecov -o log_cli=true -m "$marks"
124+
- name: Run tests on Windows
125+
if: matrix.os == 'windows-latest'
126+
run: |
127+
pytest -n 4 --durations=20 --dist load -sv --reruns 5 --reruns-delay 1
128+
- name: Check for files left behind by test
129+
if: matrix.os != 'windows-latest' && always()
130+
run: |
131+
before="${{ env.BEFORE }}"
132+
after="$(git status --porcelain -b)"
133+
if [[ "$before" != "$after" ]]; then
125134
echo "git status from before: $before"
126135
echo "git status from after: $after"
127136
echo "Not all generated files have been deleted!"
128137
exit 1
129-
fi
130-
- name: Upload coverage
131-
if: matrix.code-cov && always()
132-
uses: codecov/codecov-action@v4
133-
with:
134-
files: coverage.xml
135-
token: ${{ secrets.CODECOV_TOKEN }}
136-
fail_ci_if_error: true
137-
verbose: true
138+
fi
139+
- name: Upload coverage
140+
if: matrix.code-cov && always()
141+
uses: codecov/codecov-action@v4
142+
with:
143+
files: coverage.xml
144+
token: ${{ secrets.CODECOV_TOKEN }}
145+
fail_ci_if_error: true
146+
verbose: true

.gitignore

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,4 +96,14 @@ dmypy.sock
9696

9797
# Tests
9898
.pytest_cache
99-
.venv
99+
.venv
100+
101+
# Virtual environments
102+
oenv/
103+
venv/
104+
.env/
105+
.venv/
106+
107+
# Python cache
108+
__pycache__/
109+
*.pyc

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
## The Python API for a World of Data and More :dizzy:
1616

1717
[![Latest Release](https://img.shields.io/github/v/release/openml/openml-python)](https://github.com/openml/openml-python/releases)
18-
[![Python Versions](https://img.shields.io/badge/python-3.8%20%7C%203.9%20%7C%203.10%20%7C%203.11%20%7C%203.12%20%7C%203.13-blue)](https://pypi.org/project/openml/)
18+
[![Python Versions](https://img.shields.io/badge/python-3.10%20%7C%203.11%20%7C%203.12%20%7C%203.13%20%7C%203.14-blue)](https://pypi.org/project/openml/)
1919
[![Downloads](https://static.pepy.tech/badge/openml)](https://pepy.tech/project/openml)
2020
[![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)
2121
<!-- Add green badges for CI and precommit -->
@@ -60,7 +60,7 @@ for task_id in suite.tasks:
6060

6161
## :magic_wand: Installation
6262

63-
OpenML-Python is supported on Python 3.8 - 3.13 and is available on Linux, MacOS, and Windows.
63+
OpenML-Python is supported on Python 3.10 - 3.14 and is available on Linux, MacOS, and Windows.
6464

6565
You can install OpenML-Python with:
6666

pyproject.toml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ dependencies = [
2121
"pyarrow",
2222
"tqdm", # For MinIO download progress bars
2323
]
24-
requires-python = ">=3.8"
24+
requires-python = ">=3.10,<3.15"
2525
maintainers = [
2626
{ name = "Pieter Gijsbers", email="p.gijsbers@tue.nl"},
2727
{ name = "Lennart Purucker"},
@@ -49,13 +49,11 @@ classifiers = [
4949
"Operating System :: POSIX",
5050
"Operating System :: Unix",
5151
"Operating System :: MacOS",
52-
"Programming Language :: Python :: 3",
53-
"Programming Language :: Python :: 3.8",
54-
"Programming Language :: Python :: 3.9",
55-
"Programming Language :: Python :: 3.10",
52+
"Programming Language :: Python :: 3.10",
5653
"Programming Language :: Python :: 3.11",
5754
"Programming Language :: Python :: 3.12",
5855
"Programming Language :: Python :: 3.13",
56+
"Programming Language :: Python :: 3.14",
5957
]
6058
license = { file = "LICENSE" }
6159

0 commit comments

Comments
 (0)