From 929be20bf526c037d0c41bf9f15eda7ef3b75630 Mon Sep 17 00:00:00 2001 From: David Nicholson Date: Sat, 12 Oct 2024 09:43:48 -0400 Subject: [PATCH] Put all of API onto one page in docs, fix how we show crowsetta.examples.show and crowsetta.example --- doc/api/core.md | 121 --------------------------- doc/api/formats.md | 20 ----- doc/api/index.md | 195 +++++++++++++++++++++++++++++++++++++++---- doc/api/interface.md | 42 ---------- 4 files changed, 181 insertions(+), 197 deletions(-) delete mode 100644 doc/api/core.md delete mode 100644 doc/api/formats.md delete mode 100644 doc/api/interface.md diff --git a/doc/api/core.md b/doc/api/core.md deleted file mode 100644 index f5921754..00000000 --- a/doc/api/core.md +++ /dev/null @@ -1,121 +0,0 @@ -(api-core)= - -# Core - -This page documents the core API of crowsetta, -including data types, other classes, and modules. - -## Data types - -### Annotation - -```{eval-rst} -.. autosummary:: - :toctree: generated - :template: class.rst - - crowsetta.Annotation -``` - -### Sequence - -```{eval-rst} -.. autosummary:: - :toctree: generated - :template: class.rst - - crowsetta.Sequence -``` - -### Segment - -```{eval-rst} -.. autosummary:: - :toctree: generated - :template: class.rst - - crowsetta.Segment -``` - -### BBox - -```{eval-rst} -.. autosummary:: - :toctree: generated - :template: class.rst - - crowsetta.BBox -``` - -## Classes - -### Transcriber - -```{eval-rst} -.. autosummary:: - :toctree: generated - :template: class.rst - - crowsetta.Transcriber -``` - -## Modules - -### `crowsetta.examples` - -```{eval-rst} -.. autosummary:: - :toctree: generated - :template: module.rst - :recursive: - - crowsetta.examples -``` - -### `crowsetta.interface` - -For complete documentation of the interface, -please see {ref}`this page `. - -```{eval-rst} -.. autosummary:: - :toctree: generated - :template: module.rst - - crowsetta.interface -``` - - -### typing - -```{eval-rst} -.. autosummary:: - :toctree: generated - :template: module.rst - :recursive: - - crowsetta.typing -``` - - -### validation - -```{eval-rst} -.. autosummary:: - :toctree: generated - :template: module.rst - :recursive: - - crowsetta.validation -``` - -## Decorators - -### `crowsetta.register_format` - -```{eval-rst} -.. autosummary:: - :toctree: generated - - crowsetta.register_format -``` diff --git a/doc/api/formats.md b/doc/api/formats.md deleted file mode 100644 index 69fe2eff..00000000 --- a/doc/api/formats.md +++ /dev/null @@ -1,20 +0,0 @@ -(api-formats)= - -# Formats - -This page documents the API of the `crowsetta.formats` module. -It is generated automatically. -If you are a crowsetta user looking for -more detail about the built-in formats, -please see: {ref}`formats-index`. - -```{eval-rst} -.. autosummary:: - :toctree: generated - :template: module.rst - :recursive: - - crowsetta.formats - crowsetta.formats.bbox - crowsetta.formats.seq -``` diff --git a/doc/api/index.md b/doc/api/index.md index b119c6cd..ec5498f5 100644 --- a/doc/api/index.md +++ b/doc/api/index.md @@ -8,22 +8,189 @@ This section documents the [API](https://en.wikipedia.org/wiki/API) of crowsetta. -```{list-table} -:widths: 30 70 +(api-core)= -* - {ref}`Core ` - - The core data types, classes and modules of crowsetta -* - {ref}`Interface ` - - Defines an interface for classes that represent annotation formats -* - {ref}`Formats ` - - Modules with the classes representing annotation formats, - and functions for conveniently accessing them. +# Core + +This section documents the core API of crowsetta, +including data types, other classes, and modules. + +## Data types + +### Annotation + +```{eval-rst} +.. autosummary:: + :toctree: generated + :template: class.rst + + crowsetta.Annotation +``` + +### Sequence + +```{eval-rst} +.. autosummary:: + :toctree: generated + :template: class.rst + + crowsetta.Sequence +``` + +### Segment + +```{eval-rst} +.. autosummary:: + :toctree: generated + :template: class.rst + + crowsetta.Segment +``` + +### BBox + +```{eval-rst} +.. autosummary:: + :toctree: generated + :template: class.rst + + crowsetta.BBox +``` + +## Classes + +### Transcriber + +```{eval-rst} +.. autosummary:: + :toctree: generated + :template: class.rst + + crowsetta.Transcriber +``` + +## Modules + +### `crowsetta.interface` + +For complete documentation of the interface, +please see {ref}`this page `. + +```{eval-rst} +.. autosummary:: + :toctree: generated + :template: module.rst + + crowsetta.interface ``` -```{toctree} -:hidden: true -core -interface -formats +### typing + +```{eval-rst} +.. autosummary:: + :toctree: generated + :template: module.rst + :recursive: + + crowsetta.typing +``` + + +### validation + +```{eval-rst} +.. autosummary:: + :toctree: generated + :template: module.rst + :recursive: + + crowsetta.validation +``` + +## Decorators + +### `crowsetta.register_format` + +```{eval-rst} +.. autosummary:: + :toctree: generated + + crowsetta.register_format +``` + +## Example data + +```{eval-rst} +.. autosummary:: + :toctree: generated + + crowsetta.example + crowsetta.examples.show +``` + +(api-formats)= + +# Formats + +This section documents the API of the :mod:`crowsetta.formats` module. +It is generated automatically. +If you are a crowsetta user looking for +more detail about the built-in formats, +please see: {ref}`formats-index`. + +```{eval-rst} +.. autosummary:: + :toctree: generated + :template: module.rst + :recursive: + + crowsetta.formats + crowsetta.formats.bbox + crowsetta.formats.seq +``` + +(api-interface)= + +# Interface + +The section documents the API of the :mod:`crowsetta.interface` module. + +```{eval-rst} +.. autosummary:: + :toctree: generated + :template: module.rst + :recursive: + + crowsetta.interface +``` + +## Base + +```{eval-rst} +.. autosummary:: + :toctree: generated + :template: class.rst + + crowsetta.interface.base.BaseFormat +``` + +## Sequence-Like + +```{eval-rst} +.. autosummary:: + :toctree: generated + :template: class.rst + + crowsetta.interface.seq.SeqLike +``` + +## Bounding Box-Like + +```{eval-rst} +.. autosummary:: + :toctree: generated + :template: class.rst + + crowsetta.interface.bbox.BBoxLike ``` diff --git a/doc/api/interface.md b/doc/api/interface.md deleted file mode 100644 index 26ce7126..00000000 --- a/doc/api/interface.md +++ /dev/null @@ -1,42 +0,0 @@ -(api-interface)= - -# Interface - -```{eval-rst} -.. autosummary:: - :toctree: generated - :template: module.rst - :recursive: - - crowsetta.interface -``` - -## Base - -```{eval-rst} -.. autosummary:: - :toctree: generated - :template: class.rst - - crowsetta.interface.base.BaseFormat -``` - -## Sequence-Like - -```{eval-rst} -.. autosummary:: - :toctree: generated - :template: class.rst - - crowsetta.interface.seq.SeqLike -``` - -## Bounding Box-Like - -```{eval-rst} -.. autosummary:: - :toctree: generated - :template: class.rst - - crowsetta.interface.bbox.BBoxLike -```