Update tox template
Reviewed-by: Goncharov, Artem <artem.goncharov@t-systems.com> Co-authored-by: gtema <artem.goncharov@gmail.com> Co-committed-by: gtema <artem.goncharov@gmail.com>
This commit is contained in:
		@ -104,6 +104,9 @@ html_title = "{{ title }}"
 | 
			
		||||
# so a file named "default.css" will overwrite the builtin "default.css".
 | 
			
		||||
html_static_path = ['_static']
 | 
			
		||||
 | 
			
		||||
# Do not include sources into the rendered results
 | 
			
		||||
html_copy_source = False
 | 
			
		||||
 | 
			
		||||
# -- Options for PDF output --------------------------------------------------
 | 
			
		||||
latex_documents = [
 | 
			
		||||
{%- if pdf_name is defined %}
 | 
			
		||||
 | 
			
		||||
@ -21,8 +21,14 @@ deps =
 | 
			
		||||
  -r{toxinidir}/requirements.txt
 | 
			
		||||
commands = {posargs}
 | 
			
		||||
 | 
			
		||||
# This env is invoked in the periodic pipeline and is therefore responsible to
 | 
			
		||||
# build all relevant docs at once.
 | 
			
		||||
[testenv:docs]
 | 
			
		||||
deps = -r{toxinidir}/doc/requirements.txt
 | 
			
		||||
allowlist_externals =
 | 
			
		||||
  mkdir
 | 
			
		||||
  cp
 | 
			
		||||
  sh
 | 
			
		||||
commands =
 | 
			
		||||
{%- for doc in docs %}
 | 
			
		||||
  {[testenv:{{ doc.type }}]commands}
 | 
			
		||||
@ -32,7 +38,11 @@ commands =
 | 
			
		||||
[testenv:docs-pdf]
 | 
			
		||||
deps = -r{toxinidir}/doc/requirements.txt
 | 
			
		||||
allowlist_externals =
 | 
			
		||||
  rm
 | 
			
		||||
  mkdir
 | 
			
		||||
  make
 | 
			
		||||
  bash
 | 
			
		||||
  cp
 | 
			
		||||
commands =
 | 
			
		||||
  mkdir -p doc/build/pdf
 | 
			
		||||
{%- for doc in docs %}
 | 
			
		||||
@ -68,11 +78,12 @@ deps = -r{toxinidir}/doc/requirements.txt
 | 
			
		||||
allowlist_externals =
 | 
			
		||||
  cp
 | 
			
		||||
  mkdir
 | 
			
		||||
  find
 | 
			
		||||
  sh
 | 
			
		||||
commands =
 | 
			
		||||
  sphinx-build -W --keep-going -b json {{ loc }}/source doc/build/json/{{ doc.type }}
 | 
			
		||||
  # Drop data useless for the search
 | 
			
		||||
  find doc/build/json -type d -and ( -name '_images' -or -name '_static' -or -name '_sources' ) -exec rm {:} ;
 | 
			
		||||
  # Drop data useless for the search - wrap it also with sh/xargs due to bugs
 | 
			
		||||
  # in tox
 | 
			
		||||
  sh -c "find doc/build/json -type d -and '(' -name '_images' -or -name '_static' -or -name '_sources' ')' -print0 | xargs -0 rm -rf"
 | 
			
		||||
{%- if doc.type == 'api-ref' %}
 | 
			
		||||
  mkdir -p api-ref/build/json
 | 
			
		||||
  cp -av doc/build/json/api-ref api-ref/build/json
 | 
			
		||||
 | 
			
		||||
@ -201,7 +201,7 @@ def process_repositories(args, service):
 | 
			
		||||
    repo_to.git.push(*push_args)
 | 
			
		||||
    if "github" in url_to:
 | 
			
		||||
        subprocess.run(
 | 
			
		||||
            args=["gh", "pr", "create", "-f"], cwd=copy_to, check=True
 | 
			
		||||
            args=["gh", "pr", "create", "-f"], cwd=copy_to, check=False
 | 
			
		||||
        )
 | 
			
		||||
    elif "gitea" in url_to and args.token:
 | 
			
		||||
        open_pr(
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user