Skip to content

Commit

Permalink
Include classes in table of contents
Browse files Browse the repository at this point in the history
  • Loading branch information
maxrjones committed Jan 5, 2023
1 parent 1d6fdef commit 585a701
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 22 deletions.
20 changes: 11 additions & 9 deletions doc/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,21 @@ Dataset.batch and DataArray.batch
Core
====

.. autoclass:: xbatcher.BatchGenerator
:members:
.. currentmodule:: xbatcher

.. autoclass:: xbatcher.BatchSchema
:members:
.. autosummary::
:toctree: generated/

BatchGenerator
BatchSchema

Dataloaders
===========
.. autoclass:: xbatcher.loaders.torch.MapDataset
:members:

.. autoclass:: xbatcher.loaders.torch.IterableDataset
:members:
.. autosummary::
:toctree: generated/

.. autoclass:: xbatcher.loaders.keras.CustomTFDataset
loaders.torch.MapDataset
loaders.torch.IterableDataset
loaders.keras.CustomTFDataset
:members:
14 changes: 2 additions & 12 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

# type: ignore

import datetime
import sys

import sphinx_autosummary_accessors
Expand Down Expand Up @@ -57,17 +58,6 @@
nbsphinx_execute = "auto"


# http://stackoverflow.com/questions/5599254/how-to-use-sphinxs-autodoc-to-document-a-classs-init-self-method
def skip(app, what, name, obj, skip, options):
if name == "__init__":
return False
return skip


def setup(app):
app.connect("autodoc-skip-member", skip)


autodoc_mock_imports = ["torch", "tensorflow"]

# link to github issues
Expand Down Expand Up @@ -95,7 +85,7 @@ def setup(app):

# General information about the project.
project = "xbatcher"
copyright = "2021, xbatcher developers"
copyright = f"2016-{datetime.datetime.now().year}, xbatcher developers"

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
Expand Down
2 changes: 1 addition & 1 deletion doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ or via a built-in `Xarray accessor <http://xarray.pydata.org/en/stable/internals
:maxdepth: 2
:caption: Contents:

roadmap
api
demo
roadmap
contributing

0 comments on commit 585a701

Please sign in to comment.