Skip to content

Commit 2306f16

Browse files
authored
Merge pull request #1028 from automl/development
Development
2 parents 13d1c06 + 7ef86da commit 2306f16

File tree

574 files changed

+68015
-61216
lines changed

Some content is hidden

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

574 files changed

+68015
-61216
lines changed

.flake8

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[flake8]
2+
max-line-length = 100
3+
show-source = True
4+
application-import-names = autosklearn
5+
exclude =
6+
venv
7+
build

.github/workflows/dist.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: dist-check
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
dist:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v2
10+
- name: Setup Python
11+
uses: actions/setup-python@v2
12+
with:
13+
python-version: 3.8
14+
- name: Build dist
15+
run: |
16+
python setup.py sdist
17+
- name: Twine check
18+
run: |
19+
pip install twine
20+
last_dist=$(ls -t dist/auto-sklearn-*.tar.gz | head -n 1)
21+
twine_output=`twine check "$last_dist"`
22+
if [[ "$twine_output" != "Checking $last_dist: PASSED" ]]; then echo $twine_output && exit 1;fi
23+
- name: Install dist
24+
run: |
25+
last_dist=$(ls -t dist/auto-sklearn-*.tar.gz | head -n 1)
26+
pip install $last_dist
27+
- name: PEP 561 Compliance
28+
run: |
29+
pip install mypy
30+
cd .. # required to use the installed version of autosklearn
31+
if ! python -c "import autosklearn"; then exit 1; fi

