Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[docs][python] Add autosummary #1392

Merged
merged 7 commits into from
May 23, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 5 additions & 8 deletions apis/python/src/tiledbsoma/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
Python package is an implementation of SOMA using the
`TileDB Embedded <https://github.com/TileDB-Inc/TileDB>`_ engine.

Provides:
Provides
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Colons should be removed as these end up into toctree entities.

----------
1. The ability to store, query, and retrieve larger-than-core datasets,
resident in both cloud (object-store) and local (file) systems.
Expand All @@ -17,7 +17,7 @@
See the `SOMA GitHub repo <https://github.com/single-cell-data/SOMA>`_ for more
information on the SOMA project.

Using the documentation:
Using the documentation
-------------------------

Documentation is also available via the Python builtin ``help`` function. We
Expand All @@ -26,7 +26,7 @@
>>> import tiledbsoma
>>> help(tiledbsoma.DataFrame)

API maturity tags:
API maturity tags
------------------

Classes and functions are annotated with API maturity tags, for example:
Expand All @@ -49,7 +49,7 @@

If no tag is present, the state is ``experimental``.

Data types:
Data types
------------

The principal persistent types provided by SOMA are:
Expand All @@ -76,7 +76,7 @@
example, the schema of a :class:`DataFrame` is expressed as an
`Arrow Schema <https://arrow.apache.org/docs/python/generated/pyarrow.Schema.html>`_.

Error handling:
Error handling
---------------
Most errors will be signaled with a raised Exception. Of note:

Expand All @@ -87,9 +87,6 @@

Most errors will raise an appropriate Python error, e.g., ::class:`TypeError` or
:class:`ValueError`.

Classes and functions:
----------------------
"""

# ^^ the rest is autogen whether viewed from Python on-line help, Sphinx/readthedocs, etc. It's
Expand Down
3 changes: 3 additions & 0 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,12 @@
"sphinx.ext.doctest",
"sphinx.ext.intersphinx",
"sphinx.ext.napoleon",
"sphinx.ext.autosummary",
"nbsphinx",
]

autosummary_generate = True

# Mapping for linking between RTD subprojects.
if readthedocs:
intersphinx_mapping = {
Expand Down
21 changes: 7 additions & 14 deletions doc/source/python-api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,10 @@ Features:
* Enables out-of-core access to data aggregations much larger than single-host main memory
* Enables distributed computation over datasets

The tiledbsoma module
---------------------
.. automodule:: tiledbsoma
:members:

The tiledbsoma.io module
------------------------
.. automodule:: tiledbsoma.io
:members:

The tiledbsoma.logging module
-----------------------------
.. automodule:: tiledbsoma.logging
:members:

.. toctree::
:maxdepth: 2
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can be set to 1 if we don't want this toctree to include the subsections.


python-tiledbsoma
python-tiledbsoma-io
python-tiledbsoma-logging
22 changes: 22 additions & 0 deletions doc/source/python-tiledbsoma-io.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
The tiledbsoma.io module
=====================

.. currentmodule:: tiledbsoma.io

.. automodule:: tiledbsoma.io


Functions
-------

.. autosummary::
:toctree: _autosummary/
:nosignatures:

tiledbsoma.io.add_X_layer
tiledbsoma.io.add_matrix_to_collection
tiledbsoma.io.create_from_matrix
tiledbsoma.io.from_anndata
tiledbsoma.io.from_h5ad
tiledbsoma.io.to_anndata
tiledbsoma.io.to_h5ad
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's go "top down"

ebezzi marked this conversation as resolved.
Show resolved Hide resolved
19 changes: 19 additions & 0 deletions doc/source/python-tiledbsoma-logging.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
The tiledbsoma.logging module
=====================

.. currentmodule:: tiledbsoma.logging

.. automodule:: tiledbsoma.logging


Functions
-------

.. autosummary::
:toctree: _autosummary/
:nosignatures:

tiledbsoma.logging.debug
tiledbsoma.logging.info
tiledbsoma.logging.log_io
tiledbsoma.logging.warning
ebezzi marked this conversation as resolved.
Show resolved Hide resolved
52 changes: 52 additions & 0 deletions doc/source/python-tiledbsoma.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
The tiledbsoma module
=====================

.. currentmodule:: tiledbsoma

.. automodule:: tiledbsoma

Classes
-------

.. autosummary::
:toctree: _autosummary/
:nosignatures:

tiledbsoma.AxisColumnNames
tiledbsoma.AxisQuery
tiledbsoma.Collection
tiledbsoma.DataFrame
tiledbsoma.DenseNDArray
tiledbsoma.Experiment
tiledbsoma.ExperimentAxisQuery
tiledbsoma.Measurement
tiledbsoma.ResultOrder
tiledbsoma.SOMATileDBContext
tiledbsoma.SparseNDArray
ebezzi marked this conversation as resolved.
Show resolved Hide resolved

Exceptions
----------

.. autosummary::
:toctree: _autosummary/
:nosignatures:

tiledbsoma.DoesNotExistError
tiledbsoma.SOMAError

Functions
---------

.. autosummary::
:toctree: _autosummary/
:nosignatures:

tiledbsoma.get_implementation
tiledbsoma.get_implementation_version
tiledbsoma.get_storage_engine
tiledbsoma.open
tiledbsoma.show_package_versions
tiledbsoma.tiledbsoma_stats_disable
tiledbsoma.tiledbsoma_stats_dump
tiledbsoma.tiledbsoma_stats_enable
tiledbsoma.tiledbsoma_stats_reset
ebezzi marked this conversation as resolved.
Show resolved Hide resolved