Fix docs gate

Change-Id: Ibcb463c03e60886baf2ec70728b3ac1087345c7f
This commit is contained in:
zhurong 2020-03-30 00:04:21 -07:00
parent 99f5b075a7
commit 2edd0086fc
6 changed files with 12 additions and 15 deletions

5
doc/requirements.txt Normal file
View File

@ -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

View File

@ -208,7 +208,6 @@ def render(app, doctree, fromdocname):
def setup(app): def setup(app):
app.info('Loading the yaql documenter extension')
app.add_node(YaqlDocNode) app.add_node(YaqlDocNode)
app.add_directive('yaqldoc', YaqlDocDirective) app.add_directive('yaqldoc', YaqlDocDirective)
app.connect('doctree-resolved', render) app.connect('doctree-resolved', render)

View File

@ -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 # Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones. # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = [ extensions = ['openstackdocstheme', 'sphinx.ext.autodoc', 'yaqlautodoc']
'sphinx.ext.autodoc',
# 'oslosphinx',
'yaqlautodoc'
]
# autodoc generation is a bit aggressive and a nuisance when doing heavy # autodoc generation is a bit aggressive and a nuisance when doing heavy
# text edit cycles. # text edit cycles.

View File

@ -44,7 +44,7 @@ available operator symbols cannot be changed for the parser once it has been
built. built.
Each operator in the table is represented by the tuple 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 * 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 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 #. Call `create_child_context` method on any existing context object to get a
child context child context
#. Use `yaql.create_context` function to creates the root context that is #. 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 `yaql.create_context` allows one to selectively disable standard library
modules. modules.
@ -176,12 +176,12 @@ parameter name.
yaql has two implementations included: 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 conventions into camel case. For example, it will convert
`my_func(arg_name)` into `myFunc(argName)`. This convention is used by `my_func(arg_name)` into `myFunc(argName)`. This convention is used by
default. default.
* `yaql.language.conventions.PythonConvention' that leaves function and * `yaql.language.conventions.PythonConvention` that leaves function and
parameter names intact. parameter names intact.
Each context, either directly or indirectly through its parent context, is Each context, either directly or indirectly through its parent context, is

View File

@ -3,10 +3,6 @@ hacking>=0.12.0,!=0.13.0,<0.14
coverage>=3.6 coverage>=3.6
fixtures>=1.3.1 fixtures>=1.3.1
python-subunit>=0.0.18 python-subunit>=0.0.18
sphinx>=1.1.2,!=1.2.0,!=1.3b1,<1.3
oslosphinx>=2.5.0
testrepository>=0.0.18 testrepository>=0.0.18
testscenarios>=0.4 testscenarios>=0.4
testtools>=1.4.0 testtools>=1.4.0
reno>=1.8.0 # Apache2

View File

@ -23,7 +23,8 @@ commands = {posargs}
commands = python setup.py testr --coverage --testr-args='{posargs}' commands = python setup.py testr --coverage --testr-args='{posargs}'
[testenv:docs] [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] [testenv:releasenotes]
commands = sphinx-build -a -E -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html commands = sphinx-build -a -E -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html