Skip to content

Commit

Permalink
DOC: use sphinx-apipages plugin (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
hagenw authored Aug 20, 2024
1 parent e88e04f commit cb409a5
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 67 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ dist/
.idea/
venv/
coverage.xml
docs/api/
docs/pics/*.svg
docs/.ipynb_checkpoints
docs/examples/output
17 changes: 0 additions & 17 deletions audpsychometric/__init__.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,3 @@
"""Library to facilitate evaluation and processing of annotated speech.
The input data format for all functions in this module is the same:
a :class:`pd.DataFrame` is expected.
This dataframe is assumed to
- have an index that identifies the unit of observation,
e.g. a psychometric item to be rated
- have a separate column for each rater
So the entry in the frame at (irow, icol)
identifies the rating of unit irow by rather icol.
Note that these assumptions are not checked
and are under responsibility of the user.
"""
import audpsychometric.core
from audpsychometric.core import datasets
from audpsychometric.core.datasets import list_datasets
Expand Down
87 changes: 39 additions & 48 deletions docs/api.rst → docs/api-src/audpsychometric.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,33 @@ audpsychometric

.. automodule:: audpsychometric

Library to facilitate evaluation and processing of annotated speech.

The input data format for all functions in this module is the same:
a :class:`pd.DataFrame` is expected.

This dataframe is assumed to

- have an index that identifies the unit of observation,
e.g. a psychometric item to be rated
- have a separate column for each rater

So the entry in the frame at (irow, icol)
identifies the rating of unit irow by rather icol.
Note that these assumptions are not checked
and are under responsibility of the user.

Pychometric Analysis
--------------------

.. autosummary::
:toctree:
:nosignatures:

cronbachs_alpha
congeneric_reliability
intra_class_correlation

The module currently contains two reliability coefficients
from the family of structural equation model (SEM)-based
reliability coefficients.
Expand Down Expand Up @@ -38,54 +62,31 @@ We do not implement it here,
as there are other implementations available,
e.g. :func:`audmetric.concordance_cc`.

cronbachs_alpha
^^^^^^^^^^^^^^^

.. autofunction:: cronbachs_alpha

congeneric_reliability
^^^^^^^^^^^^^^^^^^^^^^

.. autofunction:: congeneric_reliability

intra_class_correlation
^^^^^^^^^^^^^^^^^^^^^^^

.. autofunction:: intra_class_correlation


Gold Standard Calculation
-------------------------

evaluator_weighted_estimator
^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. autofunction:: evaluator_weighted_estimator
.. autosummary::
:toctree:
:nosignatures:

gold_standard_mean
^^^^^^^^^^^^^^^^^^

.. autofunction:: gold_standard_mean

gold_standard_median
^^^^^^^^^^^^^^^^^^^^

.. autofunction:: gold_standard_median

gold_standard_mode
^^^^^^^^^^^^^^^^^^

.. autofunction:: gold_standard_mode

rater_confidence_pearson
^^^^^^^^^^^^^^^^^^^^^^^^

.. autofunction:: rater_confidence_pearson
evaluator_weighted_estimator
gold_standard_mean
gold_standard_median
gold_standard_mode
rater_confidence_pearson


Demo Datasets
-------------

.. autosummary::
:toctree:
:nosignatures:

list_datasets
read_dataset

Currently these datasets are defined:

.. jupyter-execute::
Expand All @@ -94,16 +95,6 @@ Currently these datasets are defined:
df_datasets = datasets.list_datasets()
print(df_datasets)

list_datasets
^^^^^^^^^^^^^

.. autofunction:: list_datasets

read_dataset
^^^^^^^^^^^^

.. autofunction:: read_dataset


.. _one-dimensional congeneric reliability: https://en.wikipedia.org/wiki/Congeneric_reliability
.. _CCC: https://en.wikipedia.org/wiki/Concordance_correlation_coefficient
9 changes: 8 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,13 @@
master_doc = "index"
extensions = []
source_suffix = ".rst"
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store", "**.ipynb_checkpoints"]
exclude_patterns = [
"api-src",
"build",
"Thumbs.db",
".DS_Store",
"**.ipynb_checkpoints",
]
pygments_style = None
extensions = [
"jupyter_sphinx", # executing code blocks
Expand All @@ -28,6 +34,7 @@
"sphinx_autodoc_typehints",
"sphinx_copybutton", # for "copy to clipboard" buttons
"sphinxcontrib.bibtex",
"sphinx_apipages",
]


Expand Down
2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
:caption: API Documentation
:hidden:

api
api/audpsychometric
genindex
bibliography

Expand Down
1 change: 1 addition & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ audeer
ipykernel
jupyter-sphinx
sphinx
sphinx-apipages >=0.1.2
sphinx-audeering-theme >=1.2.1
sphinx-autodoc-typehints
sphinx-copybutton
Expand Down

0 comments on commit cb409a5

Please sign in to comment.