Skip to content

Commit

Permalink
Merge branch 'pydata_documentation_theme' into dev_documentation_revamp
Browse files Browse the repository at this point in the history
  • Loading branch information
freemansw1 committed Dec 19, 2024
2 parents 6b8e537 + 8e01602 commit 5568e7d
Show file tree
Hide file tree
Showing 7 changed files with 72 additions and 193 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ examples/climate-processes-tobac_example_data-b3e69ee
.ipynb_checkpoints
.DS_Store
*.egg-info
doc/api/generated/*

29 changes: 29 additions & 0 deletions doc/_templates/autosummary/module.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{{ fullname | escape | underline }}

.. rubric:: Description

.. automodule:: {{ fullname }}

.. currentmodule:: {{ fullname }}

{% if classes %}
.. rubric:: Classes

.. autosummary::
:toctree: .
{% for class in classes %}
{{ class }}
{% endfor %}

{% endif %}

{% if functions %}
.. rubric:: Functions

.. autosummary::
:toctree: .
{% for function in functions %}
{{ function }}
{% endfor %}

{% endif %}
25 changes: 25 additions & 0 deletions doc/api/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
.. _API-Reference:

API Reference
=============

:Release: |version|
:Date: |today|

This guide provides documentation for all modules, function, methods,
and classes within *tobac* for those in the public API.

Documentation is broken down by directory and module.

.. currentmodule:: tobac

.. autosummary::
:toctree: generated/

feature_detection
tracking
segmentation
merge_split
utils.bulk_statistics
utils.general
plotting
15 changes: 15 additions & 0 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
# What Sphinx extensions do we need
extensions = [
"sphinx.ext.autodoc",
"sphinx.ext.autosummary",
"sphinx.ext.doctest",
"sphinx.ext.todo",
"sphinx.ext.coverage",
Expand All @@ -34,6 +35,20 @@
source_suffix = {".rst": "restructuredtext", ".md": "restructuredtext"}
myst_enable_extensions = ["colon_fence"]

html_context = {
"api_dir": "api/generated",
}


# Generate the api documentation when building
autoclass_content = "both"

autosummary_generate = True
autosummary_imported_members = True
autodoc_typehints = "description"

templates_path = ["_templates"]


html_theme_options = {
"logo": {
Expand Down
4 changes: 2 additions & 2 deletions doc/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
html_theme.sidebar_secondary.remove:
sd_hide_title: true
---

<!-- sphinx-autobuild ./doc/ /Users/seanfreeman/Documents/Research/tobac_dev/tobac_docs_refresh/dev_docs/ -->
<!-- CSS overrides on the homepage only -->
<style>
.bd-main .bd-content .bd-article-container {
Expand Down Expand Up @@ -243,5 +243,5 @@ Getting Started<getting_started/index>
Example Gallery<examples/index>
User Guide<userguide/index>
Developer Guide<developer_guide/index>
API <tobac>
API <api/index>
:::
43 changes: 0 additions & 43 deletions doc/index_old.rst

This file was deleted.

148 changes: 0 additions & 148 deletions doc/tobac.rst

This file was deleted.

0 comments on commit 5568e7d

Please sign in to comment.