From 2edd0086fcf0d2ef9595d3227817ea9587bb3a62 Mon Sep 17 00:00:00 2001 From: zhurong Date: Mon, 30 Mar 2020 00:04:21 -0700 Subject: [PATCH] Fix docs gate Change-Id: Ibcb463c03e60886baf2ec70728b3ac1087345c7f --- doc/requirements.txt | 5 +++++ doc/source/_exts/yaqlautodoc.py | 1 - doc/source/conf.py | 6 +----- doc/source/extending_yaql.rst | 8 ++++---- test-requirements.txt | 4 ---- tox.ini | 3 ++- 6 files changed, 12 insertions(+), 15 deletions(-) create mode 100644 doc/requirements.txt diff --git a/doc/requirements.txt b/doc/requirements.txt new file mode 100644 index 0000000..58c9a76 --- /dev/null +++ b/doc/requirements.txt @@ -0,0 +1,5 @@ +# doc build requirements +sphinx!=1.6.6,!=1.6.7,!=2.1.0,>=1.6.2;python_version>='3.4' # BSD +sphinxcontrib-httpdomain>=1.3.0 # BSD +reno>=2.5.0 # Apache-2.0 +openstackdocstheme>=1.20.0 # Apache-2.0 diff --git a/doc/source/_exts/yaqlautodoc.py b/doc/source/_exts/yaqlautodoc.py index 9fe286d..bd67e8a 100644 --- a/doc/source/_exts/yaqlautodoc.py +++ b/doc/source/_exts/yaqlautodoc.py @@ -208,7 +208,6 @@ def render(app, doctree, fromdocname): def setup(app): - app.info('Loading the yaql documenter extension') app.add_node(YaqlDocNode) app.add_directive('yaqldoc', YaqlDocDirective) app.connect('doctree-resolved', render) diff --git a/doc/source/conf.py b/doc/source/conf.py index 7ced9c6..0ccbce2 100755 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -21,11 +21,7 @@ sys.path.insert(0, os.path.join(os.path.abspath('.'), '_exts')) # 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', - # 'oslosphinx', - 'yaqlautodoc' -] +extensions = ['openstackdocstheme', 'sphinx.ext.autodoc', 'yaqlautodoc'] # autodoc generation is a bit aggressive and a nuisance when doing heavy # text edit cycles. diff --git a/doc/source/extending_yaql.rst b/doc/source/extending_yaql.rst index 95fbe3e..24158ad 100644 --- a/doc/source/extending_yaql.rst +++ b/doc/source/extending_yaql.rst @@ -44,7 +44,7 @@ available operator symbols cannot be changed for the parser once it has been built. Each operator in the table is represented by the tuple -`(op_symbols, op_type, op_alias): +`(op_symbols, op_type, op_alias)`: * op_symbols are the operator symbols. There are no limitations on how the operators can be called as long as they do not contain whitespaces. It can @@ -160,7 +160,7 @@ There are three ways to create a context instance: #. Call `create_child_context` method on any existing context object to get a child context #. Use `yaql.create_context` function to creates the root context that is -prepopulated with YAQL standard library functions + prepopulated with YAQL standard library functions `yaql.create_context` allows one to selectively disable standard library modules. @@ -176,12 +176,12 @@ parameter name. yaql has two implementations included: -* `yaql.language.conventions.CamelCaseConvention' that translates Python +* `yaql.language.conventions.CamelCaseConvention` that translates Python conventions into camel case. For example, it will convert `my_func(arg_name)` into `myFunc(argName)`. This convention is used by default. -* `yaql.language.conventions.PythonConvention' that leaves function and +* `yaql.language.conventions.PythonConvention` that leaves function and parameter names intact. Each context, either directly or indirectly through its parent context, is diff --git a/test-requirements.txt b/test-requirements.txt index b76a9b7..2415bcb 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -3,10 +3,6 @@ hacking>=0.12.0,!=0.13.0,<0.14 coverage>=3.6 fixtures>=1.3.1 python-subunit>=0.0.18 -sphinx>=1.1.2,!=1.2.0,!=1.3b1,<1.3 -oslosphinx>=2.5.0 testrepository>=0.0.18 testscenarios>=0.4 testtools>=1.4.0 - -reno>=1.8.0 # Apache2 diff --git a/tox.ini b/tox.ini index e3a9dd6..afc320e 100644 --- a/tox.ini +++ b/tox.ini @@ -23,7 +23,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 -a -E -W -d doc/build/doctrees -b html doc/source doc/build/html [testenv:releasenotes] commands = sphinx-build -a -E -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html