Skip to content

Commit da059a2

Browse files
docs(api): add missing packages to api docs (#239)
1 parent 0eec6c6 commit da059a2

File tree

2 files changed

+29
-30
lines changed

2 files changed

+29
-30
lines changed

docs/api/index.rst

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -37,34 +37,24 @@ includes utilities for simulating concept drifts.
3737
capymoa.datasets
3838
capymoa.stream
3939

40-
Learners
41-
--------
40+
Problem Settings
41+
----------------
4242

43-
These modules implement learners for classification, regression, anomaly detection
44-
and semi-supervised learning.
43+
These modules provide classes for defining machine learning problem settings.
4544

4645
.. autosummary::
4746
:toctree: modules
48-
:caption: Learners
47+
:caption: Problem Settings
4948
:recursive:
5049

5150
capymoa.classifier
5251
capymoa.regressor
5352
capymoa.anomaly
5453
capymoa.ssl
5554
capymoa.ocl
56-
57-
Drift Detection
58-
---------------
59-
60-
These modules provide classes for detecting concept drifts.
61-
62-
.. autosummary::
63-
:toctree: modules
64-
:caption: Drift Detection
65-
:recursive:
66-
6755
capymoa.drift
56+
capymoa.clusterers
57+
capymoa.automl
6858

6959
Evaluation
7060
----------
@@ -76,7 +66,6 @@ These modules provide classes for evaluating learners.
7666
:caption: Evaluation
7767
:recursive:
7868

79-
capymoa.splitcriteria
8069
capymoa.evaluation
8170
capymoa.prediction_interval
8271

@@ -90,6 +79,7 @@ These modules provide miscellaneous utilities.
9079
:caption: Miscellaneous
9180
:recursive:
9281

82+
capymoa.splitcriteria
9383
capymoa.misc
9484
capymoa.env
9585

tasks.py

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
from invoke import task
1010
from invoke.collection import Collection
1111
from invoke.context import Context
12+
from invoke.exceptions import UnexpectedExit
1213
from pathlib import Path
1314
from typing import List, Optional
1415
from subprocess import run
@@ -36,22 +37,30 @@ def all_exist(files: List[str] = None, directories: List[str] = None) -> bool:
3637
@task()
3738
def docs_build(ctx: Context, ignore_warnings: bool = False):
3839
"""Build the documentation using Sphinx."""
39-
warn = "-W" if not ignore_warnings else ""
40-
nitpicky = "-n" if not ignore_warnings else ""
40+
cmd = []
41+
cmd += "python -m sphinx build".split()
42+
cmd += ["--color"] # color output
43+
cmd += ["-b", "html"] # generate html
44+
if not ignore_warnings:
45+
cmd += ["-W"] # warnings as errors
46+
cmd += ["-n"] # nitpicky mode
4147

4248
doc_dir = Path("docs/_build")
4349
doc_dir.mkdir(exist_ok=True, parents=True)
44-
print("Building documentation...")
45-
46-
ctx.run(
47-
f"python -m sphinx build {warn} {nitpicky} --color -E -b html docs {doc_dir}"
48-
)
49-
50-
print("-" * 80)
51-
print("Documentation is built and available at:")
52-
print(f" file://{doc_dir.resolve()}/index.html")
53-
print("You can copy and paste this URL into your browser.")
54-
print("-" * 80)
50+
cmd += ["docs", doc_dir.as_posix()] # add source and output directories
51+
52+
try:
53+
ctx.run(" ".join(cmd), echo=True)
54+
print("-" * 80)
55+
print("Documentation is built and available at:")
56+
print(f" file://{doc_dir.resolve()}/index.html")
57+
print("You can copy and paste this URL into your browser.")
58+
except UnexpectedExit:
59+
print("-" * 80)
60+
print("Documentation build failed. Here are some tips:")
61+
print(" - Check the Sphinx output for errors and warnings.")
62+
print(" - Try running `invoke docs.clean` to remove cached files.")
63+
print(" - Try running with `--ignore-warnings` to ignore warnings.")
5564

5665

5766
@task

0 commit comments

Comments
 (0)