Skip to content

Commit 18d2665

Browse files
authored
Merge pull request #1068 from automl/development
Development
2 parents 2a4d388 + 0801bcb commit 18d2665

Some content is hidden

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

51 files changed

+4192
-2865
lines changed

.binder/apt.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
build-essential
2+
swig

.binder/postBuild

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
python -m pip install .[docs,examples]
6+
7+
# Taken from https://github.com/scikit-learn/scikit-learn/blob/22cd233e1932457947e9994285dc7fd4e93881e4/.binder/postBuild
8+
# under BSD3 license, copyright the scikit-learn contributors
9+
10+
# This script is called in a binder context. When this script is called, we are
11+
# inside a git checkout of the automl/auto-sklearn repo. This script
12+
# generates notebooks from the auto-sklearn python examples.
13+
14+
if [[ ! -f /.dockerenv ]]; then
15+
echo "This script was written for repo2docker and is supposed to run inside a docker container."
16+
echo "Exiting because this script can delete data if run outside of a docker container."
17+
exit 1
18+
fi
19+
20+
# Copy content we need from the auto-sklearn repo
21+
TMP_CONTENT_DIR=/tmp/auto-sklearn
22+
mkdir -p $TMP_CONTENT_DIR
23+
cp -r examples .binder $TMP_CONTENT_DIR
24+
# delete everything in current directory including dot files and dot folders
25+
find . -delete
26+
27+
# Generate notebooks and remove other files from examples folder
28+
GENERATED_NOTEBOOKS_DIR=examples
29+
cp -r $TMP_CONTENT_DIR/examples $GENERATED_NOTEBOOKS_DIR
30+
31+
find $GENERATED_NOTEBOOKS_DIR -name 'example_*.py' -exec sphx_glr_python_to_jupyter.py '{}' +
32+
# Keep __init__.py and custom_metrics.py
33+
NON_NOTEBOOKS=$(find $GENERATED_NOTEBOOKS_DIR -type f | grep -v '\.ipynb' | grep -v 'init' | grep -v 'custom_metrics')
34+
rm -f $NON_NOTEBOOKS
35+
36+
# Modify path to be consistent by the path given by sphinx-gallery
37+
mkdir notebooks
38+
mv $GENERATED_NOTEBOOKS_DIR notebooks/
39+
40+
# Put the .binder folder back (may be useful for debugging purposes)
41+
mv $TMP_CONTENT_DIR/.binder .
42+
# Final clean up
43+
rm -rf $TMP_CONTENT_DIR

.binder/requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
-r ../requirements.txt

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,3 +75,6 @@ coverage.xml
7575
*,cover
7676
.hypothesis/
7777
prof/
78+
79+
# Mypy
80+
.mypy_cache/

.pre-commit-config.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,27 @@ repos:
33
rev: v0.761
44
hooks:
55
- id: mypy
6+
args: [--show-error-codes]
67
name: mypy auto-sklearn-ensembles
78
files: autosklearn/ensembles
89
- id: mypy
10+
args: [--show-error-codes]
911
name: mypy auto-sklearn-metrics
1012
files: autosklearn/metrics
1113
- id: mypy
14+
args: [--show-error-codes]
1215
name: mypy auto-sklearn-data
1316
files: autosklearn/data
1417
- id: mypy
18+
args: [--show-error-codes]
1519
name: mypy auto-sklearn-util
1620
files: autosklearn/util
1721
- repo: https://gitlab.com/pycqa/flake8
1822
rev: 3.8.3
1923
hooks:
2024
- id: flake8
2125
name: flake8 auto-sklearn
22-
files: autosklearn/*
26+
files: autosklearn/.*
2327
- id: flake8
2428
name: flake8 file-order-data
2529
files: autosklearn/data
@@ -42,4 +46,4 @@ repos:
4246
- flake8-import-order
4347
- id: flake8
4448
name: flake8 autosklearn-test
45-
files: test/*
49+
files: test/.*

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.12.1"
4+
__version__ = "0.12.2"

0 commit comments

Comments
 (0)