Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 2 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
3 changes: 2 additions & 1 deletion PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions ci_scripts/create_doc.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# License: BSD 3-Clause

set -euo pipefail

# Check if DOCPUSH is set
Expand Down
2 changes: 2 additions & 0 deletions ci_scripts/flake8_diff.sh
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 2 additions & 0 deletions ci_scripts/install.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# License: BSD 3-Clause

# Deactivate the travis-provided virtual environment and setup a
# conda-based environment instead
deactivate
Expand Down
2 changes: 2 additions & 0 deletions ci_scripts/success.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# License: BSD 3-Clause

set -e

if [[ "$COVERAGE" == "true" ]]; then
Expand Down
2 changes: 2 additions & 0 deletions ci_scripts/test.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# License: BSD 3-Clause

set -e

# check status and branch before running the unit tests
Expand Down
4 changes: 4 additions & 0 deletions doc/progress.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
Changelog
=========

0.10.2
~~~~~~
* 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.
Expand Down
3 changes: 3 additions & 0 deletions examples/20_basic/introduction_tutorial.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@
# crowding with example datasets, tasks, studies, and so on.

############################################################################

# License: BSD 3-Clause

import openml
from sklearn import neighbors

Expand Down
2 changes: 2 additions & 0 deletions examples/20_basic/simple_datasets_tutorial.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions examples/20_basic/simple_flows_and_runs_tutorial.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 2 additions & 0 deletions examples/20_basic/simple_suites_tutorial.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
and simplify both the sharing of the setup and the results.
"""

# License: BSD 3-Clause

import openml

####################################################################################################
Expand Down
2 changes: 2 additions & 0 deletions examples/30_extended/configure_logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')

Expand Down
3 changes: 3 additions & 0 deletions examples/30_extended/create_upload_tutorial.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions examples/30_extended/datasets_tutorial.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
How to list and download datasets.
"""
############################################################################

# License: BSD 3-Clauses

import openml
import pandas as pd

Expand Down
3 changes: 3 additions & 0 deletions examples/30_extended/fetch_evaluations_tutorial.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
"""

############################################################################

# License: BSD 3-Clause

import openml

############################################################################
Expand Down
3 changes: 3 additions & 0 deletions examples/30_extended/flow_id_tutorial.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
"""

####################################################################################################

# License: BSD 3-Clause

import sklearn.tree

import openml
Expand Down
2 changes: 2 additions & 0 deletions examples/30_extended/flows_and_runs_tutorial.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 3 additions & 0 deletions examples/30_extended/plot_svm_hyperparameters_tutorial.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
Plotting hyperparameter surfaces
================================
"""

# License: BSD 3-Clause

import openml
import numpy as np

Expand Down
3 changes: 3 additions & 0 deletions examples/30_extended/run_setup_tutorial.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions examples/30_extended/study_tutorial.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
tasks, all required information about a study can be retrieved.
"""
############################################################################

# License: BSD 3-Clause

import uuid

import numpy as np
Expand Down
4 changes: 3 additions & 1 deletion examples/30_extended/suites_tutorial.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,15 @@
`OpenML benchmark docs <https://docs.openml.org/benchmark/#benchmarking-suites>`_.
"""
############################################################################

# 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.
Expand Down
2 changes: 2 additions & 0 deletions examples/30_extended/task_manual_iteration_tutorial.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
but not OpenML's functionality to conduct runs.
"""

# License: BSD 3-Clause

import openml

####################################################################################################
Expand Down
2 changes: 2 additions & 0 deletions examples/30_extended/tasks_tutorial.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
A tutorial on how to list and download tasks.
"""

# License: BSD 3-Clause

import openml
import pandas as pd

Expand Down
2 changes: 2 additions & 0 deletions examples/40_paper/2015_neurips_feurer_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions examples/40_paper/2018_ida_strang_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions examples/40_paper/2018_kdd_rijn_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions examples/40_paper/2018_neurips_perrone_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
"""

############################################################################

# License: BSD 3-Clause

import openml
import numpy as np
import pandas as pd
Expand Down
2 changes: 2 additions & 0 deletions openml/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
<http://en.wikipedia.org/wiki/Representational_state_transfer>`_).
"""

# License: BSD 3-Clause

from . import _api_calls
from . import config
from .datasets import OpenMLDataset, OpenMLDataFeature
Expand Down
2 changes: 2 additions & 0 deletions openml/__version__.py
Original file line number Diff line number Diff line change
@@ -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"
2 changes: 2 additions & 0 deletions openml/_api_calls.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# License: BSD 3-Clause

import time
from typing import Dict
import requests
Expand Down
2 changes: 2 additions & 0 deletions openml/base.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# License: BSD 3-Clause

from abc import ABC, abstractmethod
from collections import OrderedDict
import re
Expand Down
3 changes: 3 additions & 0 deletions openml/config.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 2 additions & 0 deletions openml/datasets/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# License: BSD 3-Clause

from .functions import (
attributes_arff_from_df,
check_datasets_active,
Expand Down
3 changes: 3 additions & 0 deletions openml/datasets/data_feature.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# License: BSD 3-Clause


class OpenMLDataFeature(object):
"""
Data Feature (a.k.a. Attribute) object.
Expand Down
2 changes: 2 additions & 0 deletions openml/datasets/dataset.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# License: BSD 3-Clause

from collections import OrderedDict
import re
import gzip
Expand Down
2 changes: 2 additions & 0 deletions openml/datasets/functions.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# License: BSD 3-Clause

import io
import logging
import os
Expand Down
2 changes: 2 additions & 0 deletions openml/evaluations/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# License: BSD 3-Clause

from .evaluation import OpenMLEvaluation
from .functions import list_evaluations, list_evaluation_measures, list_evaluations_setups

Expand Down
2 changes: 2 additions & 0 deletions openml/evaluations/evaluation.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# License: BSD 3-Clause

import openml.config


Expand Down
2 changes: 2 additions & 0 deletions openml/evaluations/functions.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# License: BSD 3-Clause

import json
import xmltodict
import pandas as pd
Expand Down
3 changes: 3 additions & 0 deletions openml/exceptions.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# License: BSD 3-Clause


class PyOpenMLError(Exception):
def __init__(self, message: str):
self.message = message
Expand Down
2 changes: 2 additions & 0 deletions openml/extensions/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# License: BSD 3-Clause

from typing import List, Type # noqa: F401

from .extension_interface import Extension
Expand Down
2 changes: 2 additions & 0 deletions openml/extensions/extension_interface.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 2 additions & 0 deletions openml/extensions/functions.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 2 additions & 0 deletions openml/extensions/sklearn/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# License: BSD 3-Clause

from .extension import SklearnExtension
from openml.extensions import register_extension

Expand Down
2 changes: 2 additions & 0 deletions openml/extensions/sklearn/extension.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# License: BSD 3-Clause

from collections import OrderedDict # noqa: F401
import copy
from distutils.version import LooseVersion
Expand Down
2 changes: 2 additions & 0 deletions openml/flows/__init__.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 2 additions & 0 deletions openml/flows/flow.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# License: BSD 3-Clause

from collections import OrderedDict
import os
from typing import Dict, List, Union, Tuple, Optional # noqa: F401
Expand Down
Loading