Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
97 commits
Select commit Hold shift + click to select a range
c8b726e
Updated installation instructions
joaquinvanschoren Apr 25, 2018
1a4555a
Updated example
joaquinvanschoren Apr 25, 2018
4118a96
added serialize run functionality
janvanrijn Apr 30, 2018
52e301b
removed exist ok argument
janvanrijn Apr 30, 2018
3209892
fixed unit test
janvanrijn Apr 30, 2018
050a572
changes requested by @mfeurer
janvanrijn Apr 30, 2018
59d8e05
Merge pull request #455 from openml/master
mfeurer May 1, 2018
d0e2cd2
Bump version number for develop
mfeurer May 1, 2018
d92e9f2
updated docstring
janvanrijn May 1, 2018
ec82219
extended unit tests
janvanrijn May 1, 2018
529f467
several bugfixes for listing fn
janvanrijn May 3, 2018
7cb8ffd
refactored list all fn name to be protected
janvanrijn May 3, 2018
5db107b
changed catched exception
janvanrijn May 3, 2018
1b1ed8b
fixed unit test and _list_all
janvanrijn May 3, 2018
6f6b46e
batch size
janvanrijn May 3, 2018
4a936cb
changes suggested by @mfeurer
janvanrijn May 3, 2018
1f9c467
added to change log
janvanrijn May 3, 2018
c58744a
Merge pull request #464 from openml/fix_listing
mfeurer May 4, 2018
870dfbf
Merge pull request #459 from openml/serialize_run
janvanrijn May 4, 2018
c3a0104
Merge pull request #461 from openml/mfeurer-patch-1
mfeurer May 16, 2018
fa3b23c
[WIP] Appveyor ci (#462)
PGijsbers May 16, 2018
805059d
Removing split pickling (#470)
ArlindKadra May 18, 2018
5b1eb29
[WIP] Fix and improve dataset upload (#440)
mfeurer Jun 3, 2018
4603345
Fix/451 (WIP?) (#452)
PGijsbers Jun 8, 2018
9ffc91a
update installation instruction and improve docs
mfeurer Jun 14, 2018
fe1d10d
Merge branch 'develop' into joaquinvanschoren-patch-1
mfeurer Jun 14, 2018
d24c04c
Remove duplicate URL
mfeurer Jun 14, 2018
351e2b7
Merge pull request #456 from openml/joaquinvanschoren-patch-1
joaquinvanschoren Jun 18, 2018
a954ce2
ADD raise exception when failing to create sklearn flow (#479)
mfeurer Jun 19, 2018
666d4c7
Initializes sklearn object from flow with default hyperparam configur…
janvanrijn Jun 19, 2018
906992a
Unit test and fix for #422 (#481)
mfeurer Jun 21, 2018
bddd2e0
FIX store fold name in run (#490)
mfeurer Jul 23, 2018
4c12c3b
FIX 491 (#492)
janvanrijn Jul 23, 2018
5a1048d
added the option to not store a model of filesystem (#493)
janvanrijn Jul 25, 2018
29faf3b
fixes single docstring indentation
janvanrijn Aug 8, 2018
1e5235e
fixes unit test error
janvanrijn Aug 9, 2018
13c1237
skip doctest without proper order definition
janvanrijn Aug 10, 2018
8bd65f8
changed travis version of python from 3.4 to 3.7
janvanrijn Aug 10, 2018
8c923be
removed python 3.7
janvanrijn Aug 10, 2018
531038d
Fix500 (#502)
janvanrijn Aug 13, 2018
c4f50f0
Merge pull request #499 from openml/fix_docstring
janvanrijn Aug 13, 2018
c08dd0f
Examples Gallery (#478)
ArlindKadra Aug 22, 2018
d761ddf
Removed unused code (#518)
ArlindKadra Sep 11, 2018
75c1934
FIX workshop webpage address (#503)
mfeurer Sep 13, 2018
fe53ba1
[WIP] Circle drop (#510)
ArlindKadra Sep 13, 2018
1f8fb60
FIX replace if statement with assumptions by one without (#489)
mfeurer Sep 13, 2018
07f46eb
Update contributing.rst (#488)
mfeurer Sep 14, 2018
41696d1
Enhancement (#521)
ArlindKadra Sep 18, 2018
17ebae3
Removed try except (#524)
ArlindKadra Sep 18, 2018
c77cbb4
openml server exception
janvanrijn Sep 18, 2018
cd7d74b
Fix #504 (#505)
janvanrijn Sep 19, 2018
bd85d5e
Migrate to Pytest (#527)
rth Sep 19, 2018
565c06e
Changes to the tutorial (#533)
ArlindKadra Sep 19, 2018
34c06df
[MRG] MAINT: compatibility sklearn 0.20 (#526)
glemaitre Sep 20, 2018
3af0ecb
Pep8 enforce (#535)
ArlindKadra Sep 20, 2018
55c8c09
[MRG] TST: add test for creating datset from NumPy array (#539)
glemaitre Sep 20, 2018
8786457
Add python 3.7 build (#542)
ArlindKadra Sep 21, 2018
a01949d
Moretasks (#544)
joaquinvanschoren Sep 21, 2018
d3215c0
#563 Fixing run print bug with blank flow_name (#552)
ledell Sep 24, 2018
2d106e6
add create_dataset to api docs (#556)
amueller Sep 27, 2018
460361c
MAINT/CI test with latest scikit-learn version (#557)
mfeurer Sep 27, 2018
d5ca1d1
[MRG] Support for ColumnTransformer (#523)
janvanrijn Sep 28, 2018
811f9ce
WIP: More extensive unit tests for run to / from xml (#482)
mfeurer Oct 1, 2018
ba94609
fixes minor indentation problems (#563)
janvanrijn Oct 5, 2018
523eb73
added tests for correct status
janvanrijn Oct 10, 2018
c8ac18f
Merge branch 'develop' into add_#528
janvanrijn Oct 10, 2018
2fa87b9
added dataset status reference
janvanrijn Oct 10, 2018
b28fde8
pep8 fix
janvanrijn Oct 10, 2018
bae83c6
Merge pull request #529 from openml/add_#528
janvanrijn Oct 10, 2018
779fb82
fixes issue #565 and removes future / deprecation warnings (#566)
janvanrijn Oct 12, 2018
4ef4694
Fix parallel get_task failing (#572)
ArlindKadra Oct 15, 2018
8ed133e
Issue 540 (#547)
ArlindKadra Oct 17, 2018
bc2f71f
Fix documentation (#575)
ArlindKadra Oct 17, 2018
8646ef2
makes listing calls obtain correct amount of calls when not enough re…
janvanrijn Oct 20, 2018
a283df8
conditional mock import
janvanrijn Oct 20, 2018
c232ef2
Please flake8
mfeurer Oct 22, 2018
95d12e5
Merge pull request #581 from openml/fix_#580
janvanrijn Oct 22, 2018
f22c393
[MRG] EHN: allow to upload DataFrame and infer dtype and column name …
glemaitre Oct 23, 2018
d8f4807
Fix typos.
PGijsbers Oct 27, 2018
e5772f0
Fix typo.
PGijsbers Oct 27, 2018
7b81dae
Merge pull request #584 from openml/docfix
joaquinvanschoren Oct 28, 2018
6c75554
Refactoring task.py (#588)
ArlindKadra Nov 13, 2018
696db49
[MRG] EHN: inferred row_id_attribute from dataframe to create a datas…
glemaitre Nov 16, 2018
c69b0a6
add examples to the menu, remove double progress (#554)
amueller Nov 16, 2018
b9035c4
[MRG] EHN: support SparseDataFrame when creating a dataset (#583)
glemaitre Nov 16, 2018
070b363
temporary fix for failing unit test (#598)
ArlindKadra Nov 30, 2018
57d61c4
Single input task partial fix (#541)
ArlindKadra Dec 3, 2018
876be65
[MRG] DEPR: remove the format parameter from create_dataset (#592)
glemaitre Dec 6, 2018
aae0e5b
fix 604 (#605)
janvanrijn Dec 7, 2018
04c4d0e
Fix #569: crash when sklearn version does not collide (#601)
janvanrijn Dec 7, 2018
7c0a77d
Adds flow.get_structure and flow.get_subflow (which are complements o…
janvanrijn Dec 11, 2018
4a7db0e
Subclass all test classes from openml test helper (#609)
mfeurer Jan 29, 2019
2e69fe0
Per fold evals (#613)
janvanrijn Feb 11, 2019
ecdf9b1
added documentation for running specific tests (#561)
joaquinvanschoren Feb 13, 2019
2375940
Fix602 (#615)
janvanrijn Feb 13, 2019
b71325c
MAINT prepare new release (#600)
mfeurer Feb 13, 2019
cefd097
Fix issues (#618)
mfeurer Feb 14, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 32 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,38 @@ env:
- TEST_DIR=/tmp/test_dir/
- MODULE=openml
matrix:
- DISTRIB="conda" PYTHON_VERSION="2.7" SKLEARN_VERSION="0.18.2"
- DISTRIB="conda" PYTHON_VERSION="3.4" SKLEARN_VERSION="0.18.2"
- DISTRIB="conda" PYTHON_VERSION="3.5" SKLEARN_VERSION="0.18.2"
- DISTRIB="conda" PYTHON_VERSION="3.6" COVERAGE="true" SKLEARN_VERSION="0.18.2"
- DISTRIB="conda" PYTHON_VERSION="3.6" EXAMPLES="true" SKLEARN_VERSION="0.18.2"
- DISTRIB="conda" PYTHON_VERSION="3.6" DOCTEST="true" SKLEARN_VERSION="0.18.2"
- DISTRIB="conda" PYTHON_VERSION="2.7" SKLEARN_VERSION="0.20.0"
- DISTRIB="conda" PYTHON_VERSION="3.5" SKLEARN_VERSION="0.20.0"
- DISTRIB="conda" PYTHON_VERSION="3.6" SKLEARN_VERSION="0.20.0"
- DISTRIB="conda" PYTHON_VERSION="3.7" SKLEARN_VERSION="0.20.0" RUN_FLAKE8="true" SKIP_TESTS="true"
- DISTRIB="conda" PYTHON_VERSION="3.7" SKLEARN_VERSION="0.20.0" COVERAGE="true" DOCPUSH="true"
# Checks for older scikit-learn versions (which also don't nicely work with
# Python3.7)
- DISTRIB="conda" PYTHON_VERSION="3.6" SKLEARN_VERSION="0.19.2"
- DISTRIB="conda" PYTHON_VERSION="3.6" SKLEARN_VERSION="0.18.2"

# Travis issue
# https://github.com/travis-ci/travis-ci/issues/8920
before_install:
- python -c "import fcntl; fcntl.fcntl(1, fcntl.F_SETFL, 0)"

install: source ci_scripts/install.sh
script: bash ci_scripts/test.sh
after_success: source ci_scripts/success.sh
after_success: source ci_scripts/success.sh && source ci_scripts/create_doc.sh $TRAVIS_BRANCH "doc_result"

# travis will check the deploy on condition, before actually running before_deploy
# before_deploy: source ci_scripts/create_doc.sh $TRAVIS_BRANCH "doc_result"

# For more info regarding the deploy process and the github token look at:
# https://docs.travis-ci.com/user/deployment/pages/

deploy:
provider: pages
skip_cleanup: true
github_token: $GITHUB_TOKEN
keep-history: true
committer-from-gh: true
on:
all_branches: true
condition: $doc_result = "success"
local_dir: doc/$TRAVIS_BRANCH
12 changes: 7 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,14 @@ following rules before you submit a pull request:
[task list](https://github.com/blog/1375-task-lists-in-gfm-issues-pulls-comments)
in the PR description.

- All tests pass when running `nosetests`. On
- All tests pass when running `pytest`. On
Unix-like systems, check with (from the toplevel source folder):

```bash
$ nosetests
$ pytest
```

For Windows systems, execute the command from an Anaconda Prompt or add `nosetests` to PATH before executing the command.
For Windows systems, execute the command from an Anaconda Prompt or add `pytest` to PATH before executing the command.

- Documentation and high-coverage tests are necessary for enhancements to be
accepted. Bug-fixes or new features should be provided with
Expand All @@ -92,15 +92,17 @@ following rules before you submit a pull request:
For the Bug-fixes case, at the time of the PR, this tests should fail for
the code base in develop and pass for the PR code.

- Add your changes to the changelog in the file doc/progress.rst.


You can also check for common programming errors with the following
tools:

- Code with good unittest **coverage** (at least 80%), check with:

```bash
$ pip install nose coverage
$ nosetests --with-coverage path/to/tests_for_package
$ pip install pytest pytest-cov
$ pytest --cov=. path/to/tests_for_package
```

- No pyflakes warnings, check with:
Expand Down
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

PYTHON ?= python
CYTHON ?= cython
NOSETESTS ?= nosetests
PYTEST ?= pytest
CTAGS ?= ctags

all: clean inplace test
Expand All @@ -16,12 +16,12 @@ inplace:
$(PYTHON) setup.py build_ext -i

test-code: in
$(NOSETESTS) -s -v tests
$(PYTEST) -s -v tests
test-doc:
$(NOSETESTS) -s -v doc/*.rst
$(PYTEST) -s -v doc/*.rst

test-coverage:
rm -rf coverage .coverage
$(NOSETESTS) -s -v --with-coverage tests
$(PYTEST) -s -v --cov=. tests

test: test-code test-sphinxext test-doc
18 changes: 8 additions & 10 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,14 @@
clone_folder: C:\\projects\\openml-python

environment:
global:
CMD_IN_ENV: "cmd /E:ON /V:ON /C .\\appveyor\\scikit-learn-contrib\\run_with_env.cmd"
# global:
# CMD_IN_ENV: "cmd /E:ON /V:ON /C .\\appveyor\\scikit-learn-contrib\\run_with_env.cmd"

matrix:
- PYTHON: "C:\\Python35-x64"
PYTHON_VERSION: "3.5"
PYTHON_ARCH: "64"
MINICONDA: "C:\\Miniconda35-x64"

- PYTHON: "C:\\Python35"
PYTHON_VERSION: "3.5"
PYTHON_ARCH: "32"
MINICONDA: "C:\\Miniconda35"

matrix:
fast_finish: true
Expand All @@ -36,17 +32,19 @@ install:
# XXX: setuptools>23 is currently broken on Win+py3 with numpy
# (https://github.com/pypa/setuptools/issues/728)
- conda update --all --yes setuptools=23
- conda install --yes nb_conda nb_conda_kernels

# Install the build and runtime dependencies of the project.
- "cd C:\\projects\\openml-python"
- conda install --quiet --yes mock numpy scipy nose requests scikit-learn nbformat python-dateutil nbconvert
- conda install --quiet --yes scikit-learn=0.18.2
- conda install --quiet --yes mock numpy scipy pytest requests nbformat python-dateutil nbconvert pandas matplotlib seaborn
- pip install liac-arff xmltodict oslo.concurrency
- "%CMD_IN_ENV% python setup.py install"
- "pip install .[test]"


# Not a .NET project, we build scikit-learn in the install step instead
build: false

test_script:
- "cd C:\\projects\\openml-python"
- "%CMD_IN_ENV% python setup.py test"
- "%CMD_IN_ENV% pytest"
59 changes: 59 additions & 0 deletions ci_scripts/create_doc.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
set -euo pipefail

# Check if DOCPUSH is set
if ! [[ -z ${DOCPUSH+x} ]]; then

if [[ "$DOCPUSH" == "true" ]]; then

# install documentation building dependencies
pip install matplotlib seaborn sphinx pillow sphinx-gallery sphinx_bootstrap_theme cython numpydoc nbformat nbconvert

# $1 is the branch name
# $2 is the global variable where we set the script status

if ! { [ $1 = "master" ] || [ $1 = "develop" ]; }; then
{ echo "Not one of the allowed branches"; exit 0; }
fi

# delete any previous documentation folder
if [ -d doc/$1 ]; then
rm -rf doc/$1
fi

# create the documentation
cd doc && make html 2>&1

# create directory with branch name
# the documentation for dev/stable from git will be stored here
mkdir $1

# get previous documentation from github
git clone https://github.com/openml/openml-python.git --branch gh-pages --single-branch

# copy previous documentation
cp -r openml-python/. $1
rm -rf openml-python

# if the documentation for the branch exists, remove it
if [ -d $1/$1 ]; then
rm -rf $1/$1
fi

# copy the updated documentation for this branch
mkdir $1/$1
cp -r build/html/. $1/$1

# takes a variable name as an argument and assigns the script outcome to a
# variable with the given name. If it got this far, the script was successful
function set_return() {
# $1 is the variable where we save the script outcome
local __result=$1
local status='success'
eval $__result="'$status'"
}

set_return "$2"
fi
fi
# Workaround for travis failure
set +u
140 changes: 140 additions & 0 deletions ci_scripts/flake8_diff.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
#!/bin/bash

# Inspired from https://github.com/scikit-learn/scikit-learn/blob/master/build_tools/travis/flake8_diff.sh

# This script is used in Travis to check that PRs do not add obvious
# flake8 violations. It relies on two things:
# - find common ancestor between branch and
# openml/openml-python remote
# - run flake8 --diff on the diff between the branch and the common
# ancestor
#
# Additional features:
# - the line numbers in Travis match the local branch on the PR
# author machine.
# - ./ci_scripts/flake8_diff.sh can be run locally for quick
# turn-around

set -e
# pipefail is necessary to propagate exit codes
set -o pipefail

PROJECT=openml/openml-python
PROJECT_URL=https://github.com/$PROJECT.git

# Find the remote with the project name (upstream in most cases)
REMOTE=$(git remote -v | grep $PROJECT | cut -f1 | head -1 || echo '')

# Add a temporary remote if needed. For example this is necessary when
# Travis is configured to run in a fork. In this case 'origin' is the
# fork and not the reference repo we want to diff against.
if [[ -z "$REMOTE" ]]; then
TMP_REMOTE=tmp_reference_upstream
REMOTE=$TMP_REMOTE
git remote add $REMOTE $PROJECT_URL
fi

echo "Remotes:"
echo '--------------------------------------------------------------------------------'
git remote --verbose

# Travis does the git clone with a limited depth (50 at the time of
# writing). This may not be enough to find the common ancestor with
# $REMOTE/develop so we unshallow the git checkout
if [[ -a .git/shallow ]]; then
echo -e '\nTrying to unshallow the repo:'
echo '--------------------------------------------------------------------------------'
git fetch --unshallow
fi

if [[ "$TRAVIS" == "true" ]]; then
if [[ "$TRAVIS_PULL_REQUEST" == "false" ]]
then
# In main repo, using TRAVIS_COMMIT_RANGE to test the commits
# that were pushed into a branch
if [[ "$PROJECT" == "$TRAVIS_REPO_SLUG" ]]; then
if [[ -z "$TRAVIS_COMMIT_RANGE" ]]; then
echo "New branch, no commit range from Travis so passing this test by convention"
exit 0
fi
COMMIT_RANGE=$TRAVIS_COMMIT_RANGE
fi
else
# We want to fetch the code as it is in the PR branch and not
# the result of the merge into develop. This way line numbers
# reported by Travis will match with the local code.
LOCAL_BRANCH_REF=travis_pr_$TRAVIS_PULL_REQUEST
# In Travis the PR target is always origin
git fetch origin pull/$TRAVIS_PULL_REQUEST/head:refs/$LOCAL_BRANCH_REF
fi
fi

# If not using the commit range from Travis we need to find the common
# ancestor between $LOCAL_BRANCH_REF and $REMOTE/develop
if [[ -z "$COMMIT_RANGE" ]]; then
if [[ -z "$LOCAL_BRANCH_REF" ]]; then
LOCAL_BRANCH_REF=$(git rev-parse --abbrev-ref HEAD)
fi
echo -e "\nLast 2 commits in $LOCAL_BRANCH_REF:"
echo '--------------------------------------------------------------------------------'
git --no-pager log -2 $LOCAL_BRANCH_REF

REMOTE_DEV_REF="$REMOTE/develop"
# Make sure that $REMOTE_DEV_REF is a valid reference
echo -e "\nFetching $REMOTE_DEV_REF"
echo '--------------------------------------------------------------------------------'
git fetch $REMOTE develop:refs/remotes/$REMOTE_DEV_REF
LOCAL_BRANCH_SHORT_HASH=$(git rev-parse --short $LOCAL_BRANCH_REF)
REMOTE_DEV_SHORT_HASH=$(git rev-parse --short $REMOTE_DEV_REF)

COMMIT=$(git merge-base $LOCAL_BRANCH_REF $REMOTE_DEV_REF) || \
echo "No common ancestor found for $(git show $LOCAL_BRANCH_REF -q) and $(git show $REMOTE_DEV_REF -q)"

if [ -z "$COMMIT" ]; then
exit 1
fi

COMMIT_SHORT_HASH=$(git rev-parse --short $COMMIT)

echo -e "\nCommon ancestor between $LOCAL_BRANCH_REF ($LOCAL_BRANCH_SHORT_HASH)"\
"and $REMOTE_DEV_REF ($REMOTE_DEV_SHORT_HASH) is $COMMIT_SHORT_HASH:"
echo '--------------------------------------------------------------------------------'
git --no-pager show --no-patch $COMMIT_SHORT_HASH

COMMIT_RANGE="$COMMIT_SHORT_HASH..$LOCAL_BRANCH_SHORT_HASH"

if [[ -n "$TMP_REMOTE" ]]; then
git remote remove $TMP_REMOTE
fi

else
echo "Got the commit range from Travis: $COMMIT_RANGE"
fi

echo -e '\nRunning flake8 on the diff in the range' "$COMMIT_RANGE" \
"($(git rev-list $COMMIT_RANGE | wc -l) commit(s)):"
echo '--------------------------------------------------------------------------------'
# We need the following command to exit with 0 hence the echo in case
# there is no match
MODIFIED_FILES="$(git diff --name-only $COMMIT_RANGE || echo "no_match")"

check_files() {
files="$1"
shift
options="$*"
if [ -n "$files" ]; then
# Conservative approach: diff without context (--unified=0) so that code
# that was not changed does not create failures
git diff --unified=0 $COMMIT_RANGE -- $files | flake8 --ignore E402 --diff --show-source $options
fi
}

if [[ "$MODIFIED_FILES" == "no_match" ]]; then
echo "No file has been modified"
else

check_files "$(echo "$MODIFIED_FILES" | grep -v ^examples)"
check_files "$(echo "$MODIFIED_FILES" | grep ^examples)" \
--config ./examples/.flake8
fi
echo -e "No problem detected by flake8\n"
9 changes: 6 additions & 3 deletions ci_scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ popd
# provided versions
conda create -n testenv --yes python=$PYTHON_VERSION pip
source activate testenv
pip install nose numpy scipy cython scikit-learn==$SKLEARN_VERSION \
pip install pytest pytest-xdist pytest-timeout numpy scipy cython scikit-learn==$SKLEARN_VERSION \
oslo.concurrency

if [[ "$EXAMPLES" == "true" ]]; then
Expand All @@ -37,10 +37,13 @@ if [[ "$DOCTEST" == "true" ]]; then
pip install pandas sphinx_bootstrap_theme
fi
if [[ "$COVERAGE" == "true" ]]; then
pip install codecov
pip install codecov pytest-cov
fi
if [[ "$RUN_FLAKE8" == "true" ]]; then
pip install flake8
fi

python --version
python -c "import numpy; print('numpy %s' % numpy.__version__)"
python -c "import scipy; print('scipy %s' % scipy.__version__)"
python setup.py develop
pip install -e '.[test]'
Loading