From b0a65514c0f05daa4e31547a032e86507df3e199 Mon Sep 17 00:00:00 2001 From: Brian Curtin Date: Mon, 24 Nov 2014 13:49:21 -0600 Subject: [PATCH] Prepare for documentation of Resources Add a section for where Resource classes will show up in the docs and enter two skeleton pages for how this will look. Later changes will cover the actual member-level documentation of the Resource classes for each service, along with their addition to the TOC. This additionally sets autodoc_member_order globally to "bysource", meaning it'll order the rendered member documentation in the order it was written. The default of alphabetical order by what shows up in __dir__ is not as helpful or as readable as how we've organized the code. Change-Id: Ifcd7cd81ba55ecb429c50680a926d4f8a44ca9a3 --- doc/source/conf.py | 2 ++ doc/source/index.rst | 13 +++++++++++-- doc/source/resources/object_store/v1/container.rst | 10 ++++++++++ doc/source/resources/object_store/v1/obj.rst | 10 ++++++++++ 4 files changed, 33 insertions(+), 2 deletions(-) create mode 100644 doc/source/resources/object_store/v1/container.rst create mode 100644 doc/source/resources/object_store/v1/obj.rst diff --git a/doc/source/conf.py b/doc/source/conf.py index 159bd1c0..892b04f2 100755 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -50,6 +50,8 @@ add_module_names = True # The name of the Pygments (syntax highlighting) style to use. pygments_style = 'sphinx' +autodoc_member_order = "bysource" + # -- Options for HTML output -------------------------------------------------- # The theme to use for HTML and HTML Help pages. Major themes that come with diff --git a/doc/source/index.rst b/doc/source/index.rst index 34fdbfc4..9ec7fe2b 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -11,8 +11,17 @@ Welcome! contributing glossary -Classes -------- +Resource Level Classes +---------------------- + +.. toctree:: + :maxdepth: 1 + + resources/object_store/v1/container + resources/object_store/v1/obj + +Low-Level Classes +----------------- .. toctree:: :maxdepth: 1 diff --git a/doc/source/resources/object_store/v1/container.rst b/doc/source/resources/object_store/v1/container.rst new file mode 100644 index 00000000..bd0e383b --- /dev/null +++ b/doc/source/resources/object_store/v1/container.rst @@ -0,0 +1,10 @@ +openstack.object_store.v1.container +=================================== + +.. automodule:: openstack.object_store.v1.container + +The Container Class +------------------- + +.. autoclass:: openstack.object_store.v1.container.Container + :members: diff --git a/doc/source/resources/object_store/v1/obj.rst b/doc/source/resources/object_store/v1/obj.rst new file mode 100644 index 00000000..ba277f5f --- /dev/null +++ b/doc/source/resources/object_store/v1/obj.rst @@ -0,0 +1,10 @@ +openstack.object_store.v1.obj +============================= + +.. automodule:: openstack.object_store.v1.obj + +The Object Class +---------------- + +.. autoclass:: openstack.object_store.v1.obj.Object + :members: