Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
2256f20
PEP8. No unused import. # always follows by space.
PGijsbers Feb 21, 2019
59af53c
PEP8
PGijsbers Feb 21, 2019
065ee57
Edit a blank line back in for file formatting.
PGijsbers Feb 21, 2019
0d40cae
PEP8. Fix grammar.
PGijsbers Feb 21, 2019
f75ef71
PEP8
PGijsbers Feb 21, 2019
29a1afe
PEP8.
PGijsbers Feb 21, 2019
a0519c2
PEP8
PGijsbers Feb 21, 2019
b20abfd
Refactor.
PGijsbers Feb 21, 2019
59bc026
PEP8, small refactor.
PGijsbers Feb 21, 2019
9fecfc4
OpenMLStudy available through import *
PGijsbers Feb 22, 2019
97a4ed9
PEP8.
PGijsbers Feb 22, 2019
f93cc27
PEP8.
PGijsbers Feb 22, 2019
d270d02
PEP8. Removed Py2 support.
PGijsbers Feb 22, 2019
a134512
PEP8.
PGijsbers Feb 22, 2019
721a24a
PEP8. Minor refactor.
PGijsbers Feb 22, 2019
0e5918f
PEP8. Refactor/bugfix __eq__
PGijsbers Feb 22, 2019
d963df2
PEP8. task type are input for list_tasks anyway, so the enum should b…
PGijsbers Feb 22, 2019
5bc6a64
PEP8.
PGijsbers Feb 22, 2019
469da35
undo linebreaks
PGijsbers Feb 22, 2019
486675f
Update for updated error message.
PGijsbers Feb 22, 2019
a638640
Update for updated error message.
PGijsbers Feb 22, 2019
da0cdd2
Undo refactor.
PGijsbers Feb 22, 2019
af6d5c6
Redo refactor.
PGijsbers Feb 22, 2019
1e45bda
Merge branch 'develop' into fix624_pep8
mfeurer Feb 22, 2019
b196a97
Fix syntax error due to online merging
mfeurer Feb 22, 2019
7450082
Fix merge error due to online merging
mfeurer Feb 22, 2019
5d83c94
Fix bug due to online merge error
mfeurer Feb 22, 2019
3a98e9f
Change flake scope and arguments.
PGijsbers Feb 23, 2019
ecce029
Final PEP8 changes.
PGijsbers Feb 23, 2019
a4817ba
PEP8 for several test files
mfeurer Feb 23, 2019
0039738
PEP8.
PGijsbers Feb 23, 2019
b9482ba
PEP8.
PGijsbers Feb 23, 2019
a2ef3f9
PEP8. Removed import 'unused' import statements. Have to watch unit t…
PGijsbers Feb 23, 2019
792adb2
Fix bug regarding not existing argument
mfeurer Feb 23, 2019
9a45d03
PEP8.
PGijsbers Feb 23, 2019
24c39d8
Merge branch 'fix624_pep8' of https://github.com/openml/openml-python…
PGijsbers Feb 23, 2019
4e38475
Flake8 ignore directive.
PGijsbers Feb 23, 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
3 changes: 2 additions & 1 deletion ci_scripts/flake8_diff.sh
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,8 @@ check_files() {
if [ -n "$files" ]; then
# Conservative approach: diff without context (--unified=0) so that code
# that was not changed does not create failures
git diff --no-ext-diff --unified=0 $COMMIT_RANGE -- $files | flake8 --ignore E402 --diff --show-source $options
# git diff --no-ext-diff --unified=0 $COMMIT_RANGE -- $files | flake8 --ignore E402 --diff --show-source $options
flake8 --ignore E402,W503 --show-source --max-line-length 100 $options
fi
}

Expand Down
100 changes: 50 additions & 50 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
import os
import sys
import sphinx_bootstrap_theme
from sphinx_gallery.sorting import ExplicitOrder, FileNameSortKey
import openml


Expand All @@ -27,19 +26,19 @@
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#sys.path.insert(0, os.path.abspath('.')# )
# sys.path.insert(0, os.path.abspath('.')# )

sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..'))
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..', '..'))

# -- General configuration ------------------------------------------------

# If your documentation needs a minimal Sphinx version, state it here.
#needs_sphinx = '1.0'
# needs_sphinx = '1.0'

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.autosummary',
Expand All @@ -64,7 +63,7 @@
source_suffix = '.rst'

