From 7a5f724f32a9b6e94201073597f06c819e50811f Mon Sep 17 00:00:00 2001 From: Jim Kitchen Date: Wed, 22 Mar 2023 14:19:11 -0500 Subject: [PATCH] Fix right panel visibility overlap issue Also split up API reference into separate pages for better navigation experience --- docs/_static/custom.css | 8 -- docs/api_reference/collections.rst | 23 +++++ docs/api_reference/exceptions.rst | 7 ++ docs/api_reference/index.rst | 133 ++--------------------------- docs/api_reference/io.rst | 55 ++++++++++++ docs/api_reference/operators.rst | 38 +++++++++ 6 files changed, 129 insertions(+), 135 deletions(-) create mode 100644 docs/api_reference/collections.rst create mode 100644 docs/api_reference/exceptions.rst create mode 100644 docs/api_reference/io.rst create mode 100644 docs/api_reference/operators.rst diff --git a/docs/_static/custom.css b/docs/_static/custom.css index 93600d107..1b14402cd 100644 --- a/docs/_static/custom.css +++ b/docs/_static/custom.css @@ -1,10 +1,6 @@ /* Main Page Stylings */ -.container-xl { - max-width: 1400px; -} - .intro-card { background-color: var(--pst-color-background); margin-bottom: 30px; @@ -80,7 +76,3 @@ button span.theme-switch:hover { .dataframe tbody th, .dataframe tbody td { padding: 10px; } - -.bd-sidebar-primary, .bd-sidebar-secondary { - position: sticky; -} diff --git a/docs/api_reference/collections.rst b/docs/api_reference/collections.rst new file mode 100644 index 000000000..83cabfd21 --- /dev/null +++ b/docs/api_reference/collections.rst @@ -0,0 +1,23 @@ +Collections +----------- + +Matrix +~~~~~~ + +.. autoclass:: graphblas.Matrix + :members: + :special-members: __getitem__, __setitem__, __delitem__, __contains__, __iter__ + +Vector +~~~~~~ + +.. autoclass:: graphblas.Vector + :members: + :special-members: __getitem__, __setitem__, __delitem__, __contains__, __iter__ + +Scalar +~~~~~~ + +.. autoclass:: graphblas.Scalar + :members: + :special-members: __eq__, __bool__ diff --git a/docs/api_reference/exceptions.rst b/docs/api_reference/exceptions.rst new file mode 100644 index 000000000..7968f854c --- /dev/null +++ b/docs/api_reference/exceptions.rst @@ -0,0 +1,7 @@ +Exceptions +---------- + +.. automodule:: graphblas.exceptions + :members: InvalidObject, InvalidIndex, DomainMismatch, DimensionMismatch, + OutputNotEmpty, OutOfMemory, IndexOutOfBound, Panic, EmptyObject, + NotImplementedException, UdfParseError diff --git a/docs/api_reference/index.rst b/docs/api_reference/index.rst index 2f829e29a..84e7d65eb 100644 --- a/docs/api_reference/index.rst +++ b/docs/api_reference/index.rst @@ -4,131 +4,10 @@ API Reference ============= -Collections ------------ +.. toctree:: + :maxdepth: 2 -Matrix -~~~~~~ - -.. autoclass:: graphblas.Matrix - :members: - :special-members: __getitem__, __setitem__, __delitem__, __contains__, __iter__ - -Vector -~~~~~~ - -.. autoclass:: graphblas.Vector - :members: - :special-members: __getitem__, __setitem__, __delitem__, __contains__, __iter__ - -Scalar -~~~~~~ - -.. autoclass:: graphblas.Scalar - :members: - :special-members: __eq__, __bool__ - -Operators ---------- - -UnaryOp -~~~~~~~ - -.. autoclass:: graphblas.core.operator.UnaryOp() - :members: - -BinaryOp -~~~~~~~~ - -.. autoclass:: graphblas.core.operator.BinaryOp() - :members: - -Monoid -~~~~~~ - -.. autoclass:: graphblas.core.operator.Monoid() - :members: - -Semiring -~~~~~~~~ - -.. autoclass:: graphblas.core.operator.Semiring() - :members: - -IndexUnaryOp -~~~~~~~~~~~~ - -.. autoclass:: graphblas.core.operator.IndexUnaryOp() - :members: - -SelectOp -~~~~~~~~ - -.. autoclass:: graphblas.core.operator.SelectOp() - :members: - - -Input/Output ------------- - -NetworkX -~~~~~~~~ - -These methods require `networkx `_ to be installed. - -.. autofunction:: graphblas.io.from_networkx - -.. autofunction:: graphblas.io.to_networkx - -Numpy -~~~~~ - -These methods require `scipy `_ to be installed, as some -of the scipy.sparse machinery is used during the conversion process. - -.. autofunction:: graphblas.io.from_numpy - -.. autofunction:: graphblas.io.to_numpy - -Scipy Sparse -~~~~~~~~~~~~ - -These methods require `scipy `_ to be installed. - -.. autofunction:: graphblas.io.from_scipy_sparse - -.. autofunction:: graphblas.io.to_scipy_sparse - -PyData Sparse -~~~~~~~~~~~~~ - -These methods require `sparse `_ to be installed. - -.. autofunction:: graphblas.io.from_pydata_sparse - -.. autofunction:: graphblas.io.to_pydata_sparse - -Matrix Market -~~~~~~~~~~~~~ - -Matrix Market is a `plain-text format `_ for storing graphs. - -These methods require `scipy `_ to be installed. - -.. autofunction:: graphblas.io.mmread - -.. autofunction:: graphblas.io.mmwrite - -Visualization -~~~~~~~~~~~~~ - -.. autofunction:: graphblas.io.draw - - -Exceptions ----------- - -.. automodule:: graphblas.exceptions - :members: InvalidObject, InvalidIndex, DomainMismatch, DimensionMismatch, - OutputNotEmpty, OutOfMemory, IndexOutOfBound, Panic, EmptyObject, - NotImplementedException, UdfParseError + collections + operators + io + exceptions diff --git a/docs/api_reference/io.rst b/docs/api_reference/io.rst new file mode 100644 index 000000000..1b42c0648 --- /dev/null +++ b/docs/api_reference/io.rst @@ -0,0 +1,55 @@ +Input/Output +------------ + +NetworkX +~~~~~~~~ + +These methods require `networkx `_ to be installed. + +.. autofunction:: graphblas.io.from_networkx + +.. autofunction:: graphblas.io.to_networkx + +Numpy +~~~~~ + +These methods require `scipy `_ to be installed, as some +of the scipy.sparse machinery is used during the conversion process. + +.. autofunction:: graphblas.io.from_numpy + +.. autofunction:: graphblas.io.to_numpy + +Scipy Sparse +~~~~~~~~~~~~ + +These methods require `scipy `_ to be installed. + +.. autofunction:: graphblas.io.from_scipy_sparse + +.. autofunction:: graphblas.io.to_scipy_sparse + +PyData Sparse +~~~~~~~~~~~~~ + +These methods require `sparse `_ to be installed. + +.. autofunction:: graphblas.io.from_pydata_sparse + +.. autofunction:: graphblas.io.to_pydata_sparse + +Matrix Market +~~~~~~~~~~~~~ + +Matrix Market is a `plain-text format `_ for storing graphs. + +These methods require `scipy `_ to be installed. + +.. autofunction:: graphblas.io.mmread + +.. autofunction:: graphblas.io.mmwrite + +Visualization +~~~~~~~~~~~~~ + +.. autofunction:: graphblas.io.draw diff --git a/docs/api_reference/operators.rst b/docs/api_reference/operators.rst new file mode 100644 index 000000000..8836bb638 --- /dev/null +++ b/docs/api_reference/operators.rst @@ -0,0 +1,38 @@ +Operators +--------- + +UnaryOp +~~~~~~~ + +.. autoclass:: graphblas.core.operator.UnaryOp() + :members: + +BinaryOp +~~~~~~~~ + +.. autoclass:: graphblas.core.operator.BinaryOp() + :members: + +Monoid +~~~~~~ + +.. autoclass:: graphblas.core.operator.Monoid() + :members: + +Semiring +~~~~~~~~ + +.. autoclass:: graphblas.core.operator.Semiring() + :members: + +IndexUnaryOp +~~~~~~~~~~~~ + +.. autoclass:: graphblas.core.operator.IndexUnaryOp() + :members: + +SelectOp +~~~~~~~~ + +.. autoclass:: graphblas.core.operator.SelectOp() + :members: