Skip to content

Commit da4bca8

Browse files
committed
Modify sphinx documentation configuration
This patch makes some changes to sphinx configuration: - Generate apidoc in docs/api - Generate individual files for API - Add inherited members in documentation - Include __init__ methods in the documenattion - Groupd members by type instead of alphabetically - Exclude base.py and common.py from API documentation - Move API documentation to TOC and out of Indices and tables
1 parent 7c1f766 commit da4bca8

18 files changed

+133
-137
lines changed

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,9 @@ coverage-html:
6767
$(BROWSER) htmlcov/index.html
6868

6969
docs:
70-
rm -f docs/gcs_client.rst
71-
rm -f docs/modules.rst
72-
sphinx-apidoc -o docs/ gcs_client
70+
rm -f docs/api/*.rst
71+
# Create individual files, and exclude common and base modules.
72+
sphinx-apidoc -e -M -o docs/api gcs_client gcs_client/base.py gcs_client/common.py
7373
$(MAKE) -C docs clean
7474
$(MAKE) -C docs html
7575
$(BROWSER) docs/_build/html/index.html

docs/api/gcs_client.bucket.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
gcs_client.bucket module
2+
========================
3+
4+
.. automodule:: gcs_client.bucket
5+
:members:
6+
:undoc-members:
7+
:show-inheritance:

docs/api/gcs_client.constants.acl.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
gcs_client.constants.acl module
2+
===============================
3+
4+
.. automodule:: gcs_client.constants.acl
5+
:members:
6+
:undoc-members:
7+
:show-inheritance:
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
gcs_client.constants.projection module
2+
======================================
3+
4+
.. automodule:: gcs_client.constants.projection
5+
:members:
6+
:undoc-members:
7+
:show-inheritance:

docs/api/gcs_client.constants.rst

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
gcs_client.constants package
2+
============================
3+
4+
.. automodule:: gcs_client.constants
5+
:members:
6+
:undoc-members:
7+
:show-inheritance:
8+
9+
Submodules
10+
----------
11+
12+
.. toctree::
13+
14+
gcs_client.constants.acl
15+
gcs_client.constants.projection
16+
gcs_client.constants.scope
17+
gcs_client.constants.storage_class
18+
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
gcs_client.constants.scope module
2+
=================================
3+
4+
.. automodule:: gcs_client.constants.scope
5+
:members:
6+
:undoc-members:
7+
:show-inheritance:
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
gcs_client.constants.storage_class module
2+
=========================================
3+
4+
.. automodule:: gcs_client.constants.storage_class
5+
:members:
6+
:undoc-members:
7+
:show-inheritance:

docs/api/gcs_client.credentials.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
gcs_client.credentials module
2+
=============================
3+
4+
.. automodule:: gcs_client.credentials
5+
:members:
6+
:undoc-members:
7+
:show-inheritance:

docs/api/gcs_client.errors.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
gcs_client.errors module
2+
========================
3+
4+
.. automodule:: gcs_client.errors
5+
:members:
6+
:undoc-members:
7+
:show-inheritance:

docs/api/gcs_client.gcs_object.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
gcs_client.gcs_object module
2+
============================
3+
4+
.. automodule:: gcs_client.gcs_object
5+
:members:
6+
:undoc-members:
7+
:show-inheritance:

0 commit comments

Comments
 (0)