From 122e7d19b7e90e69fdda71e7094cd947bb6b6eb3 Mon Sep 17 00:00:00 2001 From: Emanuele Bezzi Date: Thu, 18 May 2023 10:45:54 -0400 Subject: [PATCH 1/7] autosummary --- apis/python/src/tiledbsoma/__init__.py | 13 ++++------ doc/source/conf.py | 3 +++ doc/source/python-api.rst | 20 +++++---------- doc/source/python-tiledbsoma.rst | 35 ++++++++++++++++++++++++++ 4 files changed, 49 insertions(+), 22 deletions(-) create mode 100644 doc/source/python-tiledbsoma.rst diff --git a/apis/python/src/tiledbsoma/__init__.py b/apis/python/src/tiledbsoma/__init__.py index 5c4ea7b031..4489fd9d73 100644 --- a/apis/python/src/tiledbsoma/__init__.py +++ b/apis/python/src/tiledbsoma/__init__.py @@ -6,7 +6,7 @@ Python package is an implementation of SOMA using the `TileDB Embedded `_ engine. -Provides: +Provides ---------- 1. The ability to store, query, and retrieve larger-than-core datasets, resident in both cloud (object-store) and local (file) systems. @@ -17,7 +17,7 @@ See the `SOMA GitHub repo `_ for more information on the SOMA project. -Using the documentation: +Using the documentation ------------------------- Documentation is also available via the Python builtin ``help`` function. We @@ -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: @@ -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: @@ -76,7 +76,7 @@ example, the schema of a :class:`DataFrame` is expressed as an `Arrow Schema `_. -Error handling: +Error handling --------------- Most errors will be signaled with a raised Exception. Of note: @@ -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 diff --git a/doc/source/conf.py b/doc/source/conf.py index 5088cf6a4a..816da9cdd0 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -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 = { diff --git a/doc/source/python-api.rst b/doc/source/python-api.rst index 514c7d31e8..d60e1bcdfa 100644 --- a/doc/source/python-api.rst +++ b/doc/source/python-api.rst @@ -18,17 +18,9 @@ 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 + + python-tiledbsoma + python-tiledbsomaio \ No newline at end of file diff --git a/doc/source/python-tiledbsoma.rst b/doc/source/python-tiledbsoma.rst new file mode 100644 index 0000000000..e7f5c995ad --- /dev/null +++ b/doc/source/python-tiledbsoma.rst @@ -0,0 +1,35 @@ +The tiledbsoma module +===================== + +.. currentmodule:: tiledbsoma + +.. automodule:: tiledbsoma + +Testing +------- + +.. autosummary:: + :toctree: _autosummary/ + + tiledbsoma.AxisColumnNames + tiledbsoma.AxisQuery + tiledbsoma.Collection + tiledbsoma.DataFrame + tiledbsoma.DenseNDArray + tiledbsoma.DoesNotExistError + tiledbsoma.Experiment + tiledbsoma.ExperimentAxisQuery + tiledbsoma.Measurement + tiledbsoma.ResultOrder + tiledbsoma.SOMAError + tiledbsoma.SOMATileDBContext + tiledbsoma.SparseNDArray + 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 \ No newline at end of file From 89e833b212469afdc1a305dc4a3a74df5aedc3f3 Mon Sep 17 00:00:00 2001 From: Emanuele Bezzi Date: Thu, 18 May 2023 11:45:13 -0400 Subject: [PATCH 2/7] more files --- doc/source/python-api.rst | 3 ++- doc/source/python-tiledbsoma-io.rst | 22 ++++++++++++++++++++++ doc/source/python-tiledbsoma-logging.rst | 19 +++++++++++++++++++ doc/source/python-tiledbsoma.rst | 23 ++++++++++++++++++++--- 4 files changed, 63 insertions(+), 4 deletions(-) create mode 100644 doc/source/python-tiledbsoma-io.rst create mode 100644 doc/source/python-tiledbsoma-logging.rst diff --git a/doc/source/python-api.rst b/doc/source/python-api.rst index d60e1bcdfa..3a480a0feb 100644 --- a/doc/source/python-api.rst +++ b/doc/source/python-api.rst @@ -23,4 +23,5 @@ Features: :maxdepth: 2 python-tiledbsoma - python-tiledbsomaio \ No newline at end of file + python-tiledbsoma-io + python-tiledbsoma-logging \ No newline at end of file diff --git a/doc/source/python-tiledbsoma-io.rst b/doc/source/python-tiledbsoma-io.rst new file mode 100644 index 0000000000..0913ef2cfe --- /dev/null +++ b/doc/source/python-tiledbsoma-io.rst @@ -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 \ No newline at end of file diff --git a/doc/source/python-tiledbsoma-logging.rst b/doc/source/python-tiledbsoma-logging.rst new file mode 100644 index 0000000000..59fa37099b --- /dev/null +++ b/doc/source/python-tiledbsoma-logging.rst @@ -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 \ No newline at end of file diff --git a/doc/source/python-tiledbsoma.rst b/doc/source/python-tiledbsoma.rst index e7f5c995ad..5efd56185c 100644 --- a/doc/source/python-tiledbsoma.rst +++ b/doc/source/python-tiledbsoma.rst @@ -5,25 +5,42 @@ The tiledbsoma module .. automodule:: tiledbsoma -Testing +Classes ------- .. autosummary:: :toctree: _autosummary/ + :nosignatures: tiledbsoma.AxisColumnNames tiledbsoma.AxisQuery tiledbsoma.Collection tiledbsoma.DataFrame tiledbsoma.DenseNDArray - tiledbsoma.DoesNotExistError tiledbsoma.Experiment tiledbsoma.ExperimentAxisQuery tiledbsoma.Measurement tiledbsoma.ResultOrder - tiledbsoma.SOMAError tiledbsoma.SOMATileDBContext tiledbsoma.SparseNDArray + +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 From b71d7f6a37de371f29338369c65a239bdfd3989c Mon Sep 17 00:00:00 2001 From: Emanuele Bezzi Date: Thu, 18 May 2023 13:36:42 -0400 Subject: [PATCH 3/7] Update doc/source/python-tiledbsoma-io.rst Co-authored-by: John Kerl --- doc/source/python-tiledbsoma-io.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/source/python-tiledbsoma-io.rst b/doc/source/python-tiledbsoma-io.rst index 0913ef2cfe..212ac1749f 100644 --- a/doc/source/python-tiledbsoma-io.rst +++ b/doc/source/python-tiledbsoma-io.rst @@ -13,10 +13,10 @@ Functions :toctree: _autosummary/ :nosignatures: + tiledbsoma.io.from_h5ad + tiledbsoma.io.from_anndata 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 \ No newline at end of file + tiledbsoma.io.to_h5ad + tiledbsoma.io.to_anndata \ No newline at end of file From 839a34b89dcb23921877566d568d320acf79905b Mon Sep 17 00:00:00 2001 From: Emanuele Bezzi Date: Thu, 18 May 2023 13:37:10 -0400 Subject: [PATCH 4/7] Update doc/source/python-tiledbsoma-logging.rst Co-authored-by: John Kerl --- doc/source/python-tiledbsoma-logging.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/source/python-tiledbsoma-logging.rst b/doc/source/python-tiledbsoma-logging.rst index 59fa37099b..afc9c42d5f 100644 --- a/doc/source/python-tiledbsoma-logging.rst +++ b/doc/source/python-tiledbsoma-logging.rst @@ -13,7 +13,7 @@ Functions :toctree: _autosummary/ :nosignatures: - tiledbsoma.logging.debug tiledbsoma.logging.info - tiledbsoma.logging.log_io - tiledbsoma.logging.warning \ No newline at end of file + tiledbsoma.logging.debug + tiledbsoma.logging.warning + tiledbsoma.logging.log_io \ No newline at end of file From c28d9c9a4ef91c1656dc6468f1efc06cabd82159 Mon Sep 17 00:00:00 2001 From: Emanuele Bezzi Date: Thu, 18 May 2023 13:37:24 -0400 Subject: [PATCH 5/7] Update doc/source/python-tiledbsoma.rst Co-authored-by: John Kerl --- doc/source/python-tiledbsoma.rst | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/doc/source/python-tiledbsoma.rst b/doc/source/python-tiledbsoma.rst index 5efd56185c..3bfa3a0ebb 100644 --- a/doc/source/python-tiledbsoma.rst +++ b/doc/source/python-tiledbsoma.rst @@ -12,17 +12,21 @@ Classes :toctree: _autosummary/ :nosignatures: - tiledbsoma.AxisColumnNames - tiledbsoma.AxisQuery tiledbsoma.Collection + tiledbsoma.Experiment + tiledbsoma.Measurement + tiledbsoma.DataFrame + tiledbsoma.SparseNDArray tiledbsoma.DenseNDArray - tiledbsoma.Experiment + + tiledbsoma.ResultOrder + + tiledbsoma.AxisColumnNames + tiledbsoma.AxisQuery tiledbsoma.ExperimentAxisQuery - tiledbsoma.Measurement - tiledbsoma.ResultOrder + tiledbsoma.SOMATileDBContext - tiledbsoma.SparseNDArray Exceptions ---------- From d9b975fd39c439a45554adc208302b5b29a5b477 Mon Sep 17 00:00:00 2001 From: Emanuele Bezzi Date: Thu, 18 May 2023 13:37:31 -0400 Subject: [PATCH 6/7] Update doc/source/python-tiledbsoma.rst Co-authored-by: John Kerl --- doc/source/python-tiledbsoma.rst | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/doc/source/python-tiledbsoma.rst b/doc/source/python-tiledbsoma.rst index 3bfa3a0ebb..242ecef3e1 100644 --- a/doc/source/python-tiledbsoma.rst +++ b/doc/source/python-tiledbsoma.rst @@ -45,11 +45,14 @@ Functions :toctree: _autosummary/ :nosignatures: + tiledbsoma.open + + tiledbsoma.show_package_versions + 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 From 3cc91a97d39dd7a30286d2899ea16a896ea8d6e1 Mon Sep 17 00:00:00 2001 From: Emanuele Bezzi Date: Thu, 18 May 2023 13:38:36 -0400 Subject: [PATCH 7/7] remove private function --- doc/source/python-tiledbsoma-logging.rst | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/doc/source/python-tiledbsoma-logging.rst b/doc/source/python-tiledbsoma-logging.rst index afc9c42d5f..a00cb948fc 100644 --- a/doc/source/python-tiledbsoma-logging.rst +++ b/doc/source/python-tiledbsoma-logging.rst @@ -15,5 +15,4 @@ Functions tiledbsoma.logging.info tiledbsoma.logging.debug - tiledbsoma.logging.warning - tiledbsoma.logging.log_io \ No newline at end of file + tiledbsoma.logging.warning \ No newline at end of file