From cc3117ac624dc6aaca94d29f96c9e66fa51bea03 Mon Sep 17 00:00:00 2001 From: Karel van Klink <karel.vanklink@geant.org> Date: Tue, 25 Apr 2023 09:56:59 +0200 Subject: [PATCH] Resolve Vale errors, lint pydoc too --- build-docs.sh | 1 + docs/source/quickstart.rst | 6 +++--- docs/vale/.vale.ini | 4 ++-- docs/vale/styles/Vocab/Sphinx/accept.txt | 2 +- docs/vale/styles/Vocab/geant-jargon/accept.txt | 3 +-- lso/__init__.py | 2 +- tox.ini | 3 +++ 7 files changed, 12 insertions(+), 9 deletions(-) diff --git a/build-docs.sh b/build-docs.sh index 523d06c..75de76c 100755 --- a/build-docs.sh +++ b/build-docs.sh @@ -1,4 +1,5 @@ python docs/dump-openapi-spec.py sphinx-apidoc lso lso/app.py -o docs/source -d 2 -f +vale --config=docs/vale/.vale.ini docs/source/*.rst lso/*.py sphinx-build -b html docs/source docs/build diff --git a/docs/source/quickstart.rst b/docs/source/quickstart.rst index bc0ae93..2ff56ee 100644 --- a/docs/source/quickstart.rst +++ b/docs/source/quickstart.rst @@ -1,9 +1,9 @@ -Quick Start +Quick start ================== *This is a quick setup guide for running standalone on your local machine* -Install the Module +Install the module -------------------- *One of these should be what you're looking for:* @@ -31,7 +31,7 @@ Install the Module # for a full dev environment pip install -r requirements.txt -Running the App +Running the app ------------------- * Create a settings file, see `config.json.example` for an example. diff --git a/docs/vale/.vale.ini b/docs/vale/.vale.ini index 4741a77..0fbe065 100644 --- a/docs/vale/.vale.ini +++ b/docs/vale/.vale.ini @@ -9,5 +9,5 @@ Packages = proselint, Microsoft [*] BasedOnStyles = Vale, proselint, Microsoft -; Ignore the table of contents directive -BlockIgnores = (?s) *(\x60\x60\x60{toctree}.*?\x60\x60\x60) +[formats] +py = rst diff --git a/docs/vale/styles/Vocab/Sphinx/accept.txt b/docs/vale/styles/Vocab/Sphinx/accept.txt index 1c26bb2..0a57a0f 100644 --- a/docs/vale/styles/Vocab/Sphinx/accept.txt +++ b/docs/vale/styles/Vocab/Sphinx/accept.txt @@ -1 +1 @@ -toctree +param diff --git a/docs/vale/styles/Vocab/geant-jargon/accept.txt b/docs/vale/styles/Vocab/geant-jargon/accept.txt index dcfefe8..3303705 100644 --- a/docs/vale/styles/Vocab/geant-jargon/accept.txt +++ b/docs/vale/styles/Vocab/geant-jargon/accept.txt @@ -1,3 +1,2 @@ -lso -LSO +[LSO|lso] [Ss]ubpackages diff --git a/lso/__init__.py b/lso/__init__.py index c18f1f3..757477d 100644 --- a/lso/__init__.py +++ b/lso/__init__.py @@ -15,7 +15,7 @@ from lso.routes import default, device def create_app(): """ overrides default settings with those found - in the file read from env var SETTINGS_FILENAME + in the file read from environment variable `SETTINGS_FILENAME` :return: a new flask app instance """ diff --git a/tox.ini b/tox.ini index ab6a6bc..c0e8872 100644 --- a/tox.ini +++ b/tox.ini @@ -16,4 +16,7 @@ commands = coverage report --fail-under 80 flake8 python docs/dump-openapi-spec.py + sphinx-apidoc lso lso/app.py -o docs/source -d 2 -f + vale --config=docs/vale/.vale.ini sync + vale --config=docs/vale/.vale.ini docs/source/*.rst lso/*.py sphinx-build -b html docs/source docs/build -- GitLab