From 617a3db3a368bfde3278d3c2122aaaa892273244 Mon Sep 17 00:00:00 2001 From: Victor Morales Date: Wed, 7 Sep 2022 13:24:40 -0700 Subject: [PATCH] Add rstcheck support This tool checks reStructuredText syntax helping to detect non-trivial documentation issues. Signed-off-by: Victor Morales --- .rstcheck.cfg | 4 ++++ doc/gov/chapters/chapter09.rst | 3 ++- doc/gov/figures/{Table 1-1.png => Table_1-1.png} | Bin test-requirements.txt | 1 + tox.ini | 2 ++ 5 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 .rstcheck.cfg rename doc/gov/figures/{Table 1-1.png => Table_1-1.png} (100%) diff --git a/.rstcheck.cfg b/.rstcheck.cfg new file mode 100644 index 0000000000..8fa1c84b41 --- /dev/null +++ b/.rstcheck.cfg @@ -0,0 +1,4 @@ +[rstcheck] +report_level=WARNING +ignore_directives=bibliography, +ignore_roles=cite:p, diff --git a/doc/gov/chapters/chapter09.rst b/doc/gov/chapters/chapter09.rst index cbb6534c0d..1dcc712977 100644 --- a/doc/gov/chapters/chapter09.rst +++ b/doc/gov/chapters/chapter09.rst @@ -154,7 +154,8 @@ Expectation #3: The Qualitative Survey At the conclusion of the Test Case iterations, the participant will be asked to complete a qualitative survey of their experience. This survey will be used to measure the feasibility, utility, and effectiveness of the RI1 specifications, installation/configuration methods and RC-1 Test case efficacy. The survey will be in an Agile User Story format. The Table below provides an example of the survey questions: -![\ **Table 1:** Survey/Questionnaire example](../figures/Table 1-1.png) +.. image:: ../figures/Table_1-1.png + :alt: "Table 1: Survey/Questionnaire example" **Table 1:** Survey/Questionnaire example diff --git a/doc/gov/figures/Table 1-1.png b/doc/gov/figures/Table_1-1.png similarity index 100% rename from doc/gov/figures/Table 1-1.png rename to doc/gov/figures/Table_1-1.png diff --git a/test-requirements.txt b/test-requirements.txt index 29b862390b..88a9aa3c78 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -5,3 +5,4 @@ sphinx!=1.6.6,!=1.6.7,!=2.1.0,!=3.0.0,!=3.4.2 # BSD doc8 # Apache-2.0 sphinx-material pyspelling # MIT +rstcheck[sphinx] # MIT diff --git a/tox.ini b/tox.ini index 0f56886c23..8c968be1e9 100644 --- a/tox.ini +++ b/tox.ini @@ -10,6 +10,8 @@ deps = -chttps://opendev.org/openstack/requirements/raw/branch/stable/xena/upper-constraints.txt -r{toxinidir}/test-requirements.txt commands = + bash -c "find {toxinidir} -not -path {toxinidir}/.tox/\* \ + -name \*.rst -type f -print0 | xargs -0 rstcheck" sphinx-build --keep-going -W -T -b html -D language=en doc _build/html sphinx-build --keep-going -W -b linkcheck doc _build/html pyspelling -c .spellcheck.yml