.github/workflows/docs.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Docs
2+
on: [pull_request, push]
3+
4+
jobs:
5+
build-and-deploy:
6+
runs-on: ubuntu-latest
7+
steps:
8+
- uses: actions/checkout@v2
9+
- name: Setup Python
10+
uses: actions/setup-python@v2
11+
with:
12+
python-version: 3.8
13+
- name: Install dependencies
14+
run: |
15+
pip install -e .[docs,examples,examples_unix]
16+
- name: Make docs
17+
run: |
18+
cd doc
19+
make html
20+
- name: Pull latest gh-pages
21+
if: (contains(github.ref, 'develop') || contains(github.ref, 'master')) && github.event_name == 'push'
22+
run: |
23+
cd ..
24+
git clone https://github.com/automl/auto-sklearn.git --branch gh-pages --single-branch gh-pages
25+
- name: Copy new doc into gh-pages
26+
if: (contains(github.ref, 'develop') || contains(github.ref, 'master')) && github.event_name == 'push'
27+
run: |
28+
branch_name=${GITHUB_REF##*/}
29+
cd ../gh-pages
30+
rm -rf $branch_name
31+
cp -r ../autosklearn/doc/build/html $branch_name
32+
- name: Push to gh-pages
33+
if: (contains(github.ref, 'develop') || contains(github.ref, 'master')) && github.event_name == 'push'
34+
run: |
35+
last_commit=$(git log --pretty=format:"%an: %s")
36+
cd ../gh-pages
37+
branch_name=${GITHUB_REF##*/}
38+
git add $branch_name/
39+
git config --global user.name 'Github Actions'
40+
git config --global user.email '[email protected]'
41+
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}
42+
git commit -am "$last_commit"
43+
git push

.github/workflows/pre-commit.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: pre-commit
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
run-all-files:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v2
10+
- name: Setup Python 3.7
11+
uses: actions/setup-python@v2
12+
with:
13+
python-version: 3.7
14+
- name: Install pre-commit
15+
run: |
16+
pip install pre-commit
17+
pre-commit install
18+
- name: Run pre-commit
19+
run: |
20+
pre-commit run --all-files

.github/workflows/pytest.yml

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
name: Tests
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
ubuntu:
7+
8+
runs-on: ubuntu-latest
9+
strategy:
10+
matrix:
11+
python-version: [3.6, 3.7, 3.8]
12+
use-conda: [true, false]
13+
use-dist: [false]
14+
include:
15+
- python-version: 3.8
16+
code-cov: true
17+
- python-version: 3.7
18+
use-conda: false
19+
use-dist: true
20+
fail-fast: false
21+
22+
steps:
23+
- uses: actions/checkout@v2
24+
- name: Setup Python ${{ matrix.python-version }}
25+
uses: actions/setup-python@v2
26+
with:
27+
python-version: ${{ matrix.python-version }}
28+
- name: Conda Install test dependencies
29+
if: matrix.use-conda == true
30+
run: |
31+
# Miniconda is available in $CONDA env var
32+
$CONDA/bin/conda create -n testenv --yes pip wheel gxx_linux-64 gcc_linux-64 swig python=${{ matrix.python-version }}
33+
$CONDA/envs/testenv/bin/python3 -m pip install --upgrade pip
34+
$CONDA/envs/testenv/bin/pip3 install -e .[test]
35+
- name: Install test dependencies
36+
if: matrix.use-conda == false && matrix.use-dist == false
37+
run: |
38+
python -m pip install --upgrade pip
39+
if [[ `python -c 'import platform; print(platform.python_version())' | cut -d '.' -f 2` -eq 6 ]]; then
40+
# Numpy 1.20 dropped suppert for Python3.6
41+
pip install "numpy<=1.19"
42+
fi
43+
pip install -e .[test]
44+
sudo apt-get update
45+
sudo apt-get remove swig
46+
sudo apt-get install swig3.0
47+
sudo ln -s /usr/bin/swig3.0 /usr/bin/swig
48+
- name: Dist Install test dependencies
49+
if: matrix.use-conda == false && matrix.use-dist == true
50+
run: |
51+
python -m pip install --upgrade pip
52+
sudo apt-get update
53+
sudo apt-get remove swig
54+
sudo apt-get install swig3.0
55+
sudo ln -s /usr/bin/swig3.0 /usr/bin/swig
56+
# We need to install for the dependencies, like pytest
57+
pip install -e .[test]
58+
# Then we remove autosklearn and install from DIST
59+
pip uninstall --yes auto-sklearn
60+
python setup.py sdist
61+
last_dist=$(ls -t dist/auto-sklearn-*.tar.gz | head -n 1)
62+
pip install $last_dist
63+
- name: Store repository status
64+
id: status-before
65+
run: |
66+
echo "::set-output name=BEFORE::$(git status --porcelain -b)"
67+
- name: Conda Run tests
68+
if: matrix.use-conda == true
69+
run: |
70+
export OPENBLAS_NUM_THREADS=1
71+
export OMP_NUM_THREADS=1
72+
export MKL_NUM_THREADS=1
73+
# We activate conda as metalearning uses python directly, so we need
74+
# to change the default python
75+
export PATH="$CONDA/envs/testenv/bin:$PATH"
76+
if [ ${{ matrix.code-cov }} ]; then codecov='--cov=autosklearn --cov-report=xml'; fi
77+
$CONDA/envs/testenv/bin/python3 -m pytest --durations=20 --timeout=300 --timeout-method=thread -v $codecov test
78+
- name: Run tests
79+
if: matrix.use-conda == false
80+
run: |
81+
export OPENBLAS_NUM_THREADS=1
82+
export OMP_NUM_THREADS=1
83+
export MKL_NUM_THREADS=1
84+
if [ ${{ matrix.code-cov }} ]; then codecov='--cov=autosklearn --cov-report=xml'; fi
85+
pytest --durations=20 --timeout=300 --timeout-method=thread -v $codecov test
86+
- name: Check for files left behind by test
87+
if: ${{ always() }}
88+
run: |
89+
before="${{ steps.status-before.outputs.BEFORE }}"
90+
after="$(git status --porcelain -b)"
91+
if [[ "$before" != "$after" ]]; then
92+
echo "git status from before: $before"
93+
echo "git status from after: $after"
94+
echo "Not all generated files have been deleted!"
95+
exit 1
96+
fi
97+
- name: Upload coverage
98+
if: matrix.code-cov && always()
99+
uses: codecov/codecov-action@v1
100+
with:
101+
fail_ci_if_error: true
102+
verbose: true

.gitignore

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,24 @@ number_submission
5454
.pypirc
5555
dmypy.json
5656
*.log
57+
58+
# Dask created work space
59+
dask-worker-space
60+
61+
# Python distribution generated files
62+
.eggs
63+
64+
# Unit test / coverage reports
65+
htmlcov/
66+
cover
67+
coverage
68+
htmlcov
69+
.tox/
70+
.coverage
71+
.coverage.*
72+
.cache
73+
nosetests.xml
74+
coverage.xml
75+
*,cover
76+
.hypothesis/
77+
prof/

.pre-commit-config.yaml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/mirrors-mypy
3+
rev: v0.761
4+
hooks:
5+
- id: mypy
6+
name: mypy auto-sklearn-ensembles
7+
files: autosklearn/ensembles
8+
- id: mypy
9+
name: mypy auto-sklearn-metrics
10+
files: autosklearn/metrics
11+
- id: mypy
12+
name: mypy auto-sklearn-data
13+
files: autosklearn/data
14+
- id: mypy
15+
name: mypy auto-sklearn-util
16+
files: autosklearn/util
17+
- repo: https://gitlab.com/pycqa/flake8
18+
rev: 3.8.3
19+
hooks:
20+
- id: flake8
21+
name: flake8 auto-sklearn
22+
files: autosklearn/*
23+
- id: flake8
24+
name: flake8 file-order-data
25+
files: autosklearn/data
26+
additional_dependencies:
27+
- flake8-import-order
28+
- id: flake8
29+
name: flake8 file-order-ensemble
30+
files: autosklearn/ensembles
31+
additional_dependencies:
32+
- flake8-import-order
33+
- id: flake8
34+
name: flake8 file-order-metrics
35+
files: autosklearn/metrics
36+
additional_dependencies:
37+
- flake8-import-order
38+
- id: flake8
39+
name: flake8 file-order-util
40+
files: autosklearn/util
41+
additional_dependencies:
42+
- flake8-import-order
43+
- id: flake8
44+
name: flake8 autosklearn-test
45+
files: test/*

.travis.yml

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

autosklearn/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
sys.platform
2121
)
2222

23-
if sys.version_info < (3, 5):
23+
if sys.version_info < (3, 6):
2424
raise ValueError(
2525
'Unsupported python version %s found. Auto-sklearn requires Python '
26-
'3.5 or higher.' % sys.version_info
26+
'3.6 or higher.' % sys.version_info
2727
)

autosklearn/__version__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
"""Version information."""
22

33
# The following line *must* be the last in the module, exactly as formatted:
4-
__version__ = "0.11.1"
4+
__version__ = "0.12.0"

0 commit comments

Comments
 (0)