Skip to content

Commit 10c9dc5

Browse files
mfeurerPGijsbers
andauthored
Fix documentation links (#1048)
* fix warnings, make sphinx fail on warnings * fix a few links * fix a bunch of links * fix more links * fix all remaining links * and finally add the link checker * debug workflow * more debug * undo debug * Add to changelog * fix new warning * clean up more errors * Fix link after rebase * Apply suggestions from code review Co-authored-by: PGijsbers <p.gijsbers@tue.nl> Co-authored-by: PGijsbers <p.gijsbers@tue.nl>
1 parent 6b71981 commit 10c9dc5

32 files changed

Lines changed: 293 additions & 158 deletions

.github/workflows/docs.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ jobs:
1717
run: |
1818
cd doc
1919
make html
20+
- name: Check links
21+
run: |
22+
cd doc
23+
make linkcheck
2024
- name: Pull latest gh-pages
2125
if: (contains(github.ref, 'develop') || contains(github.ref, 'master')) && github.event_name == 'push'
2226
run: |

doc/_templates/class.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
:orphan:
2+
13
:mod:`{{module}}`.{{objname}}
24
{{ underline }}==============
35

doc/api.rst

Lines changed: 173 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -2,64 +2,33 @@
22

33
.. _api:
44

5-
APIs
6-
****
5+
API
6+
***
77

8-
Top-level Classes
9-
-----------------
10-
.. currentmodule:: openml
11-
12-
.. autosummary::
13-
:toctree: generated/
14-
:template: class.rst
15-
16-
OpenMLBenchmarkSuite
17-
OpenMLClassificationTask
18-
OpenMLClusteringTask
19-
OpenMLDataFeature
20-
OpenMLDataset
21-
OpenMLEvaluation
22-
OpenMLFlow
23-
OpenMLLearningCurveTask
24-
OpenMLParameter
25-
OpenMLRegressionTask
26-
OpenMLRun
27-
OpenMLSetup
28-
OpenMLSplit
29-
OpenMLStudy
30-
OpenMLSupervisedTask
31-
OpenMLTask
8+
Modules
9+
=======
3210

33-
.. _api_extensions:
11+
:mod:`openml.datasets`
12+
----------------------
13+
.. automodule:: openml.datasets
14+
:no-members:
15+
:no-inherited-members:
3416

35-
Extensions
36-
----------
17+
Dataset Classes
18+
~~~~~~~~~~~~~~~
3719

38-
.. currentmodule:: openml.extensions
20+
.. currentmodule:: openml.datasets
3921

4022
.. autosummary::
4123
:toctree: generated/
4224
:template: class.rst
4325

44-
Extension
45-
sklearn.SklearnExtension
46-
47-
.. currentmodule:: openml.extensions
48-
49-
.. autosummary::
50-
:toctree: generated/
51-
:template: function.rst
52-
53-
get_extension_by_flow
54-
get_extension_by_model
55-
register_extension
56-
26+
OpenMLDataFeature
27+
OpenMLDataset
5728

58-
Modules
59-
-------
29+
Dataset Functions
30+
~~~~~~~~~~~~~~~~~
6031

61-
:mod:`openml.datasets`: Dataset Functions
62-
-----------------------------------------
6332
.. currentmodule:: openml.datasets
6433

6534
.. autosummary::
@@ -77,20 +46,56 @@ Modules
7746
edit_dataset
7847
fork_dataset
7948

80-
:mod:`openml.evaluations`: Evaluation Functions
81-
-----------------------------------------------
49+
:mod:`openml.evaluations`
50+
-------------------------
51+
.. automodule:: openml.evaluations
52+
:no-members:
53+
:no-inherited-members:
54+
55+
Evaluations Classes
56+
~~~~~~~~~~~~~~~~~~~
57+
58+
.. currentmodule:: openml.evaluations
59+
60+
.. autosummary::
61+
:toctree: generated/
62+
:template: class.rst
63+
64+
OpenMLEvaluation
65+
66+
Evaluations Functions
67+
~~~~~~~~~~~~~~~~~~~~~
68+
8269
.. currentmodule:: openml.evaluations
8370

8471
.. autosummary::
8572
:toctree: generated/
8673
:template: function.rst
8774

88-
list_evaluations
89-
list_evaluation_measures
90-
list_evaluations_setups
75+
list_evaluations
76+
list_evaluation_measures
77+
list_evaluations_setups
9178

9279
:mod:`openml.flows`: Flow Functions
9380
-----------------------------------
81+
.. automodule:: openml.flows
82+
:no-members:
83+
:no-inherited-members:
84+
85+
Flow Classes
86+
~~~~~~~~~~~~
87+
88+
.. currentmodule:: openml.flows
89+
90+
.. autosummary::
91+
:toctree: generated/
92+
:template: class.rst
93+
94+
OpenMLFlow
95+
96+
Flow Functions
97+
~~~~~~~~~~~~~~
98+
9499
.. currentmodule:: openml.flows
95100

96101
.. autosummary::
@@ -104,6 +109,24 @@ Modules
104109

105110
:mod:`openml.runs`: Run Functions
106111
----------------------------------
112+
.. automodule:: openml.runs
113+
:no-members:
114+
:no-inherited-members:
115+
116+
Run Classes
117+
~~~~~~~~~~~
118+
119+
.. currentmodule:: openml.runs
120+
121+
.. autosummary::
122+
:toctree: generated/
123+
:template: class.rst
124+
125+
OpenMLRun
126+
127+
Run Functions
128+
~~~~~~~~~~~~~
129+
107130
.. currentmodule:: openml.runs
108131

109132
.. autosummary::
@@ -122,6 +145,25 @@ Modules
122145

123146
:mod:`openml.setups`: Setup Functions
124147
-------------------------------------
148+
.. automodule:: openml.setups
149+
:no-members:
150+
:no-inherited-members:
151+
152+
Setup Classes
153+
~~~~~~~~~~~~~
154+
155+
.. currentmodule:: openml.setups
156+
157+
.. autosummary::
158+
:toctree: generated/
159+
:template: class.rst
160+
161+
OpenMLParameter
162+
OpenMLSetup
163+
164+
Setup Functions
165+
~~~~~~~~~~~~~~~
166+
125167
.. currentmodule:: openml.setups
126168

127169
.. autosummary::
@@ -135,6 +177,25 @@ Modules
135177

136178
:mod:`openml.study`: Study Functions
137179
------------------------------------
180+
.. automodule:: openml.study
181+
:no-members:
182+
:no-inherited-members:
183+
184+
Study Classes
185+
~~~~~~~~~~~~~
186+
187+
.. currentmodule:: openml.study
188+
189+
.. autosummary::
190+
:toctree: generated/
191+
:template: class.rst
192+
193+
OpenMLBenchmarkSuite
194+
OpenMLStudy
195+
196+
Study Functions
197+
~~~~~~~~~~~~~~~
198+
138199
.. currentmodule:: openml.study
139200

140201
.. autosummary::
@@ -158,6 +219,31 @@ Modules
158219

159220
:mod:`openml.tasks`: Task Functions
160221
-----------------------------------
222+
.. automodule:: openml.tasks
223+
:no-members:
224+
:no-inherited-members:
225+
226+
Task Classes
227+
~~~~~~~~~~~~
228+
229+
.. currentmodule:: openml.tasks
230+
231+
.. autosummary::
232+
:toctree: generated/
233+
:template: class.rst
234+
235+
OpenMLClassificationTask
236+
OpenMLClusteringTask
237+
OpenMLLearningCurveTask
238+
OpenMLRegressionTask
239+
OpenMLSplit
240+
OpenMLSupervisedTask
241+
OpenMLTask
242+
TaskType
243+
244+
Task Functions
245+
~~~~~~~~~~~~~~
246+
161247
.. currentmodule:: openml.tasks
162248

163249
.. autosummary::
@@ -168,3 +254,38 @@ Modules
168254
get_task
169255
get_tasks
170256
list_tasks
257+
258+
.. _api_extensions:
259+
260+
Extensions
261+
==========
262+
263+
.. automodule:: openml.extensions
264+
:no-members:
265+
:no-inherited-members:
266+
267+
Extension Classes
268+
-----------------
269+
270+
.. currentmodule:: openml.extensions
271+
272+
.. autosummary::
273+
:toctree: generated/
274+
:template: class.rst
275+
276+
Extension
277+
sklearn.SklearnExtension
278+
279+
Extension Functions
280+
-------------------
281+
282+
.. currentmodule:: openml.extensions
283+
284+
.. autosummary::
285+
:toctree: generated/
286+
:template: function.rst
287+
288+
get_extension_by_flow
289+
get_extension_by_model
290+
register_extension
291+

doc/conf.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,11 @@
114114
# If true, keep warnings as "system message" paragraphs in the built documents.
115115
# keep_warnings = False
116116

117+
# Complain about all broken internal links - broken external links can be
118+
# found with `make linkcheck`
119+
#
120+
# currently disabled because without intersphinx we cannot link to numpy.ndarray
121+
# nitpicky = True
117122

118123
# -- Options for HTML output ----------------------------------------------
119124

@@ -344,3 +349,4 @@
344349

345350
def setup(app):
346351
app.add_css_file("codehighlightstyle.css")
352+
app.warningiserror = True

doc/contributing.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ In particular, a few ways to contribute to openml-python are:
1919
For more information, see the :ref:`extensions` below.
2020

2121
* Bug reports. If something doesn't work for you or is cumbersome, please open a new issue to let
22-
us know about the problem. See `this section <https://github.com/openml/openml-python/blob/develop/CONTRIBUTING.md#reporting-bugs>`_.
22+
us know about the problem. See `this section <https://github.com/openml/openml-python/blob/master/CONTRIBUTING.md#user-content-reporting-bugs>`_.
2323

2424
* `Cite OpenML <https://www.openml.org/cite>`_ if you use it in a scientific publication.
2525

@@ -38,10 +38,10 @@ Content of the Library
3838
To leverage support from the community and to tap in the potential of OpenML, interfacing
3939
with popular machine learning libraries is essential. However, the OpenML-Python team does
4040
not have the capacity to develop and maintain such interfaces on its own. For this, we
41-
have built an extension interface to allows others to contribute back. Building a suitable
41+
have built an extension interface to allows others to contribute back. Building a suitable
4242
extension for therefore requires an understanding of the current OpenML-Python support.
4343

44-
`This example <examples/20_basic/simple_flows_and_runs_tutorial.html>`_
44+
The :ref:`sphx_glr_examples_20_basic_simple_flows_and_runs_tutorial.py` tutorial
4545
shows how scikit-learn currently works with OpenML-Python as an extension. The *sklearn*
4646
extension packaged with the `openml-python <https://github.com/openml/openml-python>`_
4747
repository can be used as a template/benchmark to build the new extension.
@@ -50,7 +50,7 @@ repository can be used as a template/benchmark to build the new extension.
5050
API
5151
+++
5252
* The extension scripts must import the `openml` package and be able to interface with
53-
any function from the OpenML-Python `API <api.html>`_.
53+
any function from the OpenML-Python :ref:`api`.
5454
* The extension has to be defined as a Python class and must inherit from
5555
:class:`openml.extensions.Extension`.
5656
* This class needs to have all the functions from `class Extension` overloaded as required.
@@ -61,7 +61,7 @@ API
6161

6262
Interfacing with OpenML-Python
6363
++++++++++++++++++++++++++++++
64-
Once the new extension class has been defined, the openml-python module to
64+
Once the new extension class has been defined, the openml-python module to
6565
:meth:`openml.extensions.register_extension` must be called to allow OpenML-Python to
6666
interface the new extension.
6767

@@ -73,8 +73,8 @@ Each extension created should be a stand-alone repository, compatible with the
7373
`OpenML-Python repository <https://github.com/openml/openml-python>`_.
7474
The extension repository should work off-the-shelf with *OpenML-Python* installed.
7575

76-
Create a `public Github repo <https://help.github.com/en/articles/create-a-repo>`_ with
77-
the following directory structure:
76+
Create a `public Github repo <https://docs.github.com/en/github/getting-started-with-github/create-a-repo>`_
77+
with the following directory structure:
7878

7979
::
8080

0 commit comments

Comments
 (0)