Skip to content

Commit 3380bbb

Browse files
authored
Merge pull request #1232 from openml/develop
Release 0.13.1
2 parents d2ccfe9 + bb3793d commit 3380bbb

File tree

94 files changed

+2577
-1008
lines changed

Some content is hidden

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

94 files changed

+2577
-1008
lines changed

.flake8

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ select = C,E,F,W,B,T
55
ignore = E203, E402, W503
66
per-file-ignores =
77
*__init__.py:F401
8-
*cli.py:T001
8+
*cli.py:T201
99
exclude =
1010
venv
1111
examples

.github/dependabot.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
version: 2
2+
3+
updates:
4+
# This will check for updates to github actions every day
5+
# https://docs.github.com/en/[email protected]/code-security/dependabot/working-with-dependabot/keeping-your-actions-up-to-date-with-dependabot
6+
- package-ecosystem: "github-actions"
7+
directory: "/"
8+
schedule:
9+
interval: "daily"

.github/workflows/dist.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ jobs:
66
dist:
77
runs-on: ubuntu-latest
88
steps:
9-
- uses: actions/checkout@v2
9+
- uses: actions/checkout@v3
1010
- name: Setup Python
11-
uses: actions/setup-python@v2
11+
uses: actions/setup-python@v4
1212
with:
1313
python-version: 3.8
1414
- name: Build dist

.github/workflows/docs.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,17 @@ jobs:
55
build-and-deploy:
66
runs-on: ubuntu-latest
77
steps:
8-
- uses: actions/checkout@v2
8+
- uses: actions/checkout@v3
99
- name: Setup Python
10-
uses: actions/setup-python@v2
10+
uses: actions/setup-python@v4
1111
with:
1212
python-version: 3.8
1313
- name: Install dependencies
1414
run: |
1515
pip install -e .[docs,examples,examples_unix]
16+
# dependency "fanova" does not work with numpy 1.24 or later
17+
# https://github.com/automl/fanova/issues/108
18+
pip install numpy==1.23.5
1619
- name: Make docs
1720
run: |
1821
cd doc

.github/workflows/pre-commit.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ jobs:
66
run-all-files:
77
runs-on: ubuntu-latest
88
steps:
9-
- uses: actions/checkout@v2
9+
- uses: actions/checkout@v3
1010
- name: Setup Python 3.7
11-
uses: actions/setup-python@v2
11+
uses: actions/setup-python@v4
1212
with:
1313
python-version: 3.7
1414
- name: Install pre-commit

.github/workflows/release_docker.yaml

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,29 +3,46 @@ name: release-docker
33
on:
44
push:
55
branches:
6+
- 'main'
67
- 'develop'
78
- 'docker'
89

910
jobs:
11+
1012
docker:
13+
1114
runs-on: ubuntu-latest
15+
1216
steps:
1317
- name: Set up QEMU
14-
uses: docker/setup-qemu-action@v1
18+
uses: docker/setup-qemu-action@v2
19+
1520
- name: Set up Docker Buildx
16-
uses: docker/setup-buildx-action@v1
21+
uses: docker/setup-buildx-action@v2
22+
1723
- name: Login to DockerHub
18-
uses: docker/login-action@v1
24+
uses: docker/login-action@v2
1925
with:
2026
username: ${{ secrets.DOCKERHUB_USERNAME }}
2127
password: ${{ secrets.DOCKERHUB_TOKEN }}
22-
- uses: actions/checkout@v2
28+
29+
- name: Check out the repo
30+
uses: actions/checkout@v3
31+
32+
- name: Extract metadata (tags, labels) for Docker Hub
33+
id: meta_dockerhub
34+
uses: docker/metadata-action@v4
35+
with:
36+
images: "openml/openml-python"
37+
2338
- name: Build and push
2439
id: docker_build
25-
uses: docker/build-push-action@v2
40+
uses: docker/build-push-action@v4
2641
with:
2742
context: ./docker/
2843
push: true
29-
tags: openml/openml-python:latest
44+
tags: ${{ steps.meta_dockerhub.outputs.tags }}
45+
labels: ${{ steps.meta_dockerhub.outputs.labels }}
46+
3047
- name: Image digest
3148
run: echo ${{ steps.docker_build.outputs.digest }}

