diff --git a/doc/requirements.txt b/doc/requirements.txt new file mode 100644 index 0000000..6d37374 --- /dev/null +++ b/doc/requirements.txt @@ -0,0 +1,3 @@ +sphinx!=1.6.6,!=1.6.7,>=1.6.2 # BSD +sphinxcontrib-apidoc>=0.2.0 # BSD +openstackdocstheme>=1.18.1 # Apache-2.0 diff --git a/doc/source/conf.py b/doc/source/conf.py index 31fe2b1..a526df1 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -21,9 +21,8 @@ sys.path.insert(0, os.path.abspath('../..')) # 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', - 'openstackdocstheme' + 'openstackdocstheme', + 'sphinxcontrib.apidoc' ] # openstackdocstheme options @@ -31,6 +30,11 @@ repository_name = 'openstack/python-congressclient' bug_project = 'python-congressclient' bug_tag = '' +# sphinxcontrib.apidoc options +apidoc_module_dir = '../../congressclient' +apidoc_output_dir = 'reference/api' +apidoc_separate_modules = True + # Must set this variable to include year, month, day, hours, and minutes. html_last_updated_fmt = '%Y-%m-%d %H:%M' diff --git a/setup.cfg b/setup.cfg index 20a94c4..66d0272 100644 --- a/setup.cfg +++ b/setup.cfg @@ -57,20 +57,6 @@ openstack.congressclient.v1 = congress_driver_list = congressclient.osc.v1.driver:ListDrivers congress_version_list = congressclient.osc.v1.api_versions:ListAPIVersions -[pbr] -autodoc_index_modules = True -api_doc_dir = reference/api -warnerrors = True - -[build_sphinx] -source-dir = doc/source -build-dir = doc/build -all_files = 1 -warning-is-error = 1 - -[upload_sphinx] -upload-dir = doc/build/html - [compile_catalog] directory = congressclient/locale domain = python-congressclient diff --git a/test-requirements.txt b/test-requirements.txt index c28aab6..e271525 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -5,8 +5,6 @@ hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0 coverage!=4.4,>=4.0 # Apache-2.0 fixtures>=3.0.0 # Apache-2.0/BSD -sphinx!=1.6.6,!=1.6.7,>=1.6.2 # BSD -openstackdocstheme>=1.18.1 # Apache-2.0 testrepository>=0.0.18 # Apache-2.0/BSD testtools>=2.2.0 # MIT mock>=2.0.0 # BSD diff --git a/tox.ini b/tox.ini index 62db766..3771603 100644 --- a/tox.ini +++ b/tox.ini @@ -25,7 +25,8 @@ commands = {posargs} commands = python setup.py testr --coverage --testr-args='{posargs}' [testenv:docs] -commands = python setup.py build_sphinx +deps = -r{toxinidir}/doc/requirements.txt +commands = sphinx-build -W -b html doc/source doc/build/html [hacking] import_exceptions = congressclient.i18n