From baec7f5490bb2284448e5cd374946cd0c9410c94 Mon Sep 17 00:00:00 2001 From: Nguyen Van Trung Date: Thu, 31 May 2018 10:03:39 +0700 Subject: [PATCH] Follow the new PTI for document build For compliance with the Project Testing Interface as described in: https://governance.openstack.org/tc/reference/project-testing-interface.html For more detials information, please refer to: http://lists.openstack.org/pipermail/openstack-dev/2017-December/125710.html Change-Id: I31f34904335fa889c05153bf899067dba7453fbe --- doc/requirements.txt | 8 ++++++++ doc/source/api/reference/consumers.rst | 2 +- doc/source/api/reference/secret_types.rst | 6 +++--- doc/source/configuration/troubleshooting.rst | 2 +- doc/source/index.rst | 2 +- setup.cfg | 4 ---- test-requirements.txt | 7 ------- tox.ini | 3 ++- 8 files changed, 16 insertions(+), 18 deletions(-) create mode 100644 doc/requirements.txt diff --git a/doc/requirements.txt b/doc/requirements.txt new file mode 100644 index 000000000..121ae8e7a --- /dev/null +++ b/doc/requirements.txt @@ -0,0 +1,8 @@ +sphinx!=1.6.6,!=1.6.7,>=1.6.2 # BSD +sphinxcontrib-httpdomain>=1.3.0 # BSD +sphinxcontrib-blockdiag>=1.5.4 # BSD +reno>=2.5.0 # Apache-2.0 +os-api-ref>=1.4.0 # Apache-2.0 +openstackdocstheme>=1.18.1 # Apache-2.0 +castellan >= 0.17 # Apache-2.0 +pykmip==0.7.0 # Apache 2.0 License diff --git a/doc/source/api/reference/consumers.rst b/doc/source/api/reference/consumers.rst index 4504faaf3..472d4efe3 100644 --- a/doc/source/api/reference/consumers.rst +++ b/doc/source/api/reference/consumers.rst @@ -70,7 +70,7 @@ Response: Request: ******** -.. code-block:: javascript +.. code-block:: console GET {container_ref}/consumers?limit=1\&offset=1 Headers: diff --git a/doc/source/api/reference/secret_types.rst b/doc/source/api/reference/secret_types.rst index 1b0a33360..982a43eb3 100644 --- a/doc/source/api/reference/secret_types.rst +++ b/doc/source/api/reference/secret_types.rst @@ -152,7 +152,7 @@ we will be using a metadata-only POST followed by a PUT. This should return a reference (URI) for the secret that was created: -.. code-block:: json +.. code-block:: console 200 OK @@ -173,7 +173,7 @@ We can use this reference to add the payload with a PUT request: The server should respond with a 2xx response to indicate that the PUT request was processed successfully: -.. code-block:: json +.. code-block:: console 204 - No Content @@ -249,7 +249,7 @@ we will be using a single POST request. This should return a reference (URI) for the secret that was created. -.. code-block:: json +.. code-block:: console 200 OK diff --git a/doc/source/configuration/troubleshooting.rst b/doc/source/configuration/troubleshooting.rst index d4dea3f29..cf8b0e828 100644 --- a/doc/source/configuration/troubleshooting.rst +++ b/doc/source/configuration/troubleshooting.rst @@ -279,7 +279,7 @@ What you might see .. code-block:: json { - title: "Malformed JSON" + "title": "Malformed JSON" } diff --git a/doc/source/index.rst b/doc/source/index.rst index 402d4deba..194870aab 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -31,7 +31,7 @@ Sample Files ============ .. toctree:: - :maxdepth: 1 + :maxdepth: 1 sample_config sample_policy diff --git a/setup.cfg b/setup.cfg index b06bb5102..2a1c39976 100644 --- a/setup.cfg +++ b/setup.cfg @@ -79,10 +79,6 @@ oslo.config.opts = barbican.certificate.plugin.snakeoil = barbican.plugin.snakeoil_ca:list_opts oslo.config.opts.defaults = barbican.common.config = barbican.common.config:set_middleware_defaults -[build_sphinx] -all_files = 1 -build-dir = doc/build -source-dir = doc/source [build_apiguide] all_files = 1 diff --git a/test-requirements.txt b/test-requirements.txt index 173c592b2..9066edb38 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -21,10 +21,3 @@ tempest>=17.1.0 # Apache-2.0 # Bandit build requirements bandit>=1.1.0 # Apache-2.0 - -# Documentation build requirements -sphinx!=1.6.6,!=1.6.7,>=1.6.2 # BSD -os-api-ref>=1.4.0 # Apache-2.0 -reno>=2.5.0 # Apache-2.0 -openstackdocstheme>=1.18.1 # Apache-2.0 -castellan >= 0.17 # Apache-2.0 diff --git a/tox.ini b/tox.ini index e46ce0e37..7d766d198 100644 --- a/tox.ini +++ b/tox.ini @@ -62,9 +62,10 @@ commands = flake8 barbican setup.py [testenv:docs] +deps = -r{toxinidir}/doc/requirements.txt commands= rm -rf doc/build api-guide/build api-ref/build - python setup.py build_sphinx + sphinx-build -W -b html doc/source doc/build/html sphinx-build -W -b html api-guide/source api-guide/build/html sphinx-build -W -b html api-ref/source api-ref/build/html whitelist_externals = rm