Skip to content

Commit

Permalink
Merge pull request #655 from UXARRAY/philipc2/accessor-summary
Browse files Browse the repository at this point in the history
Use `sphinx-autosummary-accessors` for rendering accessors in API
  • Loading branch information
rajeeja authored Jan 11, 2024
2 parents f57f5ca + 22a1314 commit 2dc53ec
Show file tree
Hide file tree
Showing 4 changed files with 90 additions and 102 deletions.
1 change: 1 addition & 0 deletions ci/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ dependencies:
- jupyter_client
- scikit-learn
- sphinx-book-theme
- sphinx-autosummary-accessors
- myst-nb
- sphinx-design
- nbsphinx
Expand Down
4 changes: 3 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import pathlib
import yaml
from sphinx.application import Sphinx
import sphinx_autosummary_accessors
from sphinx.util import logging
from textwrap import dedent, indent
import datetime
Expand Down Expand Up @@ -49,6 +50,7 @@ def __getattr__(cls, name):
"sphinx.ext.autosummary",
"sphinx.ext.intersphinx",
"sphinx.ext.mathjax",
"sphinx_autosummary_accessors",
"myst_nb",
"sphinx_design",
"nbsphinx",
Expand Down Expand Up @@ -98,7 +100,7 @@ def __getattr__(cls, name):
autosummary_generate = True

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

# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
Expand Down
54 changes: 27 additions & 27 deletions docs/internal_api/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,23 @@ features explicitly added to work on Unstructured Grids.
Class
-----
.. autosummary::
:toctree: _autosummary
:toctree: generated/

UxDataset


Attributes
----------
.. autosummary::
:toctree: _autosummary
:toctree: generated/

UxDataset._source_datasets
UxDataset._uxgrid

Methods
-------
.. autosummary::
:toctree: _autosummary
:toctree: generated/

UxDataset.__getitem__
UxDataset.__setitem__
Expand All @@ -55,21 +55,21 @@ features explicitly added to work on Unstructured Grids.
Class
-----
.. autosummary::
:toctree: _autosummary
:toctree: generated/

UxDataArray

Attributes
----------
.. autosummary::
:toctree: _autosummary
:toctree: generated/

UxDataArray._uxgrid

Methods
-------
.. autosummary::
:toctree: _autosummary
:toctree: generated/

UxDataArray._construct_direct
UxDataArray._copy
Expand All @@ -84,14 +84,14 @@ Grid
Class
-----
.. autosummary::
:toctree: _autosummary
:toctree: generated/

Grid

Operators
---------
.. autosummary::
:toctree: _autosummary
:toctree: generated/

Grid.__eq__
Grid.__ne__
Expand All @@ -103,7 +103,7 @@ Helpers
Connectivity
------------
.. autosummary::
:toctree: _autosummary
:toctree: generated/

grid.connectivity._face_nodes_to_sparse_matrix
grid.connectivity._replace_fill_values
Expand All @@ -121,7 +121,7 @@ Connectivity
Geometry
--------
.. autosummary::
:toctree: _autosummary
:toctree: generated/
grid.geometry._pad_closed_face_nodes
grid.geometry._build_polygon_shells
grid.geometry._grid_to_polygon_geodataframe
Expand All @@ -140,7 +140,7 @@ Geometry
Coordinates
-----------
.. autosummary::
:toctree: _autosummary
:toctree: generated/

grid.coordinates._get_lonlat_from_xyz
grid.coordinates._get_xyz_from_lonlat
Expand All @@ -154,7 +154,7 @@ Coordinates
Arcs
----
.. autosummary::
:toctree: _autosummary
:toctree: generated/

grid.arcs._angle_of_2_vectors
grid.arcs._angle_of_2_vectors
Expand All @@ -163,7 +163,7 @@ Arcs
Utils
-----
.. autosummary::
:toctree: _autosummary
:toctree: generated/

grid.utils._newton_raphson_solver_for_gca_constLat
grid.utils._inv_jacobian
Expand All @@ -174,7 +174,7 @@ Utils
Validation
----------
.. autosummary::
:toctree: _autosummary
:toctree: generated/

grid.validation._check_connectivity
grid.validation._check_duplicate_nodes
Expand All @@ -183,7 +183,7 @@ Validation
Accurate Computing Utils
------------------------
.. autosummary::
:toctree: _autosummary
:toctree: generated/

utils.computing._err_fmac
utils.computing._fast_two_mult
Expand All @@ -204,7 +204,7 @@ Remapping
=========

.. autosummary::
:toctree: _autosummary
:toctree: generated/

remap.nearest_neighbor._nearest_neighbor
remap.nearest_neighbor._nearest_neighbor_uxda
Expand All @@ -217,7 +217,7 @@ Grid Parsing and Encoding
UGRID
-----
.. autosummary::
:toctree: _autosummary
:toctree: generated/

io._ugrid._read_ugrid
io._ugrid._encode_ugrid
Expand All @@ -228,7 +228,7 @@ UGRID
MPAS
----
.. autosummary::
:toctree: _autosummary
:toctree: generated/

io._mpas._read_mpas
io._mpas._primal_to_ugrid
Expand All @@ -242,7 +242,7 @@ MPAS
Exodus
---------
.. autosummary::
:toctree: _autosummary
:toctree: generated/

io._exodus._read_exodus
io._exodus._encode_exodus
Expand All @@ -251,7 +251,7 @@ Exodus
SCRIP
-----
.. autosummary::
:toctree: _autosummary
:toctree: generated/

io._scrip._to_ugrid
io._scrip._read_scrip
Expand All @@ -261,36 +261,36 @@ SCRIP
Shapefile
---------
.. autosummary::
:toctree: _autosummary
:toctree: generated/

io._shapefile._read_shpfile

Vertices
--------
.. autosummary::
:toctree: _autosummary
:toctree: generated/

io._vertices._read_face_vertices

Utils
-----
.. autosummary::
:toctree: _autosummary
:toctree: generated/

io.utils._parse_grid_type

Core Utils
----------
.. autosummary::
:toctree: _autosummary
:toctree: generated/

core.utils._map_dims_to_ugrid


Visualization
-------------
.. autosummary::
:toctree: _autosummary
:toctree: generated/

plot.grid_plot._plot_coords_as_points
plot.dataarray_plot._plot_data_as_points
Expand All @@ -300,7 +300,7 @@ Visualization
Slicing
-------
.. autosummary::
:toctree: _autosummary
:toctree: generated/

grid.slice._slice_node_indices
grid._slice_edge_indices
Expand All @@ -311,7 +311,7 @@ Slicing
Subsetting
----------
.. autosummary::
:toctree: _autosummary
:toctree: generated/

subset.grid_accessor.GridSubsetAccessor
subset.dataarray_accessor.DataArraySubsetAccessor
Loading

0 comments on commit 2dc53ec

Please sign in to comment.