Skip to content

Commit

Permalink
configure the api documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
keewis committed Oct 22, 2024
1 parent 4b91288 commit c0c996a
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ instance/

# Sphinx documentation
docs/_build/
docs/generated/

# PyBuilder
.pybuilder/
Expand Down
40 changes: 40 additions & 0 deletions docs/api.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
.. _api:

#############
API reference
#############

Top-level functions
===================

.. currentmodule:: xdggs

.. autosummary::
:toctree: generated/

decode


.. currentmodule:: xarray

Parameters
==========
.. autosummary::
:toctree: generated/
:template: autosummary/accessor_attribute.rst

DataArray.dggs.grid_info
Dataset.dggs.grid_info


Data inference
==============

.. autosummary::
:toctree: generated/
:template: autosummary/accessor_method.rst

DataArray.dggs.cell_centers
DataArray.dggs.cell_boundaries
Dataset.dggs.cell_centers
Dataset.dggs.cell_boundaries
10 changes: 9 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# -- Project information -----------------------------------------------------
import datetime as dt

import sphinx_autosummary_accessors

import xdggs # noqa: F401

project = "xdggs"
author = f"{project} developers"
initial_year = "2023"
Expand All @@ -18,9 +22,13 @@
extensions = [
"sphinx.ext.extlinks",
"sphinx.ext.intersphinx",
"sphinx.ext.autodoc",
"sphinx.ext.autosummary",
"sphinx.ext.napoleon",
"IPython.sphinxext.ipython_directive",
"IPython.sphinxext.ipython_console_highlighting",
"myst_parser",
"sphinx_autosummary_accessors",
]

extlinks = {
Expand All @@ -29,7 +37,7 @@
}

# Add any paths that contain templates here, relative to this directory.
templates_path = ["_templates"]
templates_path = ["_templates", sphinx_autosummary_accessors.templates_path]

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
Expand Down
4 changes: 4 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
# welcome to the documentation of `xdggs`

```{toctree}
api.rst
```

0 comments on commit c0c996a

Please sign in to comment.