Skip to content

Commit

Permalink
doc: describe tarantool submodules API
Browse files Browse the repository at this point in the history
Add or update docstings for submodule files contents. Submodules are not
meant to be used directly in code, but their descriptions will be
imported automatically to core module API description. It also may
help developers of this module.

Every submodule that could be of use is indexed in documentation now.

Set sphinx autodoc module to describe members and inherited members by
default.

Dataclass with factories display is not parsed correctly, see [1] issue.

1. sphinx-doc/sphinx#10893

Part of #67
  • Loading branch information
DifferentialOrange committed Oct 10, 2022
1 parent 33d18be commit f7bb997
Show file tree
Hide file tree
Showing 41 changed files with 3,873 additions and 1,001 deletions.
10 changes: 0 additions & 10 deletions doc/api/class-connection.rst

This file was deleted.

8 changes: 0 additions & 8 deletions doc/api/class-mesh-connection.rst

This file was deleted.

9 changes: 0 additions & 9 deletions doc/api/class-response.rst

This file was deleted.

9 changes: 0 additions & 9 deletions doc/api/class-space.rst

This file was deleted.

4 changes: 4 additions & 0 deletions doc/api/submodule-connection-pool.rst
@@ -0,0 +1,4 @@
module :py:mod:`tarantool.connection_pool`
==========================================

.. automodule:: tarantool.connection_pool
4 changes: 4 additions & 0 deletions doc/api/submodule-connection.rst
@@ -0,0 +1,4 @@
module :py:mod:`tarantool.connection`
=====================================

.. automodule:: tarantool.connection
4 changes: 4 additions & 0 deletions doc/api/submodule-dbapi.rst
@@ -0,0 +1,4 @@
module :py:mod:`tarantool.dbapi`
================================

.. automodule:: tarantool.dbapi
4 changes: 4 additions & 0 deletions doc/api/submodule-error.rst
@@ -0,0 +1,4 @@
module :py:mod:`tarantool.error`
================================

.. automodule:: tarantool.error
4 changes: 4 additions & 0 deletions doc/api/submodule-mesh-connection.rst
@@ -0,0 +1,4 @@
module :py:mod:`tarantool.mesh_connection`
==========================================

.. automodule:: tarantool.mesh_connection
19 changes: 19 additions & 0 deletions doc/api/submodule-msgpack-ext-types.rst
@@ -0,0 +1,19 @@
module :py:mod:`tarantool.msgpack_ext.types`
============================================

.. currentmodule:: tarantool.msgpack_ext.types

module :py:mod:`tarantool.msgpack_ext.types.datetime`
-----------------------------------------------------

.. automodule:: tarantool.msgpack_ext.types.datetime
:special-members: __add__, __sub__, __eq__


.. currentmodule:: tarantool.msgpack_ext.types

module :py:mod:`tarantool.msgpack_ext.types.interval`
-----------------------------------------------------

.. automodule:: tarantool.msgpack_ext.types.interval
:special-members: __add__, __sub__, __eq__
49 changes: 49 additions & 0 deletions doc/api/submodule-msgpack-ext.rst
@@ -0,0 +1,49 @@
module :py:mod:`tarantool.msgpack_ext`
======================================

.. currentmodule:: tarantool.msgpack_ext

module :py:mod:`tarantool.msgpack_ext.datetime`
-----------------------------------------------

.. automodule:: tarantool.msgpack_ext.datetime


.. currentmodule:: tarantool.msgpack_ext

module :py:mod:`tarantool.msgpack_ext.decimal`
----------------------------------------------

.. automodule:: tarantool.msgpack_ext.decimal


.. currentmodule:: tarantool.msgpack_ext

module :py:mod:`tarantool.msgpack_ext.interval`
-----------------------------------------------

.. automodule:: tarantool.msgpack_ext.interval


.. currentmodule:: tarantool.msgpack_ext

module :py:mod:`tarantool.msgpack_ext.packer`
---------------------------------------------

.. automodule:: tarantool.msgpack_ext.packer


.. currentmodule:: tarantool.msgpack_ext

module :py:mod:`tarantool.msgpack_ext.unpacker`
-----------------------------------------------

.. automodule:: tarantool.msgpack_ext.unpacker


.. currentmodule:: tarantool.msgpack_ext

module :py:mod:`tarantool.msgpack_ext.uuid`
-------------------------------------------

.. automodule:: tarantool.msgpack_ext.uuid
4 changes: 4 additions & 0 deletions doc/api/submodule-request.rst
@@ -0,0 +1,4 @@
module :py:mod:`tarantool.request`
==================================

.. automodule:: tarantool.request
4 changes: 4 additions & 0 deletions doc/api/submodule-response.rst
@@ -0,0 +1,4 @@
module :py:mod:`tarantool.response`
===================================

.. automodule:: tarantool.response
4 changes: 4 additions & 0 deletions doc/api/submodule-schema.rst
@@ -0,0 +1,4 @@
module :py:mod:`tarantool.schema`
=================================

.. automodule:: tarantool.schema
4 changes: 4 additions & 0 deletions doc/api/submodule-space.rst
@@ -0,0 +1,4 @@
module :py:mod:`tarantool.space`
================================

.. automodule:: tarantool.space
4 changes: 4 additions & 0 deletions doc/api/submodule-utils.rst
@@ -0,0 +1,4 @@
module :py:mod:`tarantool.utils`
================================

.. automodule:: tarantool.utils
15 changes: 13 additions & 2 deletions doc/conf.py
Expand Up @@ -29,7 +29,13 @@

# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.intersphinx', 'sphinx.ext.todo', 'sphinx.ext.coverage', 'sphinx.ext.ifconfig']
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.intersphinx', 'sphinx.ext.todo',
'sphinx.ext.coverage', 'sphinx.ext.ifconfig', 'sphinx_paramlinks',]

autodoc_default_options = {
'members': True,
'inherited-members': True,
}

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
Expand Down Expand Up @@ -249,7 +255,12 @@


# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {'python':('http://docs.python.org/', None)}
intersphinx_mapping = {
'python': ('http://docs.python.org/', None),
'msgpack': ('https://msgpack-python.readthedocs.io/en/latest/', None),
'pandas': ('https://pandas.pydata.org/docs/', None),
'pytz': ('https://pytz.sourceforge.net/', None),
}


autoclass_content = "both"
16 changes: 12 additions & 4 deletions doc/index.rst
Expand Up @@ -39,10 +39,18 @@ API Reference
:maxdepth: 2

api/module-tarantool.rst
api/class-connection.rst
api/class-mesh-connection.rst
api/class-space.rst
api/class-response.rst
api/submodule-connection.rst
api/submodule-connection-pool.rst
api/submodule-dbapi.rst
api/submodule-error.rst
api/submodule-mesh-connection.rst
api/submodule-msgpack-ext.rst
api/submodule-msgpack-ext-types.rst
api/submodule-request.rst
api/submodule-response.rst
api/submodule-schema.rst
api/submodule-space.rst
api/submodule-utils.rst



Expand Down
1 change: 1 addition & 0 deletions requirements-doc.txt
@@ -1 +1,2 @@
sphinx==5.2.1
sphinx-paramlinks==0.5.4

0 comments on commit f7bb997

Please sign in to comment.