From fccfde37785643aa71d7f10fb0cfc3a29fc34517 Mon Sep 17 00:00:00 2001 From: Sylvain <15435472+duposyl@users.noreply.github.com> Date: Tue, 22 Nov 2022 06:23:12 -0500 Subject: [PATCH 1/8] Experimenting with Sphinx distributed build option --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 61fb542f5b..1b16e6071f 100644 --- a/tox.ini +++ b/tox.ini @@ -38,4 +38,4 @@ description = Check if documentation generates properly deps = -r{toxinidir}/requirements/requirements_doc.txt commands = - sphinx-build -d "{toxworkdir}/doc_doctree" doc/source "{toxworkdir}/doc_out" --color -vW -b html + sphinx-build -d "{toxworkdir}/doc_doctree" doc/source "{toxworkdir}/doc_out" --color -vW -b html -j auto From a3e0a88dfded48c8eefabfe42a5d04d8a37917f5 Mon Sep 17 00:00:00 2001 From: Sylvain <15435472+duposyl@users.noreply.github.com> Date: Wed, 23 Nov 2022 13:48:17 -0500 Subject: [PATCH 2/8] Added verbose option to Sphinx build to troubleshoot doc build performance --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 1b16e6071f..74bd0ff669 100644 --- a/tox.ini +++ b/tox.ini @@ -38,4 +38,4 @@ description = Check if documentation generates properly deps = -r{toxinidir}/requirements/requirements_doc.txt commands = - sphinx-build -d "{toxworkdir}/doc_doctree" doc/source "{toxworkdir}/doc_out" --color -vW -b html -j auto + sphinx-build -d "{toxworkdir}/doc_doctree" doc/source "{toxworkdir}/doc_out" --color -vW -b html -j auto -vvv From 808a71edd7e68411f7650538137c2e2fd6b22cd5 Mon Sep 17 00:00:00 2001 From: Sylvain <15435472+duposyl@users.noreply.github.com> Date: Wed, 23 Nov 2022 16:17:09 -0500 Subject: [PATCH 3/8] Removing verbose option for Sphinx and switching to Python 3.8 for the doc build --- tox.ini | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tox.ini b/tox.ini index 74bd0ff669..8f8d16c250 100644 --- a/tox.ini +++ b/tox.ini @@ -15,7 +15,7 @@ basepython = py39: python3.9 py310: python3.10 py: python3 - {style,reformat,doc,build}: python3 + {style,reformat,doc,build}: python3.8 setenv = PYTHONUNBUFFERED = yes cov: PYTEST_EXTRA_ARGS = --cov=ansys.stk --cov-report=term --cov-report=xml:.cov/xml --cov-report=html:.cov/html @@ -38,4 +38,4 @@ description = Check if documentation generates properly deps = -r{toxinidir}/requirements/requirements_doc.txt commands = - sphinx-build -d "{toxworkdir}/doc_doctree" doc/source "{toxworkdir}/doc_out" --color -vW -b html -j auto -vvv + sphinx-build -d "{toxworkdir}/doc_doctree" doc/source "{toxworkdir}/doc_out" --color -vW -b html -j auto From 0ddd78ef7f40ac3da04219fdbc151d3c03f5cf3f Mon Sep 17 00:00:00 2001 From: Sylvain <15435472+duposyl@users.noreply.github.com> Date: Wed, 23 Nov 2022 16:39:03 -0500 Subject: [PATCH 4/8] Switching to Python 3.8 to verify doc build performance --- .github/workflows/ci_cd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index 16958687f6..e3c5c3087c 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -8,7 +8,7 @@ on: - main env: - MAIN_PYTHON_VERSION: '3.10' + MAIN_PYTHON_VERSION: '3.8' PACKAGE_NAME: 'ansys-stk-core' IMPORT_NAME: 'ansys.stk.core' From 496c2cc46b1e980d1408da29f5b4ef938884e06d Mon Sep 17 00:00:00 2001 From: Jorge Martinez Garrido Date: Thu, 24 Nov 2022 09:08:13 +0100 Subject: [PATCH 5/8] DBG: investigate more Python versions --- .github/workflows/ci_cd.yml | 8 ++++++-- tox.ini | 3 +-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index e3c5c3087c..e0271c085f 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -8,7 +8,7 @@ on: - main env: - MAIN_PYTHON_VERSION: '3.8' + MAIN_PYTHON_VERSION: '3.10' PACKAGE_NAME: 'ansys-stk-core' IMPORT_NAME: 'ansys.stk.core' @@ -121,13 +121,17 @@ jobs: name: Documentation runs-on: ubuntu-latest needs: [doc-style] + strategy: + matrix: + python-version: ['3.7', '3.8', '3.9', '3.10'] + fail-fast: true steps: - uses: actions/checkout@v3 - name: Set up Python uses: actions/setup-python@v4 with: - python-version: ${{ env.MAIN_PYTHON_VERSION }} + python-version: ${{ matrix.python-version }} - name: Install dependencies run: | diff --git a/tox.ini b/tox.ini index 8f8d16c250..928b539b1f 100644 --- a/tox.ini +++ b/tox.ini @@ -14,8 +14,7 @@ basepython = py38: python3.8 py39: python3.9 py310: python3.10 - py: python3 - {style,reformat,doc,build}: python3.8 + {py,style,reformat,doc,build}: python3 setenv = PYTHONUNBUFFERED = yes cov: PYTEST_EXTRA_ARGS = --cov=ansys.stk --cov-report=term --cov-report=xml:.cov/xml --cov-report=html:.cov/html From 465ac492a8f7d337ba0e82a7efb76a0c8939c732 Mon Sep 17 00:00:00 2001 From: Sylvain <15435472+duposyl@users.noreply.github.com> Date: Thu, 24 Nov 2022 08:01:41 -0500 Subject: [PATCH 6/8] Turning off `numpydoc_validation_checks` to confirm that it is the source of the slow down --- doc/source/conf.py | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/doc/source/conf.py b/doc/source/conf.py index 792142c69f..f893a7342f 100755 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -46,20 +46,7 @@ # Consider enabling numpydoc validation. See: # https://numpydoc.readthedocs.io/en/latest/validation.html# numpydoc_validate = True -numpydoc_validation_checks = { - "GL06", # Found unknown section - "GL07", # Sections are in the wrong order. - # "GL08", # The object does not have a docstring - "GL09", # Deprecation warning should precede extended summary - "GL10", # reST directives {directives} must be followed by two colons - "SS01", # No summary found - # "SS02", # Summary does not start with a capital letter - # "SS03", # Summary does not end with a period - # "SS04", # Summary contains heading whitespaces - # "SS05", # Summary must start with infinitive verb, not third person - "RT02", # The first line of the Returns section should contain only the - # type, unless multiple values are being returned" -} +numpydoc_validation_checks = set() # Path to static files html_static_path = ["_static"] From 775fa0b92e8e6ec405ee8901dad552c809384037 Mon Sep 17 00:00:00 2001 From: Sylvain <15435472+duposyl@users.noreply.github.com> Date: Mon, 28 Nov 2022 15:09:33 -0500 Subject: [PATCH 7/8] Branch clean-up - Removing matrix build using multiple python versions. - Commenting out numpydoc checks. - Restoring tox configuration to initial state. --- .github/workflows/ci_cd.yml | 6 +----- doc/source/conf.py | 16 +++++++++++++++- tox.ini | 5 +++-- 3 files changed, 19 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index e0271c085f..16958687f6 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -121,17 +121,13 @@ jobs: name: Documentation runs-on: ubuntu-latest needs: [doc-style] - strategy: - matrix: - python-version: ['3.7', '3.8', '3.9', '3.10'] - fail-fast: true steps: - uses: actions/checkout@v3 - name: Set up Python uses: actions/setup-python@v4 with: - python-version: ${{ matrix.python-version }} + python-version: ${{ env.MAIN_PYTHON_VERSION }} - name: Install dependencies run: | diff --git a/doc/source/conf.py b/doc/source/conf.py index f893a7342f..61cc284bf6 100755 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -46,7 +46,21 @@ # Consider enabling numpydoc validation. See: # https://numpydoc.readthedocs.io/en/latest/validation.html# numpydoc_validate = True -numpydoc_validation_checks = set() +numpydoc_validation_checks = set() # numpydoc validation is turned off due to performance (see PR#44) +#numpydoc_validation_checks = { +# "GL06", # Found unknown section +# "GL07", # Sections are in the wrong order. +# # "GL08", # The object does not have a docstring +# "GL09", # Deprecation warning should precede extended summary +# "GL10", # reST directives {directives} must be followed by two colons +# "SS01", # No summary found +# # "SS02", # Summary does not start with a capital letter +# # "SS03", # Summary does not end with a period +# # "SS04", # Summary contains heading whitespaces +# # "SS05", # Summary must start with infinitive verb, not third person +# "RT02", # The first line of the Returns section should contain only the +# # type, unless multiple values are being returned" +#} # Path to static files html_static_path = ["_static"] diff --git a/tox.ini b/tox.ini index 928b539b1f..9173bca833 100644 --- a/tox.ini +++ b/tox.ini @@ -14,8 +14,9 @@ basepython = py38: python3.8 py39: python3.9 py310: python3.10 - {py,style,reformat,doc,build}: python3 -setenv = + py: python3 + {style,reformat,doc,build}: python3 + setenv = PYTHONUNBUFFERED = yes cov: PYTEST_EXTRA_ARGS = --cov=ansys.stk --cov-report=term --cov-report=xml:.cov/xml --cov-report=html:.cov/html deps = From b08b0f5375bf4d6a49854affc8343450953e67a6 Mon Sep 17 00:00:00 2001 From: Sylvain <15435472+duposyl@users.noreply.github.com> Date: Mon, 28 Nov 2022 15:11:18 -0500 Subject: [PATCH 8/8] Fix indentation in tox.ini --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 9173bca833..1b16e6071f 100644 --- a/tox.ini +++ b/tox.ini @@ -16,7 +16,7 @@ basepython = py310: python3.10 py: python3 {style,reformat,doc,build}: python3 - setenv = +setenv = PYTHONUNBUFFERED = yes cov: PYTEST_EXTRA_ARGS = --cov=ansys.stk --cov-report=term --cov-report=xml:.cov/xml --cov-report=html:.cov/html deps =