Added sphinx-minify to tox #147

Merged
zuul merged 3 commits from minify-template-tox into main 2023-11-01 13:29:43 +00:00
2 changed files with 8 additions and 13 deletions
Showing only changes of commit daa55049c7 - Show all commits

View File

@ -68,19 +68,9 @@ allowlist_externals =
mkdir mkdir
commands = commands =
sphinx-build -W --keep-going -b html {{ loc }}/source doc/build/html_temp/{{ doc.type }} sphinx-build -W --keep-going -b html {{ loc }}/source doc/build/html_temp/{{ doc.type }}
{%- if doc.type == 'api-ref' %} sphinx-minify --input-directory doc/build/html_temp/{{ doc.type }} --output-directory doc/build/html/{{ doc.type }}
sphinx-minify --input-directory doc/build/html_temp/api-ref --output-directory doc/build/html/api-ref mkdir -p {{ doc.type }}/build/html

in this case I don’t see any reason why you duplicating this entry in to 3 condition cases instead of putting it before condition and parametrizing it with doc.type like:

sphinx-minify --input-directory doc/build/html_temp/{{ doc.type }} --output-directory doc/build/html/{{ doc.type }}
in this case I don't see any reason why you duplicating this entry in to 3 condition cases instead of putting it before condition and parametrizing it with doc.type like: ``` sphinx-minify --input-directory doc/build/html_temp/{{ doc.type }} --output-directory doc/build/html/{{ doc.type }} ```
Outdated
Review

I have changed it so that we also use vars for the mkdir and rm command.

I have changed it so that we also use vars for the mkdir and rm command.
mkdir -p api-ref/build/html cp -av doc/build/html/{{ doc.type }} {{ doc.type }}/build/html
cp -av doc/build/html/api-ref api-ref/build/html
{%- elif doc.type == 'umn' %}
sphinx-minify --input-directory doc/build/html_temp/umn --output-directory doc/build/html/umn
mkdir -p umn/build/html
cp -av doc/build/html/umn umn/build/html
{%- elif doc.type == 'dev-guide' %}
sphinx-minify --input-directory doc/build/html_temp/dev-guide --output-directory doc/build/html/dev-guide
mkdir -p dev_guide/build/html
cp -av doc/build/html/dev-guide dev_guide/build/html
{%- endif %}
# Json version (for search) # Json version (for search)
[testenv:json-{{ doc.type }}] [testenv:json-{{ doc.type }}]