From 55b3343e8de144eca63b2932e4cea789e7e9f2fb Mon Sep 17 00:00:00 2001 From: Matthias Feurer Date: Thu, 7 Nov 2019 14:43:38 +0100 Subject: [PATCH 1/2] Release version 0.10.2 (#869) * Fixing broken links (#864) * Adding license to each source file (#862) * Preliminary addition of license to source files * Adding license to almost every source file * add task_type to list_runs (#857) * add task_type to list_runs * length of run change * changelog * changes in progress rst * Prepare new release (#868) --- CONTRIBUTING.md | 2 ++ PULL_REQUEST_TEMPLATE.md | 3 ++- ci_scripts/create_doc.sh | 2 ++ ci_scripts/flake8_diff.sh | 2 ++ ci_scripts/install.sh | 2 ++ ci_scripts/success.sh | 2 ++ ci_scripts/test.sh | 2 ++ doc/contributing.rst | 4 ++-- doc/progress.rst | 5 +++++ examples/20_basic/introduction_tutorial.py | 3 +++ examples/20_basic/simple_datasets_tutorial.py | 2 ++ examples/20_basic/simple_flows_and_runs_tutorial.py | 2 ++ examples/20_basic/simple_suites_tutorial.py | 2 ++ examples/30_extended/configure_logging.py | 2 ++ examples/30_extended/create_upload_tutorial.py | 3 +++ examples/30_extended/datasets_tutorial.py | 3 +++ examples/30_extended/fetch_evaluations_tutorial.py | 3 +++ examples/30_extended/flow_id_tutorial.py | 3 +++ examples/30_extended/flows_and_runs_tutorial.py | 2 ++ examples/30_extended/plot_svm_hyperparameters_tutorial.py | 3 +++ examples/30_extended/run_setup_tutorial.py | 3 +++ examples/30_extended/study_tutorial.py | 3 +++ examples/30_extended/suites_tutorial.py | 4 +++- examples/30_extended/task_manual_iteration_tutorial.py | 2 ++ examples/30_extended/tasks_tutorial.py | 2 ++ examples/40_paper/2015_neurips_feurer_example.py | 2 ++ examples/40_paper/2018_ida_strang_example.py | 3 +++ examples/40_paper/2018_kdd_rijn_example.py | 3 +++ examples/40_paper/2018_neurips_perrone_example.py | 3 +++ openml/__init__.py | 2 ++ openml/__version__.py | 4 +++- openml/_api_calls.py | 2 ++ openml/base.py | 2 ++ openml/config.py | 3 +++ openml/datasets/__init__.py | 2 ++ openml/datasets/data_feature.py | 3 +++ openml/datasets/dataset.py | 2 ++ openml/datasets/functions.py | 2 ++ openml/evaluations/__init__.py | 2 ++ openml/evaluations/evaluation.py | 2 ++ openml/evaluations/functions.py | 2 ++ openml/exceptions.py | 3 +++ openml/extensions/__init__.py | 2 ++ openml/extensions/extension_interface.py | 2 ++ openml/extensions/functions.py | 2 ++ openml/extensions/sklearn/__init__.py | 2 ++ openml/extensions/sklearn/extension.py | 2 ++ openml/flows/__init__.py | 2 ++ openml/flows/flow.py | 2 ++ openml/flows/functions.py | 2 ++ openml/runs/__init__.py | 2 ++ openml/runs/functions.py | 3 +++ openml/runs/run.py | 2 ++ openml/runs/trace.py | 2 ++ openml/setups/__init__.py | 2 ++ openml/setups/functions.py | 2 ++ openml/setups/setup.py | 2 ++ openml/study/__init__.py | 2 ++ openml/study/functions.py | 2 ++ openml/study/study.py | 2 ++ openml/tasks/__init__.py | 2 ++ openml/tasks/functions.py | 2 ++ openml/tasks/split.py | 2 ++ openml/tasks/task.py | 2 ++ openml/testing.py | 2 ++ openml/utils.py | 2 ++ setup.py | 2 ++ tests/__init__.py | 2 ++ tests/conftest.py | 2 ++ tests/test_datasets/test_dataset.py | 2 ++ tests/test_datasets/test_dataset_functions.py | 2 ++ tests/test_evaluations/test_evaluation_functions.py | 2 ++ tests/test_evaluations/test_evaluations_example.py | 2 ++ tests/test_extensions/test_functions.py | 2 ++ .../test_sklearn_extension/test_sklearn_extension.py | 2 ++ tests/test_flows/dummy_learn/dummy_forest.py | 3 +++ tests/test_flows/test_flow.py | 2 ++ tests/test_flows/test_flow_functions.py | 2 ++ tests/test_openml/test_config.py | 2 ++ tests/test_openml/test_openml.py | 2 ++ tests/test_runs/test_run.py | 2 ++ tests/test_runs/test_run_functions.py | 4 +++- tests/test_runs/test_trace.py | 2 ++ tests/test_setups/__init__.py | 2 ++ tests/test_setups/test_setup_functions.py | 2 ++ tests/test_study/test_study_examples.py | 2 ++ tests/test_study/test_study_functions.py | 2 ++ tests/test_tasks/__init__.py | 2 ++ tests/test_tasks/test_classification_task.py | 2 ++ tests/test_tasks/test_clustering_task.py | 2 ++ tests/test_tasks/test_learning_curve_task.py | 2 ++ tests/test_tasks/test_regression_task.py | 2 ++ tests/test_tasks/test_split.py | 2 ++ tests/test_tasks/test_supervised_task.py | 2 ++ tests/test_tasks/test_task.py | 2 ++ tests/test_tasks/test_task_functions.py | 2 ++ tests/test_tasks/test_task_methods.py | 2 ++ 97 files changed, 216 insertions(+), 6 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5a77dfd58..7a4da2e1e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -106,6 +106,8 @@ following rules before you submit a pull request: - Add your changes to the changelog in the file doc/progress.rst. + - If any source file is being added to the repository, please add the BSD 3-Clause license to it. + You can also check for common programming errors with the following tools: diff --git a/PULL_REQUEST_TEMPLATE.md b/PULL_REQUEST_TEMPLATE.md index 571ae0d1c..47a5741e6 100644 --- a/PULL_REQUEST_TEMPLATE.md +++ b/PULL_REQUEST_TEMPLATE.md @@ -5,12 +5,13 @@ the contribution guidelines: https://github.com/openml/openml-python/blob/master Please make sure that: * this pull requests is against the `develop` branch -* you updated all docs, this includes the changelog! +* you updated all docs, this includes the changelog (doc/progress.rst) * for any new function or class added, please add it to doc/api.rst * the list of classes and functions should be alphabetical * for any new functionality, consider adding a relevant example * add unit tests for new functionalities * collect files uploaded to test server using _mark_entity_for_removal() +* add the BSD 3-Clause license to any new file created --> #### Reference Issue diff --git a/ci_scripts/create_doc.sh b/ci_scripts/create_doc.sh index c9dd800a0..83afaa26b 100644 --- a/ci_scripts/create_doc.sh +++ b/ci_scripts/create_doc.sh @@ -1,3 +1,5 @@ +# License: BSD 3-Clause + set -euo pipefail # Check if DOCPUSH is set diff --git a/ci_scripts/flake8_diff.sh b/ci_scripts/flake8_diff.sh index d74577341..1e32f2c7d 100755 --- a/ci_scripts/flake8_diff.sh +++ b/ci_scripts/flake8_diff.sh @@ -1,5 +1,7 @@ #!/bin/bash +# License: BSD 3-Clause + # Update /CONTRIBUTING.md if these commands change. # The reason for not advocating using this script directly is that it # might not work out of the box on Windows. diff --git a/ci_scripts/install.sh b/ci_scripts/install.sh index a223cf84b..5c338fe5e 100644 --- a/ci_scripts/install.sh +++ b/ci_scripts/install.sh @@ -1,3 +1,5 @@ +# License: BSD 3-Clause + # Deactivate the travis-provided virtual environment and setup a # conda-based environment instead deactivate diff --git a/ci_scripts/success.sh b/ci_scripts/success.sh index dbeb18e58..dad97d54e 100644 --- a/ci_scripts/success.sh +++ b/ci_scripts/success.sh @@ -1,3 +1,5 @@ +# License: BSD 3-Clause + set -e if [[ "$COVERAGE" == "true" ]]; then diff --git a/ci_scripts/test.sh b/ci_scripts/test.sh index f46b0eecb..8659a105b 100644 --- a/ci_scripts/test.sh +++ b/ci_scripts/test.sh @@ -1,3 +1,5 @@ +# License: BSD 3-Clause + set -e # check status and branch before running the unit tests diff --git a/doc/contributing.rst b/doc/contributing.rst index 067f2dcad..d23ac0ad2 100644 --- a/doc/contributing.rst +++ b/doc/contributing.rst @@ -167,7 +167,7 @@ not have the capacity to develop and maintain such interfaces on its own. For th have built an extension interface to allows others to contribute back. Building a suitable extension for therefore requires an understanding of the current OpenML-Python support. -`This example `_ +`This example `_ shows how scikit-learn currently works with OpenML-Python as an extension. The *sklearn* extension packaged with the `openml-python `_ repository can be used as a template/benchmark to build the new extension. @@ -188,7 +188,7 @@ API Interfacing with OpenML-Python ++++++++++++++++++++++++++++++ Once the new extension class has been defined, the openml-python module to -:meth:`openml.extensions.register_extension.html` must be called to allow OpenML-Python to +:meth:`openml.extensions.register_extension` must be called to allow OpenML-Python to interface the new extension. diff --git a/doc/progress.rst b/doc/progress.rst index 97fc165a1..b65df1926 100644 --- a/doc/progress.rst +++ b/doc/progress.rst @@ -6,6 +6,11 @@ Changelog ========= +0.10.2 +~~~~~~ +* ADD #857: Adds task type ID to list_runs +* DOC #862: Added license BSD 3-Clause to each of the source files. + 0.10.1 ~~~~~~ * ADD #175: Automatically adds the docstring of scikit-learn objects to flow and its parameters. diff --git a/examples/20_basic/introduction_tutorial.py b/examples/20_basic/introduction_tutorial.py index 42537724c..151692fdc 100644 --- a/examples/20_basic/introduction_tutorial.py +++ b/examples/20_basic/introduction_tutorial.py @@ -55,6 +55,9 @@ # crowding with example datasets, tasks, studies, and so on. ############################################################################ + +# License: BSD 3-Clause + import openml from sklearn import neighbors diff --git a/examples/20_basic/simple_datasets_tutorial.py b/examples/20_basic/simple_datasets_tutorial.py index dfefbe1e3..bb90aedcc 100644 --- a/examples/20_basic/simple_datasets_tutorial.py +++ b/examples/20_basic/simple_datasets_tutorial.py @@ -11,6 +11,8 @@ # at OpenML. However, for the purposes of this tutorial, we are going to work with # the datasets directly. +# License: BSD 3-Clause + import openml ############################################################################ # List datasets diff --git a/examples/20_basic/simple_flows_and_runs_tutorial.py b/examples/20_basic/simple_flows_and_runs_tutorial.py index e3f028418..14c5c7761 100644 --- a/examples/20_basic/simple_flows_and_runs_tutorial.py +++ b/examples/20_basic/simple_flows_and_runs_tutorial.py @@ -5,6 +5,8 @@ A simple tutorial on how to train/run a model and how to upload the results. """ +# License: BSD 3-Clause + import openml from sklearn import ensemble, neighbors diff --git a/examples/20_basic/simple_suites_tutorial.py b/examples/20_basic/simple_suites_tutorial.py index 3a555b9d3..37f1eeffb 100644 --- a/examples/20_basic/simple_suites_tutorial.py +++ b/examples/20_basic/simple_suites_tutorial.py @@ -9,6 +9,8 @@ and simplify both the sharing of the setup and the results. """ +# License: BSD 3-Clause + import openml #################################################################################################### diff --git a/examples/30_extended/configure_logging.py b/examples/30_extended/configure_logging.py index e16dfe245..9b14fffd6 100644 --- a/examples/30_extended/configure_logging.py +++ b/examples/30_extended/configure_logging.py @@ -22,6 +22,8 @@ # It is possible to configure what log levels to send to console and file. # When downloading a dataset from OpenML, a `DEBUG`-level message is written: +# License: BSD 3-Clause + import openml openml.datasets.get_dataset('iris') diff --git a/examples/30_extended/create_upload_tutorial.py b/examples/30_extended/create_upload_tutorial.py index faca335ea..7c3af4b9f 100644 --- a/examples/30_extended/create_upload_tutorial.py +++ b/examples/30_extended/create_upload_tutorial.py @@ -4,6 +4,9 @@ A tutorial on how to create and upload a dataset to OpenML. """ + +# License: BSD 3-Clause + import numpy as np import pandas as pd import sklearn.datasets diff --git a/examples/30_extended/datasets_tutorial.py b/examples/30_extended/datasets_tutorial.py index 357360f80..4728008b4 100644 --- a/examples/30_extended/datasets_tutorial.py +++ b/examples/30_extended/datasets_tutorial.py @@ -6,6 +6,9 @@ How to list and download datasets. """ ############################################################################ + +# License: BSD 3-Clauses + import openml import pandas as pd diff --git a/examples/30_extended/fetch_evaluations_tutorial.py b/examples/30_extended/fetch_evaluations_tutorial.py index b6e15e221..b1c7b9a3d 100644 --- a/examples/30_extended/fetch_evaluations_tutorial.py +++ b/examples/30_extended/fetch_evaluations_tutorial.py @@ -20,6 +20,9 @@ """ ############################################################################ + +# License: BSD 3-Clause + import openml ############################################################################ diff --git a/examples/30_extended/flow_id_tutorial.py b/examples/30_extended/flow_id_tutorial.py index 5bb001493..ef3689ea1 100644 --- a/examples/30_extended/flow_id_tutorial.py +++ b/examples/30_extended/flow_id_tutorial.py @@ -8,6 +8,9 @@ """ #################################################################################################### + +# License: BSD 3-Clause + import sklearn.tree import openml diff --git a/examples/30_extended/flows_and_runs_tutorial.py b/examples/30_extended/flows_and_runs_tutorial.py index d5740e5ab..b307ad260 100644 --- a/examples/30_extended/flows_and_runs_tutorial.py +++ b/examples/30_extended/flows_and_runs_tutorial.py @@ -5,6 +5,8 @@ How to train/run a model and how to upload the results. """ +# License: BSD 3-Clause + import openml from sklearn import compose, ensemble, impute, neighbors, preprocessing, pipeline, tree diff --git a/examples/30_extended/plot_svm_hyperparameters_tutorial.py b/examples/30_extended/plot_svm_hyperparameters_tutorial.py index 714e64221..ad91d9af9 100644 --- a/examples/30_extended/plot_svm_hyperparameters_tutorial.py +++ b/examples/30_extended/plot_svm_hyperparameters_tutorial.py @@ -3,6 +3,9 @@ Plotting hyperparameter surfaces ================================ """ + +# License: BSD 3-Clause + import openml import numpy as np diff --git a/examples/30_extended/run_setup_tutorial.py b/examples/30_extended/run_setup_tutorial.py index 8ce03f4b6..071cc51b1 100644 --- a/examples/30_extended/run_setup_tutorial.py +++ b/examples/30_extended/run_setup_tutorial.py @@ -29,6 +29,9 @@ connects to the test server at test.openml.org. This prevents the main server from crowding with example datasets, tasks, runs, and so on. """ + +# License: BSD 3-Clause + import numpy as np import openml import sklearn.ensemble diff --git a/examples/30_extended/study_tutorial.py b/examples/30_extended/study_tutorial.py index de2be33f8..9a9729a5c 100644 --- a/examples/30_extended/study_tutorial.py +++ b/examples/30_extended/study_tutorial.py @@ -10,6 +10,9 @@ tasks, all required information about a study can be retrieved. """ ############################################################################ + +# License: BSD 3-Clause + import uuid import numpy as np diff --git a/examples/30_extended/suites_tutorial.py b/examples/30_extended/suites_tutorial.py index c5eb5718f..b41e08e74 100644 --- a/examples/30_extended/suites_tutorial.py +++ b/examples/30_extended/suites_tutorial.py @@ -10,13 +10,15 @@ `OpenML benchmark docs `_. """ ############################################################################ + +# License: BSD 3-Clause + import uuid import numpy as np import openml - ############################################################################ # .. warning:: This example uploads data. For that reason, this example # connects to the test server at test.openml.org before doing so. diff --git a/examples/30_extended/task_manual_iteration_tutorial.py b/examples/30_extended/task_manual_iteration_tutorial.py index e4f070501..7ec824e38 100644 --- a/examples/30_extended/task_manual_iteration_tutorial.py +++ b/examples/30_extended/task_manual_iteration_tutorial.py @@ -10,6 +10,8 @@ but not OpenML's functionality to conduct runs. """ +# License: BSD 3-Clause + import openml #################################################################################################### diff --git a/examples/30_extended/tasks_tutorial.py b/examples/30_extended/tasks_tutorial.py index 1fb23f63d..e12c6f653 100644 --- a/examples/30_extended/tasks_tutorial.py +++ b/examples/30_extended/tasks_tutorial.py @@ -5,6 +5,8 @@ A tutorial on how to list and download tasks. """ +# License: BSD 3-Clause + import openml import pandas as pd diff --git a/examples/40_paper/2015_neurips_feurer_example.py b/examples/40_paper/2015_neurips_feurer_example.py index 8ca2412ba..58b242add 100644 --- a/examples/40_paper/2015_neurips_feurer_example.py +++ b/examples/40_paper/2015_neurips_feurer_example.py @@ -15,6 +15,8 @@ | Available at http://papers.nips.cc/paper/5872-efficient-and-robust-automated-machine-learning.pdf """ # noqa F401 +# License: BSD 3-Clause + import pandas as pd import openml diff --git a/examples/40_paper/2018_ida_strang_example.py b/examples/40_paper/2018_ida_strang_example.py index ef35a4a21..3f9bcc49e 100644 --- a/examples/40_paper/2018_ida_strang_example.py +++ b/examples/40_paper/2018_ida_strang_example.py @@ -13,6 +13,9 @@ | In *Advances in Intelligent Data Analysis XVII 17th International Symposium*, 2018 | Available at https://link.springer.com/chapter/10.1007%2F978-3-030-01768-2_25 """ + +# License: BSD 3-Clause + import matplotlib.pyplot as plt import openml import pandas as pd diff --git a/examples/40_paper/2018_kdd_rijn_example.py b/examples/40_paper/2018_kdd_rijn_example.py index 3302333ae..ae2a0672e 100644 --- a/examples/40_paper/2018_kdd_rijn_example.py +++ b/examples/40_paper/2018_kdd_rijn_example.py @@ -15,6 +15,9 @@ | In *Proceedings of the 24th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining*, 2018 | Available at https://dl.acm.org/citation.cfm?id=3220058 """ + +# License: BSD 3-Clause + import sys if sys.platform == 'win32': # noqa diff --git a/examples/40_paper/2018_neurips_perrone_example.py b/examples/40_paper/2018_neurips_perrone_example.py index 5513fab30..2127bdfe4 100644 --- a/examples/40_paper/2018_neurips_perrone_example.py +++ b/examples/40_paper/2018_neurips_perrone_example.py @@ -24,6 +24,9 @@ """ ############################################################################ + +# License: BSD 3-Clause + import openml import numpy as np import pandas as pd diff --git a/openml/__init__.py b/openml/__init__.py index 94c46341f..f71c32e40 100644 --- a/openml/__init__.py +++ b/openml/__init__.py @@ -15,6 +15,8 @@ `_). """ +# License: BSD 3-Clause + from . import _api_calls from . import config from .datasets import OpenMLDataset, OpenMLDataFeature diff --git a/openml/__version__.py b/openml/__version__.py index 30750c80a..11a584d41 100644 --- a/openml/__version__.py +++ b/openml/__version__.py @@ -1,4 +1,6 @@ """Version information.""" +# License: BSD 3-Clause + # The following line *must* be the last in the module, exactly as formatted: -__version__ = "0.10.1" +__version__ = "0.10.2" diff --git a/openml/_api_calls.py b/openml/_api_calls.py index 22223d587..5068dc208 100644 --- a/openml/_api_calls.py +++ b/openml/_api_calls.py @@ -1,3 +1,5 @@ +# License: BSD 3-Clause + import time from typing import Dict import requests diff --git a/openml/base.py b/openml/base.py index 9e28bd055..e02aabb0f 100644 --- a/openml/base.py +++ b/openml/base.py @@ -1,3 +1,5 @@ +# License: BSD 3-Clause + from abc import ABC, abstractmethod from collections import OrderedDict import re diff --git a/openml/config.py b/openml/config.py index 2af1bfef6..eee2c7fdb 100644 --- a/openml/config.py +++ b/openml/config.py @@ -1,6 +1,9 @@ """ Store module level information like the API key, cache directory and the server """ + +# License: BSD 3-Clause + import logging import logging.handlers import os diff --git a/openml/datasets/__init__.py b/openml/datasets/__init__.py index 8f52e16fc..9783494af 100644 --- a/openml/datasets/__init__.py +++ b/openml/datasets/__init__.py @@ -1,3 +1,5 @@ +# License: BSD 3-Clause + from .functions import ( attributes_arff_from_df, check_datasets_active, diff --git a/openml/datasets/data_feature.py b/openml/datasets/data_feature.py index 077be639e..dfb1aa112 100644 --- a/openml/datasets/data_feature.py +++ b/openml/datasets/data_feature.py @@ -1,3 +1,6 @@ +# License: BSD 3-Clause + + class OpenMLDataFeature(object): """ Data Feature (a.k.a. Attribute) object. diff --git a/openml/datasets/dataset.py b/openml/datasets/dataset.py index 26215736d..9f831458b 100644 --- a/openml/datasets/dataset.py +++ b/openml/datasets/dataset.py @@ -1,3 +1,5 @@ +# License: BSD 3-Clause + from collections import OrderedDict import re import gzip diff --git a/openml/datasets/functions.py b/openml/datasets/functions.py index bc2606506..e85c55aa3 100644 --- a/openml/datasets/functions.py +++ b/openml/datasets/functions.py @@ -1,3 +1,5 @@ +# License: BSD 3-Clause + import io import logging import os diff --git a/openml/evaluations/__init__.py b/openml/evaluations/__init__.py index 43cec8738..0bee18ba3 100644 --- a/openml/evaluations/__init__.py +++ b/openml/evaluations/__init__.py @@ -1,3 +1,5 @@ +# License: BSD 3-Clause + from .evaluation import OpenMLEvaluation from .functions import list_evaluations, list_evaluation_measures, list_evaluations_setups diff --git a/openml/evaluations/evaluation.py b/openml/evaluations/evaluation.py index 9d8507708..1adb449a5 100644 --- a/openml/evaluations/evaluation.py +++ b/openml/evaluations/evaluation.py @@ -1,3 +1,5 @@ +# License: BSD 3-Clause + import openml.config diff --git a/openml/evaluations/functions.py b/openml/evaluations/functions.py index 8de69ebc1..cf2169c79 100644 --- a/openml/evaluations/functions.py +++ b/openml/evaluations/functions.py @@ -1,3 +1,5 @@ +# License: BSD 3-Clause + import json import xmltodict import pandas as pd diff --git a/openml/exceptions.py b/openml/exceptions.py index 78accd671..6dff18a52 100644 --- a/openml/exceptions.py +++ b/openml/exceptions.py @@ -1,3 +1,6 @@ +# License: BSD 3-Clause + + class PyOpenMLError(Exception): def __init__(self, message: str): self.message = message diff --git a/openml/extensions/__init__.py b/openml/extensions/__init__.py index 374e856e3..13b644e04 100644 --- a/openml/extensions/__init__.py +++ b/openml/extensions/__init__.py @@ -1,3 +1,5 @@ +# License: BSD 3-Clause + from typing import List, Type # noqa: F401 from .extension_interface import Extension diff --git a/openml/extensions/extension_interface.py b/openml/extensions/extension_interface.py index d963edb1b..070d17205 100644 --- a/openml/extensions/extension_interface.py +++ b/openml/extensions/extension_interface.py @@ -1,3 +1,5 @@ +# License: BSD 3-Clause + from abc import ABC, abstractmethod from collections import OrderedDict # noqa: F401 from typing import Any, Dict, List, Optional, Tuple, TYPE_CHECKING, Union diff --git a/openml/extensions/functions.py b/openml/extensions/functions.py index 93fab5345..826cb0853 100644 --- a/openml/extensions/functions.py +++ b/openml/extensions/functions.py @@ -1,3 +1,5 @@ +# License: BSD 3-Clause + from typing import Any, Optional, Type, TYPE_CHECKING from . import Extension # Need to implement the following by its full path because otherwise it won't be possible to diff --git a/openml/extensions/sklearn/__init__.py b/openml/extensions/sklearn/__init__.py index a9d1db37b..1c1732cde 100644 --- a/openml/extensions/sklearn/__init__.py +++ b/openml/extensions/sklearn/__init__.py @@ -1,3 +1,5 @@ +# License: BSD 3-Clause + from .extension import SklearnExtension from openml.extensions import register_extension diff --git a/openml/extensions/sklearn/extension.py b/openml/extensions/sklearn/extension.py index cc3352a20..ca6c77458 100644 --- a/openml/extensions/sklearn/extension.py +++ b/openml/extensions/sklearn/extension.py @@ -1,3 +1,5 @@ +# License: BSD 3-Clause + from collections import OrderedDict # noqa: F401 import copy from distutils.version import LooseVersion diff --git a/openml/flows/__init__.py b/openml/flows/__init__.py index 3bbf1b21b..f2c16a8a0 100644 --- a/openml/flows/__init__.py +++ b/openml/flows/__init__.py @@ -1,3 +1,5 @@ +# License: BSD 3-Clause + from .flow import OpenMLFlow from .functions import get_flow, list_flows, flow_exists, get_flow_id, assert_flows_equal diff --git a/openml/flows/flow.py b/openml/flows/flow.py index 732f54208..bd8d97d7c 100644 --- a/openml/flows/flow.py +++ b/openml/flows/flow.py @@ -1,3 +1,5 @@ +# License: BSD 3-Clause + from collections import OrderedDict import os from typing import Dict, List, Union, Tuple, Optional # noqa: F401 diff --git a/openml/flows/functions.py b/openml/flows/functions.py index 4389eb3c0..5bbbcbd16 100644 --- a/openml/flows/functions.py +++ b/openml/flows/functions.py @@ -1,3 +1,5 @@ +# License: BSD 3-Clause + import dateutil.parser from collections import OrderedDict import os diff --git a/openml/runs/__init__.py b/openml/runs/__init__.py index 76aabcbc4..80d0c0ae3 100644 --- a/openml/runs/__init__.py +++ b/openml/runs/__init__.py @@ -1,3 +1,5 @@ +# License: BSD 3-Clause + from .run import OpenMLRun from .trace import OpenMLRunTrace, OpenMLTraceIteration from .functions import ( diff --git a/openml/runs/functions.py b/openml/runs/functions.py index 95407d517..9e7321d45 100644 --- a/openml/runs/functions.py +++ b/openml/runs/functions.py @@ -1,3 +1,5 @@ +# License: BSD 3-Clause + from collections import OrderedDict import io import itertools @@ -967,6 +969,7 @@ def __list_runs(api_call, output_format='dict'): 'setup_id': int(run_['oml:setup_id']), 'flow_id': int(run_['oml:flow_id']), 'uploader': int(run_['oml:uploader']), + 'task_type': int(run_['oml:task_type_id']), 'upload_time': str(run_['oml:upload_time']), 'error_message': str((run_['oml:error_message']) or '')} diff --git a/openml/runs/run.py b/openml/runs/run.py index e3df97083..7229cfb00 100644 --- a/openml/runs/run.py +++ b/openml/runs/run.py @@ -1,3 +1,5 @@ +# License: BSD 3-Clause + from collections import OrderedDict import pickle import time diff --git a/openml/runs/trace.py b/openml/runs/trace.py index c6ca1f057..220a10c95 100644 --- a/openml/runs/trace.py +++ b/openml/runs/trace.py @@ -1,3 +1,5 @@ +# License: BSD 3-Clause + from collections import OrderedDict import json import os diff --git a/openml/setups/__init__.py b/openml/setups/__init__.py index a8b4a8863..4f0be9571 100644 --- a/openml/setups/__init__.py +++ b/openml/setups/__init__.py @@ -1,3 +1,5 @@ +# License: BSD 3-Clause + from .setup import OpenMLSetup, OpenMLParameter from .functions import get_setup, list_setups, setup_exists, initialize_model diff --git a/openml/setups/functions.py b/openml/setups/functions.py index 97c001b24..5f3b796c8 100644 --- a/openml/setups/functions.py +++ b/openml/setups/functions.py @@ -1,3 +1,5 @@ +# License: BSD 3-Clause + from collections import OrderedDict import io import os diff --git a/openml/setups/setup.py b/openml/setups/setup.py index 31fdc15a4..36bddb11f 100644 --- a/openml/setups/setup.py +++ b/openml/setups/setup.py @@ -1,3 +1,5 @@ +# License: BSD 3-Clause + import openml.config diff --git a/openml/study/__init__.py b/openml/study/__init__.py index 02b37d514..8fe308a8c 100644 --- a/openml/study/__init__.py +++ b/openml/study/__init__.py @@ -1,3 +1,5 @@ +# License: BSD 3-Clause + from .study import OpenMLStudy, OpenMLBenchmarkSuite from .functions import ( get_study, diff --git a/openml/study/functions.py b/openml/study/functions.py index 25ebea5fd..35889c68d 100644 --- a/openml/study/functions.py +++ b/openml/study/functions.py @@ -1,3 +1,5 @@ +# License: BSD 3-Clause + from typing import cast, Dict, List, Optional, Union import warnings diff --git a/openml/study/study.py b/openml/study/study.py index 64d47dce7..955546781 100644 --- a/openml/study/study.py +++ b/openml/study/study.py @@ -1,3 +1,5 @@ +# License: BSD 3-Clause + from collections import OrderedDict from typing import Dict, List, Optional, Tuple, Union, Any diff --git a/openml/tasks/__init__.py b/openml/tasks/__init__.py index f21cac871..2bd319637 100644 --- a/openml/tasks/__init__.py +++ b/openml/tasks/__init__.py @@ -1,3 +1,5 @@ +# License: BSD 3-Clause + from .task import ( OpenMLTask, OpenMLSupervisedTask, diff --git a/openml/tasks/functions.py b/openml/tasks/functions.py index 4bb93b007..a386dec17 100644 --- a/openml/tasks/functions.py +++ b/openml/tasks/functions.py @@ -1,3 +1,5 @@ +# License: BSD 3-Clause + from collections import OrderedDict import io import re diff --git a/openml/tasks/split.py b/openml/tasks/split.py index 3815f4257..ad6170a62 100644 --- a/openml/tasks/split.py +++ b/openml/tasks/split.py @@ -1,3 +1,5 @@ +# License: BSD 3-Clause + from collections import namedtuple, OrderedDict import os import pickle diff --git a/openml/tasks/task.py b/openml/tasks/task.py index f415a3fea..3b1c8abe7 100644 --- a/openml/tasks/task.py +++ b/openml/tasks/task.py @@ -1,3 +1,5 @@ +# License: BSD 3-Clause + from abc import ABC from collections import OrderedDict import io diff --git a/openml/testing.py b/openml/testing.py index 370fb9102..7ebf37541 100644 --- a/openml/testing.py +++ b/openml/testing.py @@ -1,3 +1,5 @@ +# License: BSD 3-Clause + import hashlib import inspect import os diff --git a/openml/utils.py b/openml/utils.py index a458d3132..09a0f6a83 100644 --- a/openml/utils.py +++ b/openml/utils.py @@ -1,3 +1,5 @@ +# License: BSD 3-Clause + import os import hashlib import xmltodict diff --git a/setup.py b/setup.py index f4fbe7991..9c9766636 100644 --- a/setup.py +++ b/setup.py @@ -1,5 +1,7 @@ # -*- coding: utf-8 -*- +# License: BSD 3-Clause + import os import setuptools import sys diff --git a/tests/__init__.py b/tests/__init__.py index dc5287024..b71163cb2 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -1,3 +1,5 @@ +# License: BSD 3-Clause + # Dummy to allow mock classes in the test files to have a version number for # their parent module __version__ = '0.1' diff --git a/tests/conftest.py b/tests/conftest.py index 056cc7f96..ae8f0dfa9 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -20,6 +20,8 @@ testing.py in each of the unit test modules. ''' +# License: BSD 3-Clause + import os import logging from typing import List diff --git a/tests/test_datasets/test_dataset.py b/tests/test_datasets/test_dataset.py index 9d1076371..f40dc5015 100644 --- a/tests/test_datasets/test_dataset.py +++ b/tests/test_datasets/test_dataset.py @@ -1,3 +1,5 @@ +# License: BSD 3-Clause + from time import time from warnings import filterwarnings, catch_warnings diff --git a/tests/test_datasets/test_dataset_functions.py b/tests/test_datasets/test_dataset_functions.py index fb363bcf4..2f1a820aa 100644 --- a/tests/test_datasets/test_dataset_functions.py +++ b/tests/test_datasets/test_dataset_functions.py @@ -1,3 +1,5 @@ +# License: BSD 3-Clause + import os import random from itertools import product diff --git a/tests/test_evaluations/test_evaluation_functions.py b/tests/test_evaluations/test_evaluation_functions.py index fe38a5a66..25651a8cc 100644 --- a/tests/test_evaluations/test_evaluation_functions.py +++ b/tests/test_evaluations/test_evaluation_functions.py @@ -1,3 +1,5 @@ +# License: BSD 3-Clause + import openml import openml.evaluations from openml.testing import TestBase diff --git a/tests/test_evaluations/test_evaluations_example.py b/tests/test_evaluations/test_evaluations_example.py index 490971c1e..50e3e4079 100644 --- a/tests/test_evaluations/test_evaluations_example.py +++ b/tests/test_evaluations/test_evaluations_example.py @@ -1,3 +1,5 @@ +# License: BSD 3-Clause + import unittest diff --git a/tests/test_extensions/test_functions.py b/tests/test_extensions/test_functions.py index 76b1f9d0c..3da91b789 100644 --- a/tests/test_extensions/test_functions.py +++ b/tests/test_extensions/test_functions.py @@ -1,3 +1,5 @@ +# License: BSD 3-Clause + import inspect import openml.testing diff --git a/tests/test_extensions/test_sklearn_extension/test_sklearn_extension.py b/tests/test_extensions/test_sklearn_extension/test_sklearn_extension.py index a93c79bcd..6bb6b5383 100644 --- a/tests/test_extensions/test_sklearn_extension/test_sklearn_extension.py +++ b/tests/test_extensions/test_sklearn_extension/test_sklearn_extension.py @@ -1,3 +1,5 @@ +# License: BSD 3-Clause + import collections import json import re diff --git a/tests/test_flows/dummy_learn/dummy_forest.py b/tests/test_flows/dummy_learn/dummy_forest.py index 06eaab62e..613f73852 100644 --- a/tests/test_flows/dummy_learn/dummy_forest.py +++ b/tests/test_flows/dummy_learn/dummy_forest.py @@ -1,3 +1,6 @@ +# License: BSD 3-Clause + + class DummyRegressor(object): def fit(self, X, y): return self diff --git a/tests/test_flows/test_flow.py b/tests/test_flows/test_flow.py index 25e2dacfb..7e735d655 100644 --- a/tests/test_flows/test_flow.py +++ b/tests/test_flows/test_flow.py @@ -1,3 +1,5 @@ +# License: BSD 3-Clause + import collections import copy from distutils.version import LooseVersion diff --git a/tests/test_flows/test_flow_functions.py b/tests/test_flows/test_flow_functions.py index 91c107b3d..5a189b996 100644 --- a/tests/test_flows/test_flow_functions.py +++ b/tests/test_flows/test_flow_functions.py @@ -1,3 +1,5 @@ +# License: BSD 3-Clause + from collections import OrderedDict import copy import unittest diff --git a/tests/test_openml/test_config.py b/tests/test_openml/test_config.py index 44cf4862f..d4331a169 100644 --- a/tests/test_openml/test_config.py +++ b/tests/test_openml/test_config.py @@ -1,3 +1,5 @@ +# License: BSD 3-Clause + import os import openml.config diff --git a/tests/test_openml/test_openml.py b/tests/test_openml/test_openml.py index a3fdf541c..eda4af948 100644 --- a/tests/test_openml/test_openml.py +++ b/tests/test_openml/test_openml.py @@ -1,3 +1,5 @@ +# License: BSD 3-Clause + from unittest import mock from openml.testing import TestBase diff --git a/tests/test_runs/test_run.py b/tests/test_runs/test_run.py index 0266ca4d9..1d7c9bb18 100644 --- a/tests/test_runs/test_run.py +++ b/tests/test_runs/test_run.py @@ -1,3 +1,5 @@ +# License: BSD 3-Clause + import numpy as np import random import os diff --git a/tests/test_runs/test_run_functions.py b/tests/test_runs/test_run_functions.py index 4ff39ac6d..2773bc8d9 100644 --- a/tests/test_runs/test_run_functions.py +++ b/tests/test_runs/test_run_functions.py @@ -1,3 +1,5 @@ +# License: BSD 3-Clause + import arff from distutils.version import LooseVersion import os @@ -1126,7 +1128,7 @@ def _check_run(self, run): # error_message and run_details exist, too, but are not used so far. We need to update # this check once they are used! self.assertIsInstance(run, dict) - assert len(run) == 7, str(run) + assert len(run) == 8, str(run) def test_get_runs_list(self): # TODO: comes from live, no such lists on test diff --git a/tests/test_runs/test_trace.py b/tests/test_runs/test_trace.py index 29f3a1554..be339617d 100644 --- a/tests/test_runs/test_trace.py +++ b/tests/test_runs/test_trace.py @@ -1,3 +1,5 @@ +# License: BSD 3-Clause + from openml.runs import OpenMLRunTrace, OpenMLTraceIteration from openml.testing import TestBase diff --git a/tests/test_setups/__init__.py b/tests/test_setups/__init__.py index dc5287024..b71163cb2 100644 --- a/tests/test_setups/__init__.py +++ b/tests/test_setups/__init__.py @@ -1,3 +1,5 @@ +# License: BSD 3-Clause + # Dummy to allow mock classes in the test files to have a version number for # their parent module __version__ = '0.1' diff --git a/tests/test_setups/test_setup_functions.py b/tests/test_setups/test_setup_functions.py index 16e149544..4dc27c95f 100644 --- a/tests/test_setups/test_setup_functions.py +++ b/tests/test_setups/test_setup_functions.py @@ -1,3 +1,5 @@ +# License: BSD 3-Clause + import hashlib import time import unittest.mock diff --git a/tests/test_study/test_study_examples.py b/tests/test_study/test_study_examples.py index 1d9c56d54..b93565511 100644 --- a/tests/test_study/test_study_examples.py +++ b/tests/test_study/test_study_examples.py @@ -1,3 +1,5 @@ +# License: BSD 3-Clause + from openml.testing import TestBase, SimpleImputer diff --git a/tests/test_study/test_study_functions.py b/tests/test_study/test_study_functions.py index e31a40cd2..490fc7226 100644 --- a/tests/test_study/test_study_functions.py +++ b/tests/test_study/test_study_functions.py @@ -1,3 +1,5 @@ +# License: BSD 3-Clause + import openml import openml.study from openml.testing import TestBase diff --git a/tests/test_tasks/__init__.py b/tests/test_tasks/__init__.py index e823eb2c7..2969dc9dd 100644 --- a/tests/test_tasks/__init__.py +++ b/tests/test_tasks/__init__.py @@ -1,3 +1,5 @@ +# License: BSD 3-Clause + from .test_task import OpenMLTaskTest from .test_supervised_task import OpenMLSupervisedTaskTest diff --git a/tests/test_tasks/test_classification_task.py b/tests/test_tasks/test_classification_task.py index e5b7c4415..13068e8cb 100644 --- a/tests/test_tasks/test_classification_task.py +++ b/tests/test_tasks/test_classification_task.py @@ -1,3 +1,5 @@ +# License: BSD 3-Clause + import numpy as np from openml.tasks import get_task diff --git a/tests/test_tasks/test_clustering_task.py b/tests/test_tasks/test_clustering_task.py index 53152acb5..8f916717a 100644 --- a/tests/test_tasks/test_clustering_task.py +++ b/tests/test_tasks/test_clustering_task.py @@ -1,3 +1,5 @@ +# License: BSD 3-Clause + import openml from openml.testing import TestBase from .test_task import OpenMLTaskTest diff --git a/tests/test_tasks/test_learning_curve_task.py b/tests/test_tasks/test_learning_curve_task.py index 625252606..bfcfebcd2 100644 --- a/tests/test_tasks/test_learning_curve_task.py +++ b/tests/test_tasks/test_learning_curve_task.py @@ -1,3 +1,5 @@ +# License: BSD 3-Clause + import numpy as np from openml.tasks import get_task diff --git a/tests/test_tasks/test_regression_task.py b/tests/test_tasks/test_regression_task.py index 57ff964cd..fbb3ff607 100644 --- a/tests/test_tasks/test_regression_task.py +++ b/tests/test_tasks/test_regression_task.py @@ -1,3 +1,5 @@ +# License: BSD 3-Clause + import numpy as np from .test_supervised_task import OpenMLSupervisedTaskTest diff --git a/tests/test_tasks/test_split.py b/tests/test_tasks/test_split.py index 763bb15f7..fb31a56b3 100644 --- a/tests/test_tasks/test_split.py +++ b/tests/test_tasks/test_split.py @@ -1,3 +1,5 @@ +# License: BSD 3-Clause + import inspect import os diff --git a/tests/test_tasks/test_supervised_task.py b/tests/test_tasks/test_supervised_task.py index f7112b1cf..59fe61bc5 100644 --- a/tests/test_tasks/test_supervised_task.py +++ b/tests/test_tasks/test_supervised_task.py @@ -1,3 +1,5 @@ +# License: BSD 3-Clause + from typing import Tuple import unittest diff --git a/tests/test_tasks/test_task.py b/tests/test_tasks/test_task.py index 0154dc2a3..9d80a1dec 100644 --- a/tests/test_tasks/test_task.py +++ b/tests/test_tasks/test_task.py @@ -1,3 +1,5 @@ +# License: BSD 3-Clause + import unittest from typing import List from random import randint, shuffle diff --git a/tests/test_tasks/test_task_functions.py b/tests/test_tasks/test_task_functions.py index fd64f805d..4a71a83a7 100644 --- a/tests/test_tasks/test_task_functions.py +++ b/tests/test_tasks/test_task_functions.py @@ -1,3 +1,5 @@ +# License: BSD 3-Clause + import os from unittest import mock diff --git a/tests/test_tasks/test_task_methods.py b/tests/test_tasks/test_task_methods.py index 4a0789414..5cddd7fc4 100644 --- a/tests/test_tasks/test_task_methods.py +++ b/tests/test_tasks/test_task_methods.py @@ -1,3 +1,5 @@ +# License: BSD 3-Clause + from time import time import openml From ec34b5c22971a54f174dff021930f985f7988a78 Mon Sep 17 00:00:00 2001 From: Matthias Feurer Date: Sun, 25 Oct 2020 16:40:12 +0100 Subject: [PATCH 2/2] Update conftest.py --- tests/conftest.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/conftest.py b/tests/conftest.py index 60d555538..461a513fd 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -22,8 +22,6 @@ # License: BSD 3-Clause -# License: BSD 3-Clause - import os import logging from typing import List