From 354f89e115687e3b17dd3a37ec2a57cca44f825f Mon Sep 17 00:00:00 2001 From: Victor Morales Date: Wed, 7 Sep 2022 11:47:21 -0700 Subject: [PATCH 1/3] Add PySpelling support PySpelling is a python module for spell checking. It consumes Aspell or Hunspell checking tools to catch misspelled words. This can be useful during the core review. Signed-off-by: Victor Morales --- .github/.wordlist.txt | 9 +++++++++ .gitignore | 1 + .spellcheck.yml | 21 +++++++++++++++++++++ test-requirements.txt | 1 + tox.ini | 1 + 5 files changed, 33 insertions(+) create mode 100644 .github/.wordlist.txt create mode 100644 .spellcheck.yml diff --git a/.github/.wordlist.txt b/.github/.wordlist.txt new file mode 100644 index 0000000000..1a9af8fdfb --- /dev/null +++ b/.github/.wordlist.txt @@ -0,0 +1,9 @@ +anuket +Baraque +Kubernetes +Lakelse +OpenStack +sexualized +Snezka +socio +tsc diff --git a/.gitignore b/.gitignore index b112c7ebe4..2a9c3aaa28 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ doc/.DS_Store _build/ .tox/ .vscode/ +*.dic diff --git a/.spellcheck.yml b/.spellcheck.yml new file mode 100644 index 0000000000..4a12bc2196 --- /dev/null +++ b/.spellcheck.yml @@ -0,0 +1,21 @@ +--- +# SPDX-license-identifier: Apache-2.0 +############################################################################## +# Copyright (c) 2022 Samsung Corporation +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## + +matrix: + - name: markdown + dictionary: + wordlists: + - .github/.wordlist.txt + pipeline: + - pyspelling.filters.html: + sources: + - '_build/html/*.html' + aspell: + ignore-case: true diff --git a/test-requirements.txt b/test-requirements.txt index 5b543fe279..29b862390b 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -4,3 +4,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 diff --git a/tox.ini b/tox.ini index 19ddd64a2e..90eab869af 100644 --- a/tox.ini +++ b/tox.ini @@ -12,3 +12,4 @@ deps = commands = sphinx-build -W --keep-going -W -T -b html -D language=en doc _build/html sphinx-build -W --keep-going -W -b linkcheck doc _build/html + pyspelling -c .spellcheck.yml From f919ce9c872b6539a2a61555ed4383a6f12a76a3 Mon Sep 17 00:00:00 2001 From: Victor Morales Date: Wed, 7 Sep 2022 13:24:40 -0700 Subject: [PATCH 2/3] 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 | 3 +++ 5 files changed, 10 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..dbe2c65a15 --- /dev/null +++ b/.rstcheck.cfg @@ -0,0 +1,4 @@ +[rstcheck] +report_level=ERROR +ignore_directives=bibliography, +ignore_roles=cite:p, diff --git a/doc/gov/chapters/chapter09.rst b/doc/gov/chapters/chapter09.rst index ecd468379d..4eaefd90fc 100644 --- a/doc/gov/chapters/chapter09.rst +++ b/doc/gov/chapters/chapter09.rst @@ -220,7 +220,8 @@ experience. This survey will be used to measure the feasibility, utility, and ef 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 90eab869af..9ec418e415 100644 --- a/tox.ini +++ b/tox.ini @@ -6,10 +6,13 @@ skipsdist = true [testenv:docs] basepython = python3.10 +allowlist_externals = bash deps = -chttps://opendev.org/openstack/requirements/raw/branch/stable/zed/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 -W --keep-going -W -T -b html -D language=en doc _build/html sphinx-build -W --keep-going -W -b linkcheck doc _build/html pyspelling -c .spellcheck.yml From b3619532bdf56f967207497ba86c075e18344ee7 Mon Sep 17 00:00:00 2001 From: Victor Morales Date: Mon, 12 Sep 2022 13:48:04 -0700 Subject: [PATCH 3/3] Add Makefile to deploy locally Signed-off-by: Victor Morales --- Makefile | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000000..fdfe1abb15 --- /dev/null +++ b/Makefile @@ -0,0 +1,13 @@ +# SPDX-license-identifier: Apache-2.0 +############################################################################## +# Copyright (c) 2022 Samsung Corporation +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## + +.PHONY: deploy +deploy: + tox -e docs + python -m http.server --directory _build/html/