From 30809627b6106609f83a4fbc8977bbe5786d0884 Mon Sep 17 00:00:00 2001 From: Anne Gentle Date: Thu, 1 Oct 2015 17:27:50 -0500 Subject: [PATCH] Rearranges to create new Compute API Guide Uses openstackdocstheme to match other content Has a dependent change in project-config also so that file will build to developer.openstack.org/compute at https://review.openstack.org/#/c/231000/ Change-Id: Ic060a1e79e4b2f8695cb788ff4df018e0cfd3286 --- .gitignore | 1 + doc/README.rst | 11 ++++++++++- doc/source/index.rst | 9 +++------ setup.cfg | 5 +++++ test-requirements.txt | 1 + tox.ini | 9 ++++++++- 6 files changed, 28 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index 3b16a68a1..192f724e1 100644 --- a/.gitignore +++ b/.gitignore @@ -29,6 +29,7 @@ covhtml dist/* doc/source/api/* doc/build/* +api-guide/build/* etc/nova/nova.conf.sample instances keeper diff --git a/doc/README.rst b/doc/README.rst index af4d7132d..306503658 100644 --- a/doc/README.rst +++ b/doc/README.rst @@ -1,5 +1,14 @@ OpenStack Nova Documentation README =================================== -See the "Building the Documentation" section of +Both contributor developer documentation and +REST API documentation are sourced here. + +Contributor developer docs are built to: +http://docs.openstack.org/developer/nova/ + +API guide docs are built to: +http://developer.openstack.org/api-guide/compute/ + +For more details, see the "Building the Documentation" section of doc/source/development.environment.rst. diff --git a/doc/source/index.rst b/doc/source/index.rst index f71cc5127..e283572bd 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -58,17 +58,14 @@ Changes to the Compute API post v2.1 are made using microversions. You can see a api_microversion_history -We also have a local copy of the v2 docs: - -.. toctree:: - :maxdepth: 1 - - v2/index +We also publish end-user API docs as an API Guide. +* `Compute API Guide`_ .. _`v2.1 (CURRENT)`: http://developer.openstack.org/api-ref-compute-v2.1.html .. _`v2 (SUPPORTED)`: http://developer.openstack.org/api-ref-compute-v2.html .. _`v2 extensions (SUPPORTED)`: http://developer.openstack.org/api-ref-compute-v2-ext.html +.. _`Compute API Guide`: http://developer.openstack.org/api-guide/compute/ There was a session on the v2.1 API at the Liberty summit which you can watch `here `_. diff --git a/setup.cfg b/setup.cfg index fadec759a..4779b5139 100644 --- a/setup.cfg +++ b/setup.cfg @@ -196,6 +196,11 @@ all_files = 1 build-dir = doc/build source-dir = doc/source +[build_apiguide] +all_files = 1 +build-dir = api-guide/build +source-dir = api-guide/source + [egg_info] tag_build = tag_date = 0 diff --git a/test-requirements.txt b/test-requirements.txt index ef43dd255..ad76e6619 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -22,6 +22,7 @@ testresources>=0.2.4 testtools>=1.4.0 tempest-lib>=0.10.0 bandit>=0.13.2 +openstackdocstheme>=1.0.3 # vmwareapi driver specific dependencies oslo.vmware>=1.16.0 # Apache-2.0 diff --git a/tox.ini b/tox.ini index c1388cd49..523fdb78c 100644 --- a/tox.ini +++ b/tox.ini @@ -104,10 +104,17 @@ commands = {posargs} [testenv:docs] commands = - rm -rf doc/source/api doc/build + rm -rf doc/source/api doc/build api-guide/build python setup.py build_sphinx bash -c '! find doc/ -type f -name *.json | xargs -t -n1 python -m json.tool 2>&1 > /dev/null | grep -B1 -v ^python' oslo-config-generator --config-file=etc/nova/nova-config-generator.conf + sphinx-build -b html api-guide/source api-guide/build + +[testenv:api-guide] +# This environment is called from CI scripts to test and publish +# the API Guide to developer.openstack.org. +commands = + sphinx-build -b html -d api-guide/build/doctrees api-guide/source api-guide/build [testenv:docs-constraints] install_command = {[testenv:common-constraints]install_command}