.github/workflows/test.yml

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
name: Tests
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
test:
7+
name: (${{ matrix.os }}, Py${{ matrix.python-version }}, sk${{ matrix.scikit-learn }}, sk-only:${{ matrix.sklearn-only }})
8+
runs-on: ${{ matrix.os }}
9+
strategy:
10+
matrix:
11+
python-version: [3.7, 3.8]
12+
scikit-learn: [0.21.2, 0.22.2, 0.23.1, 0.24]
13+
os: [ubuntu-latest]
14+
sklearn-only: ['true']
15+
exclude: # no scikit-learn 0.21.2 release for Python 3.8
16+
- python-version: 3.8
17+
scikit-learn: 0.21.2
18+
include:
19+
- python-version: 3.6
20+
scikit-learn: 0.18.2
21+
scipy: 1.2.0
22+
os: ubuntu-20.04
23+
sklearn-only: 'true'
24+
- python-version: 3.6
25+
scikit-learn: 0.19.2
26+
os: ubuntu-20.04
27+
sklearn-only: 'true'
28+
- python-version: 3.6
29+
scikit-learn: 0.20.2
30+
os: ubuntu-20.04
31+
sklearn-only: 'true'
32+
- python-version: 3.6
33+
scikit-learn: 0.21.2
34+
os: ubuntu-20.04
35+
sklearn-only: 'true'
36+
- python-version: 3.6
37+
scikit-learn: 0.22.2
38+
os: ubuntu-20.04
39+
sklearn-only: 'true'
40+
- python-version: 3.6
41+
scikit-learn: 0.23.1
42+
os: ubuntu-20.04
43+
sklearn-only: 'true'
44+
- python-version: 3.6
45+
scikit-learn: 0.24
46+
os: ubuntu-20.04
47+
sklearn-only: 'true'
48+
- python-version: 3.8
49+
scikit-learn: 0.23.1
50+
code-cov: true
51+
sklearn-only: 'false'
52+
os: ubuntu-latest
53+
- os: windows-latest
54+
sklearn-only: 'false'
55+
scikit-learn: 0.24.*
56+
fail-fast: false
57+
max-parallel: 4
58+
59+
steps:
60+
- uses: actions/checkout@v3
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.7.9)
65+
uses: actions/setup-python@v4
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' && contains(fromJSON('["0.23.1", "0.22.2", "0.21.2"]'), matrix.scikit-learn) }}
78+
run: |
79+
pip install numpy==1.23.5
80+
- name: Install scipy ${{ matrix.scipy }}
81+
if: ${{ matrix.scipy }}
82+
run: |
83+
pip install scipy==${{ matrix.scipy }}
84+
- name: Store repository status
85+
id: status-before
86+
run: |
87+
echo "::set-output name=BEFORE::$(git status --porcelain -b)"
88+
- name: Run tests on Ubuntu
89+
if: matrix.os == 'ubuntu-latest'
90+
run: |
91+
if [ ${{ matrix.code-cov }} ]; then codecov='--cov=openml --long --cov-report=xml'; fi
92+
# Most of the time, running only the scikit-learn tests is sufficient
93+
if [ ${{ matrix.sklearn-only }} = 'true' ]; then sklearn='-m sklearn'; fi
94+
echo pytest -n 4 --durations=20 --timeout=600 --timeout-method=thread --dist load -sv $codecov $sklearn --reruns 5 --reruns-delay 1 -o log_cli=true
95+
pytest -n 4 --durations=20 --timeout=600 --timeout-method=thread --dist load -sv $codecov $sklearn --reruns 5 --reruns-delay 1 -o log_cli=true
96+
- name: Run tests on Windows
97+
if: matrix.os == 'windows-latest'
98+
run: | # we need a separate step because of the bash-specific if-statement in the previous one.
99+
pytest -n 4 --durations=20 --timeout=600 --timeout-method=thread --dist load -sv --reruns 5 --reruns-delay 1
100+
- name: Check for files left behind by test
101+
if: matrix.os != 'windows-latest' && always()
102+
run: |
103+
before="${{ steps.status-before.outputs.BEFORE }}"
104+
after="$(git status --porcelain -b)"
105+
if [[ "$before" != "$after" ]]; then
106+
echo "git status from before: $before"
107+
echo "git status from after: $after"
108+
echo "Not all generated files have been deleted!"
109+
exit 1
110+
fi
111+
- name: Upload coverage
112+
if: matrix.code-cov && always()
113+
uses: codecov/codecov-action@v3
114+
with:
115+
files: coverage.xml
116+
fail_ci_if_error: true
117+
verbose: true

.github/workflows/ubuntu-test.yml

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

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
*~
22
doc/generated
33
examples/.ipynb_checkpoints
4+
venv
5+
46
# Byte-compiled / optimized / DLL files
57
__pycache__/
68
*.py[cod]
@@ -75,6 +77,7 @@ target/
7577
# IDE
7678
.idea
7779
*.swp
80+
.vscode
7881

7982
# MYPY
8083
.mypy_cache

.pre-commit-config.yaml

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,34 @@
11
repos:
22
- repo: https://github.com/psf/black
3-
rev: 19.10b0
3+
rev: 22.6.0
44
hooks:
55
- id: black
66
args: [--line-length=100]
77
- repo: https://github.com/pre-commit/mirrors-mypy
8-
rev: v0.761
8+
rev: v0.961
99
hooks:
1010
- id: mypy
1111
name: mypy openml
12-
files: openml/*
12+
files: openml/.*
13+
additional_dependencies:
14+
- types-requests
15+
- types-python-dateutil
1316
- id: mypy
1417
name: mypy tests
15-
files: tests/*
16-
- repo: https://gitlab.com/pycqa/flake8
17-
rev: 3.8.3
18+
files: tests/.*
19+
additional_dependencies:
20+
- types-requests
21+
- types-python-dateutil
22+
- repo: https://github.com/pycqa/flake8
23+
rev: 4.0.1
1824
hooks:
1925
- id: flake8
2026
name: flake8 openml
21-
files: openml/*
27+
files: openml/.*
2228
additional_dependencies:
23-
- flake8-print==3.1.4
29+
- flake8-print==5.0.0
2430
- id: flake8
2531
name: flake8 tests
26-
files: tests/*
32+
files: tests/.*
2733
additional_dependencies:
28-
- flake8-print==3.1.4
34+
- flake8-print==5.0.0

0 commit comments

Comments
 (0)