# The encoding of source files.
#source_encoding = 'utf-8-sig'
# source_encoding = 'utf-8-sig'

# The master toctree document.
master_doc = 'index'
Expand All @@ -87,41 +86,41 @@

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#language = None
# language = None

# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
#today = ''
# today = ''
# Else, today_fmt is used as the format for a strftime call.
#today_fmt = '%B %d, %Y'
# today_fmt = '%B %d, %Y'

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
exclude_patterns = ['_build', '_templates', '_static']

# The reST default role (used for this markup: `text`) to use for all
# documents.
#default_role = None
# default_role = None

# If true, '()' will be appended to :func: etc. cross-reference text.
#add_function_parentheses = True
# add_function_parentheses = True

# If true, the current module name will be prepended to all description
# unit titles (such as .. function::).
#add_module_names = True
# add_module_names = True

# If true, sectionauthor and moduleauthor directives will be shown in the
# output. They are ignored by default.
#show_authors = False
# show_authors = False

# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'

# A list of ignored prefixes for module index sorting.
#modindex_common_prefix = []
# modindex_common_prefix = []

# If true, keep warnings as "system message" paragraphs in the built documents.
#keep_warnings = False
# keep_warnings = False


# -- Options for HTML output ----------------------------------------------
Expand All @@ -135,7 +134,7 @@
'navbar_title': "OpenML",

# Tab name for entire site. (Default: "Site")
#'navbar_site_name': "Site",
# 'navbar_site_name': "Site",

# A list of tuples containting pages to link to. The value should
# be in the form [(name, page), ..]
Expand Down Expand Up @@ -198,19 +197,19 @@

# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".
#html_title = None
# html_title = None

# A shorter title for the navigation bar. Default is the same as html_title.
#html_short_title = None
# html_short_title = None

# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
#html_logo = None
# html_logo = None

# The name of an image file (within the static path) to use as favicon of the
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
# pixels large.
#html_favicon = None
# html_favicon = None

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
Expand All @@ -220,48 +219,48 @@
# Add any extra paths that contain custom files (such as robots.txt or
# .htaccess) here, relative to this directory. These files are copied
# directly to the root of the documentation.
#html_extra_path = []
# html_extra_path = []

# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
#html_last_updated_fmt = '%b %d, %Y'
# html_last_updated_fmt = '%b %d, %Y'

# If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities.
#html_use_smartypants = True
# html_use_smartypants = True

# Custom sidebar templates, maps document names to template names.
html_sidebars = {'**': ['localtoc.html']}

# Additional templates that should be rendered to pages, maps page names to
# template names.
#html_additional_pages = {}
# html_additional_pages = {}

# If false, no module index is generated.
#html_domain_indices = True
# html_domain_indices = True

# If false, no index is generated.
#html_use_index = True
# html_use_index = True

# If true, the index is split into individual pages for each letter.
#html_split_index = False
# html_split_index = False

# If true, links to the reST sources are added to the pages.
#html_show_sourcelink = True
# html_show_sourcelink = True

# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
#html_show_sphinx = True
# html_show_sphinx = True

# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
#html_show_copyright = True
# html_show_copyright = True

# If true, an OpenSearch description file will be output, and all pages will
# contain a <link> tag referring to it. The value of this option must be the
# base URL from which the finished HTML is served.
#html_use_opensearch = ''
# html_use_opensearch = ''

# This is the file name suffix for HTML files (e.g. ".xhtml").
#html_file_suffix = None
# html_file_suffix = None

# Output file base name for HTML help builder.
htmlhelp_basename = 'OpenMLdoc'
Expand All @@ -271,13 +270,13 @@

latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
#'papersize': 'letterpaper',
# 'papersize': 'letterpaper',

# The font size ('10pt', '11pt' or '12pt').
#'pointsize': '10pt',
# 'pointsize': '10pt',

# Additional stuff for the LaTeX preamble.
#'preamble': '',
# 'preamble': '',
}

# Grouping the document tree into LaTeX files. List of tuples
Expand All @@ -288,23 +287,23 @@

# The name of an image file (relative to this directory) to place at the top of
# the title page.
#latex_logo = None
# latex_logo = None

# For "manual" documents, if this is true, then toplevel headings are parts,
# not chapters.
#latex_use_parts = False
# latex_use_parts = False

# If true, show page references after internal links.
#latex_show_pagerefs = False
# latex_show_pagerefs = False

# If true, show URL addresses after external links.
#latex_show_urls = False
# latex_show_urls = False

