From 1ad2134779b388544b2bffe04b3e575eeb6ba628 Mon Sep 17 00:00:00 2001
From: Andre Anjos <andre.dos.anjos@gmail.com>
Date: Thu, 17 Aug 2023 23:53:01 +0200
Subject: [PATCH] [doc] Documentation fixes

---
 doc/api.rst                     |  9 +--------
 doc/catalog.json                | 10 ++++++++++
 doc/references.rst              |  5 -----
 src/ptbench/engine/evaluator.py | 11 ++++++-----
 src/ptbench/models/typing.py    |  4 ++--
 5 files changed, 19 insertions(+), 20 deletions(-)

diff --git a/doc/api.rst b/doc/api.rst
index 4b223ca5..e166ddbe 100644
--- a/doc/api.rst
+++ b/doc/api.rst
@@ -45,6 +45,7 @@ CNN and other models implemented.
    ptbench.models.normalizer
    ptbench.models.logistic_regression
    ptbench.models.mlp
+   ptbench.models.typing
 
 
 .. _ptbench.api.engines:
@@ -76,17 +77,9 @@ Reusable auxiliary functions.
    :toctree: api/utils
 
    ptbench.utils.checkpointer
-   ptbench.utils.download
-   ptbench.utils.grad_cams
-   ptbench.utils.image
-   ptbench.utils.measure
-   ptbench.utils.model_serialization
-   ptbench.utils.model_zoo
-   ptbench.utils.plot
    ptbench.utils.rc
    ptbench.utils.resources
    ptbench.utils.summary
-   ptbench.utils.table
    ptbench.utils.tensorboard
 
 
diff --git a/doc/catalog.json b/doc/catalog.json
index 6c65691e..c837093f 100644
--- a/doc/catalog.json
+++ b/doc/catalog.json
@@ -13,5 +13,15 @@
     "sources": {
       "environment": "lightning"
     }
+  },
+  "tabulate": {
+    "versions": {
+      "latest": "https://tabulate.readthedocs.io/en/latest/",
+      "master": "https://tabulate.readthedocs.io/en/master/",
+      "stable": "https://tabulate.readthedocs.io/en/stable/"
+    },
+    "sources": {
+      "readthedocs": "tabulate"
+    }
   }
 }
diff --git a/doc/references.rst b/doc/references.rst
index 05670740..d8758df8 100644
--- a/doc/references.rst
+++ b/doc/references.rst
@@ -43,11 +43,6 @@
    Volume 66, 2020, 101797, ISSN 1361-8415. doi: 10.1016/j.media.2020.101797.
    https://www.sciencedirect.com/science/article/abs/pii/S1361841520301614
 
-.. [GOUTTE-2005] *C. Goutte and E. Gaussier*, **A probabilistic interpretation
-   of precision, recall and F-score, with implication for evaluation**,
-   European conference on Advances in Information Retrieval Research, 2005.
-   https://doi.org/10.1007/978-3-540-31865-1_25
-
 .. [TB-POC-2018] *Griesel, Rulan and Stewart, Annemie and van der Plas, Helen
    and Sikhondze, Welile and Rangaka, Molebogeng X and Nicol, Mark P and
    Kengne, Andre P and Mendelson, Marc and Maartens, Gary*, **Optimizing
diff --git a/src/ptbench/engine/evaluator.py b/src/ptbench/engine/evaluator.py
index 8df2b580..8c1a8d84 100644
--- a/src/ptbench/engine/evaluator.py
+++ b/src/ptbench/engine/evaluator.py
@@ -30,7 +30,7 @@ def eer_threshold(predictions: Iterable[BinaryPrediction]) -> float:
     ----------
     predictions
         An iterable of multiple
-        :py:data:`ptbench.models.typing.BinaryPrediction`'s.
+        :py:data:`.models.typing.BinaryPrediction`'s.
 
 
     Returns
@@ -86,7 +86,7 @@ def maxf1_threshold(predictions: Iterable[BinaryPrediction]) -> float:
     ----------
     predictions
         An iterable of multiple
-        :py:data:`ptbench.models.typing.BinaryPrediction`'s.
+        :py:data:`.models.typing.BinaryPrediction`'s.
 
 
     Returns
@@ -279,8 +279,8 @@ def aggregate_summaries(
 ) -> str:
     """Tabulates summaries from multiple splits.
 
-    This function can properly :py:mod:`tabulate` the various summaries
-    produced for all the splits in a prediction database.
+    This function can properly tabulate the various summaries produced for all
+    the splits in a prediction database.
 
 
     Parameters
@@ -288,7 +288,8 @@ def aggregate_summaries(
     data
         An iterable over all summary data collected
     fmt
-        One of the formats supported by :py:mod:`tabulate`.
+        One of the formats supported by `python-tabulate
+        <https://pypi.org/project/tabulate/>`_.
 
 
     Returns
diff --git a/src/ptbench/models/typing.py b/src/ptbench/models/typing.py
index 62903157..3eb9017c 100644
--- a/src/ptbench/models/typing.py
+++ b/src/ptbench/models/typing.py
@@ -9,12 +9,12 @@ Checkpoint: typing.TypeAlias = typing.MutableMapping[str, typing.Any]
 """Definition of a lightning checkpoint."""
 
 BinaryPrediction: typing.TypeAlias = tuple[str, int, float]
-"""Prediction: the sample name, the target, and the predicted value."""
+"""The sample name, the target, and the predicted value."""
 
 MultiClassPrediction: typing.TypeAlias = tuple[
     str, typing.Sequence[int], typing.Sequence[float]
 ]
-"""Prediction: the sample name, the target, and the predicted value."""
+"""The sample name, the target, and the predicted value."""
 
 BinaryPredictionSplit: typing.TypeAlias = typing.Mapping[
     str, typing.Sequence[BinaryPrediction]
-- 
GitLab