diff --git a/README.md b/README.md index 146c051f66dec7c818d622946ca9b7e74c55f47f..29a7ebdb1691bd713bbfc0afd62407ee772b7f2b 100644 --- a/README.md +++ b/README.md @@ -2,4 +2,4 @@ The GÉANT interpretation of [`orchestrator-core`](https://github.com/workfloworchestrator/orchestrator-core). ## Documentation -You can build the documentation locally using [build_docs.sh](docs/build_docs.sh). +You can build the documentation locally using [build_docs.sh](build_docs.sh). diff --git a/build_docs.sh b/build_docs.sh new file mode 100755 index 0000000000000000000000000000000000000000..93a01493d1f95305772792efffa2ac0a8faf1bed --- /dev/null +++ b/build_docs.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +docker run -it --rm -v $(pwd)/:/gso sphinxdoc/sphinx:latest /bin/bash -c \ +"pip install sphinx-autodoc2 sphinx_rtd_theme myst-parser;cd /gso/docs/source;make html" + +if [ ! -d ./docs/vale/styles/proselint ] || [ ! -d ./docs/vale/styles/Microsoft ]; then + docker run -it --rm -v $(pwd)/docs:/docs jdkato/vale:latest --config="/docs/vale/.vale.ini" sync +fi + +docker run -it --rm -v $(pwd):/gso jdkato/vale:latest --glob='!*/_?ipam.py|!*/apidocs/*|!*/migrations/*' \ +--config="/gso/docs/vale/.vale.ini" /gso/docs/source /gso/gso diff --git a/docs/.gitlab-ci.yml b/docs/.gitlab-ci.yml index 045ea5195afc8e99e3729cbf1f9893ea64ba8ffc..f0c28f63a05150c9e83f16a08b211c166a920ec5 100644 --- a/docs/.gitlab-ci.yml +++ b/docs/.gitlab-ci.yml @@ -34,4 +34,4 @@ lint-documentation: - vale sync script: - - vale --glob='!*/gso.services._ipam.html' --config="$CI_PROJECT_DIR/docs/vale/.vale.ini" $CI_PROJECT_DIR/docs/source/index.md $CI_PROJECT_DIR/docs/source/glossary.md $CI_PROJECT_DIR/docs/source/quickstart.md $CI_PROJECT_DIR/docs/build/html/apidocs + - vale --glob='!*/_?ipam.py|!*/apidocs/*|!*/migrations/*' $CI_PROJECT_DIR/docs/source $CI_PROJECT_DIR/gso diff --git a/docs/build_docs.sh b/docs/build_docs.sh deleted file mode 100755 index ee92182c91737255d9e3b7b9603f53a78e20f040..0000000000000000000000000000000000000000 --- a/docs/build_docs.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -docker run -it --rm -v $(pwd)/../:/gso sphinxdoc/sphinx:latest /bin/bash -c \ -"pip install sphinx-autodoc2 sphinx_rtd_theme myst-parser;cd /gso/docs/source;make html" - -if [ ! -d ./vale/styles/proselint ] || [ ! -d ./vale/styles/Microsoft ]; then - docker run -it --rm -v $(pwd):/docs jdkato/vale:latest --config="/docs/vale/.vale.ini" sync -fi - -docker run -it --rm -v $(pwd):/docs jdkato/vale:latest --glob='!*/gso.services._ipam.html' --config="/docs/vale/.vale.ini" /docs/source/index.md /docs/source/glossary.md /docs/source/quickstart.md /docs/build/html/apidocs diff --git a/docs/vale/.vale.ini b/docs/vale/.vale.ini index e7a40f5f63f1b814db8cffe0ab0406a73fac4043..f3ed552dff9d4700f5a673f47249deafeafa203b 100644 --- a/docs/vale/.vale.ini +++ b/docs/vale/.vale.ini @@ -6,14 +6,17 @@ Vocab = geant-jargon, Sphinx Packages = proselint, Microsoft -[*] +[*.{md,py}] +; We only lint .md and .py files BasedOnStyles = Vale, proselint, Microsoft Microsoft.Headings = NO -[*.html] -Microsoft.Dashes = NO -Microsoft.HeadingAcronyms = NO +TokenIgnores = ({term}`[^\n]+`) -[/docs/source/glossary.md] -; Ignore acronyms being undefined in the file that defines all acronyms by definition +[*/glossary.md] +; Ignore acronyms being undefined in the file that defines all acronyms by definition. Microsoft.Acronyms = NO + +[formats] +; Ignore inline comments in source code, as these do not show up in generated documentation. +py = rst diff --git a/gso/main.py b/gso/main.py index 44b826dabd846284fb406e7ebe1efe4edea220d7..903cb9ec8789bc975b67b6fddd7b0700105833a5 100644 --- a/gso/main.py +++ b/gso/main.py @@ -3,10 +3,7 @@ from orchestrator import OrchestratorCore from orchestrator.cli.main import app as core_cli from orchestrator.settings import AppSettings -# pylint: disable=unused-import import gso.products # noqa: F401 - -# pylint: disable=unused-import import gso.workflows # noqa: F401 app = OrchestratorCore(base_settings=AppSettings())