# Documents to append as an appendix to all manuals.
#latex_appendices = []
# latex_appendices = []

# If false, no module index is generated.
#latex_domain_indices = True
# latex_domain_indices = True


# -- Options for manual page output ---------------------------------------
Expand All @@ -317,7 +316,7 @@
]

# If true, show URL addresses after external links.
#man_show_urls = False
# man_show_urls = False


# -- Options for Texinfo output -------------------------------------------
Expand All @@ -332,19 +331,20 @@
]

# Documents to append as an appendix to all manuals.
#texinfo_appendices = []
# texinfo_appendices = []

# If false, no module index is generated.
#texinfo_domain_indices = True
# texinfo_domain_indices = True

# How to display URL addresses: 'footnote', 'no', or 'inline'.
#texinfo_show_urls = 'footnote'
# texinfo_show_urls = 'footnote'

# If true, do not generate a @detailmenu in the "Top" node's menu.
#texinfo_no_detailmenu = False
# texinfo_no_detailmenu = False

# prefix each section label with the name of the document it is in, in order to avoid
# ambiguity when there are multiple same section labels in different documents.
# prefix each section label with the name of the document it is in,
# in order to avoid ambiguity when there are multiple same section
# labels in different documents.
autosectionlabel_prefix_document = True
# Sphinx-gallery configuration.
sphinx_gallery_conf = {
Expand All @@ -356,5 +356,5 @@
'gallery_dirs': 'examples',
# compile execute examples in the examples dir
'filename_pattern': '.*example.py$|.*tutorial.py$',
#TODO: fix back/forward references for the examples.
# TODO: fix back/forward references for the examples.
}
7 changes: 4 additions & 3 deletions examples/datasets_tutorial.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,9 @@

############################################################################
# Get the actual data.
#
# Returned as numpy array, with meta-info (e.g. target feature, feature names,...)
#
# Returned as numpy array, with meta-info
# (e.g. target feature, feature names, ...)
X, y, attribute_names = dataset.get_data(
target=dataset.default_target_attribute,
return_attribute_names=True,
Expand All @@ -77,4 +78,4 @@
hist_kwds={'bins': 20},
alpha=.8,
cmap='plasma'
)
)
4 changes: 1 addition & 3 deletions examples/flows_and_runs_tutorial.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
"""

import openml
import pandas as pd
import seaborn as sns
from pprint import pprint
from sklearn import ensemble, neighbors, preprocessing, pipeline, tree

Expand Down Expand Up @@ -60,7 +58,7 @@
############################################################################
# Share the run on the OpenML server
#
# So far the run is only available locally. By calling the publish function, the run is send to the OpenML server:
# So far the run is only available locally. By calling the publish function, the run is sent to the OpenML server:

myrun = run.publish()
# For this tutorial, our configuration publishes to the test server
Expand Down
12 changes: 6 additions & 6 deletions openml/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* analyze experiments (uploaded by you and other collaborators) and conduct
meta studies

In particular, this module implemts a python interface for the
In particular, this module implements a python interface for the
`OpenML REST API <https://www.openml.org/guide#!rest_services>`_
(`REST on wikipedia
<http://en.wikipedia.org/wiki/Representational_state_transfer>`_).
Expand All @@ -22,15 +22,15 @@
from . import runs
from . import flows
from . import setups
from . import study
from . import evaluations
from . import utils

from .runs import OpenMLRun
from .tasks import OpenMLTask, OpenMLSplit
from .flows import OpenMLFlow
from .evaluations import OpenMLEvaluation
from .study import OpenMLStudy

from .__version__ import __version__
from .__version__ import __version__ # noqa: F401


def populate_cache(task_ids=None, dataset_ids=None, flow_ids=None,
Expand Down Expand Up @@ -71,5 +71,5 @@ def populate_cache(task_ids=None, dataset_ids=None, flow_ids=None,

__all__ = ['OpenMLDataset', 'OpenMLDataFeature', 'OpenMLRun',
'OpenMLSplit', 'OpenMLEvaluation', 'OpenMLSetup',
'OpenMLTask', 'OpenMLFlow', 'datasets', 'evaluations',
'config', 'runs', 'flows', 'tasks', 'setups']
'OpenMLTask', 'OpenMLFlow', 'OpenMLStudy', 'datasets',
'evaluations', 'config', 'runs', 'flows', 'tasks', 'setups']
Loading