From df78fc00f852da0cf69783d655598806936ab56f Mon Sep 17 00:00:00 2001 From: Camille <78221213+clatapie@users.noreply.github.com> Date: Mon, 2 Oct 2023 11:38:29 +0200 Subject: [PATCH 01/38] maitn: updating cicd --- .github/workflows/ci_cd.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index 2acaadf1..1c2f1968 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -234,7 +234,7 @@ jobs: - name: "Install OS packages" run: | sudo apt update - sudo apt install pandoc + sudo apt install pandoc xvfb - name: "Cache pip" uses: actions/cache@v3 @@ -322,7 +322,7 @@ jobs: doc-deploy-dev: name: "Deploy development documentation" # Deploy development only when merging to main - if: github.ref == 'refs/heads/main' + # if: github.ref == 'refs/heads/main' This is commented for development purpose. Needs to be reactivated before merging. runs-on: ubuntu-latest needs: [package] steps: From c4ebb78e3123db0b1ef483c2f73dda6e1595fa3a Mon Sep 17 00:00:00 2001 From: Camille <78221213+clatapie@users.noreply.github.com> Date: Mon, 2 Oct 2023 14:17:20 +0200 Subject: [PATCH 02/38] maint: update ci_cd.yml --- .github/workflows/ci_cd.yml | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index 1c2f1968..82339b8d 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -20,10 +20,10 @@ env: PYMAPDL_START_INSTANCE: FALSE PYMAPDL_PORT: 21000 # default won't work on GitHub runners PYMAPDL_DB_PORT: 21001 # default won't work on GitHub runners - RESET_AUTOSUMMARY_CACHE: 3 - RESET_EXAMPLES_CACHE: 3 - RESET_DOC_BUILD_CACHE: 3 - RESET_PIP_CACHE: 3 + RESET_AUTOSUMMARY_CACHE: 1 + RESET_EXAMPLES_CACHE: 1 + RESET_DOC_BUILD_CACHE: 1 + RESET_PIP_CACHE: 1 concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -234,7 +234,7 @@ jobs: - name: "Install OS packages" run: | sudo apt update - sudo apt install pandoc xvfb + sudo apt-get install pandoc xvfb - name: "Cache pip" uses: actions/cache@v3 @@ -244,9 +244,9 @@ jobs: restore-keys: | Python-v${{ env.RESET_PIP_CACHE }}-Linux-${{ env.MAIN_PYTHON_VERSION }} - - name: "Install ansys-math-core" + - name: "Install ansys-math-core and docs build requirements" run: | - pip install . + pip install .[doc] - name: "Login in Github container registry" uses: docker/login-action@v3.0.0 @@ -289,10 +289,6 @@ jobs: key: autosummary-v${{ env.RESET_AUTOSUMMARY_CACHE }}-${{ env.ANSYSMATH_VERSION }}-${{ github.sha }} restore-keys: | autosummary-v${{ env.RESET_AUTOSUMMARY_CACHE }}-${{ env.ANSYSMATH_VERSION }} - - - name: "Install docs build requirements" - run: | - pip install .[doc] - name: List run: pip list @@ -365,4 +361,4 @@ jobs: with: cname: ${{ env.DOCUMENTATION_CNAME }} token: ${{ secrets.GITHUB_TOKEN }} - python-version: ${{ env.MAIN_PYTHON_VERSION }} \ No newline at end of file + python-version: ${{ env.MAIN_PYTHON_VERSION }} From 6d45e6f075e1cb35853924fb6096e79125a2c7b4 Mon Sep 17 00:00:00 2001 From: Camille <78221213+clatapie@users.noreply.github.com> Date: Mon, 2 Oct 2023 14:18:25 +0200 Subject: [PATCH 03/38] maint: delete doc/_static directory --- doc/_static/README.rst | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 doc/_static/README.rst diff --git a/doc/_static/README.rst b/doc/_static/README.rst deleted file mode 100644 index e69de29b..00000000 From 7e04c1a86e1fda4873bc72c8d2ff2c2a14f7e924 Mon Sep 17 00:00:00 2001 From: Camille <78221213+clatapie@users.noreply.github.com> Date: Thu, 5 Oct 2023 09:21:47 +0200 Subject: [PATCH 04/38] test: modifying the cicd --- .github/workflows/ci_cd.yml | 70 +++++++++++++++++++++---------------- 1 file changed, 40 insertions(+), 30 deletions(-) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index 82339b8d..3a75e604 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -266,42 +266,52 @@ jobs: echo "ANSYSMATH_VERSION=$(python -c 'from ansys.math.core import __version__; print(__version__)')" >> $GITHUB_ENV echo "AnsysMath version is: $(python -c "from ansys.math.core import __version__; print(__version__)")" - - name: "Cache examples" - uses: actions/cache@v3 - with: - path: doc/source/examples - key: Examples-v${{ env.RESET_EXAMPLES_CACHE }}-${{ env.ANSYSMATH_VERSION }}-${{ github.sha }} - restore-keys: | - Examples-v${{ env.RESET_EXAMPLES_CACHE }}-${{ env.ANSYSMATH_VERSION }} + # - name: "Cache examples" + # uses: actions/cache@v3 + # with: + # path: doc/source/examples + # key: Examples-v${{ env.RESET_EXAMPLES_CACHE }}-${{ env.ANSYSMATH_VERSION }}-${{ github.sha }} + # restore-keys: | + # Examples-v${{ env.RESET_EXAMPLES_CACHE }}-${{ env.ANSYSMATH_VERSION }} - - name: "Cache docs build directory" - uses: actions/cache@v3 - with: - path: doc/_build - key: doc-build-v${{ env.RESET_DOC_BUILD_CACHE }}-${{ env.ANSYSMATH_VERSION }}-${{ github.sha }} - restore-keys: | - doc-build-v${{ env.RESET_DOC_BUILD_CACHE }}-${{ env.ANSYSMATH_VERSION }} - - - name: "Cache autosummary" - uses: actions/cache@v3 - with: - path: doc/source/**/_autosummary/*.rst - key: autosummary-v${{ env.RESET_AUTOSUMMARY_CACHE }}-${{ env.ANSYSMATH_VERSION }}-${{ github.sha }} - restore-keys: | - autosummary-v${{ env.RESET_AUTOSUMMARY_CACHE }}-${{ env.ANSYSMATH_VERSION }} + # - name: "Cache docs build directory" + # uses: actions/cache@v3 + # with: + # path: doc/_build + # key: doc-build-v${{ env.RESET_DOC_BUILD_CACHE }}-${{ env.ANSYSMATH_VERSION }}-${{ github.sha }} + # restore-keys: | + # doc-build-v${{ env.RESET_DOC_BUILD_CACHE }}-${{ env.ANSYSMATH_VERSION }} + + # - name: "Cache autosummary" + # uses: actions/cache@v3 + # with: + # path: doc/source/**/_autosummary/*.rst + # key: autosummary-v${{ env.RESET_AUTOSUMMARY_CACHE }}-${{ env.ANSYSMATH_VERSION }}-${{ github.sha }} + # restore-keys: | + # autosummary-v${{ env.RESET_AUTOSUMMARY_CACHE }}-${{ env.ANSYSMATH_VERSION }} - name: List run: pip list - - name: "Run Ansys documentation building action" - uses: ansys/actions/doc-build@v4 - with: - python-version: ${{ env.MAIN_PYTHON_VERSION }} - checkout: false - skip-install: true - sphinxopts: -j auto - requires-xvfb: true + # - name: "Run Ansys documentation building action" + # uses: ansys/actions/doc-build@v4 + # with: + # python-version: ${{ env.MAIN_PYTHON_VERSION }} + # checkout: false + # skip-install: true + # sphinxopts: -j auto + # requires-xvfb: true + - name: "Build documentation" + run: | + xvfb-run make -C doc html SPHINXOPTS="-j auto -W --keep-going" + + - name: "Upload HTML Documentation" + uses: actions/upload-artifact@v3 + with: + name: documentation-html + path: doc/_build/html + retention-days: 7 package: name: Package library From 18c64843c8fd25251aaacd066530062620561e19 Mon Sep 17 00:00:00 2001 From: Camille <78221213+clatapie@users.noreply.github.com> Date: Thu, 5 Oct 2023 11:01:31 +0200 Subject: [PATCH 05/38] maint: removing -W in sphinxopts --- .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 3a75e604..e072a3bc 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -304,7 +304,7 @@ jobs: - name: "Build documentation" run: | - xvfb-run make -C doc html SPHINXOPTS="-j auto -W --keep-going" + xvfb-run make -C doc html SPHINXOPTS="-j auto --keep-going" - name: "Upload HTML Documentation" uses: actions/upload-artifact@v3 From 80997eae1506014ac6e85313469f3a8d5a35cd6e Mon Sep 17 00:00:00 2001 From: Camille <78221213+clatapie@users.noreply.github.com> Date: Thu, 5 Oct 2023 11:42:33 +0200 Subject: [PATCH 06/38] maint: testing from where the issue is coming from --- .github/workflows/ci_cd.yml | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index e072a3bc..8e9afada 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -293,25 +293,25 @@ jobs: - name: List run: pip list - # - name: "Run Ansys documentation building action" - # uses: ansys/actions/doc-build@v4 - # with: - # python-version: ${{ env.MAIN_PYTHON_VERSION }} - # checkout: false - # skip-install: true - # sphinxopts: -j auto - # requires-xvfb: true + - name: "Run Ansys documentation building action" + uses: ansys/actions/doc-build@v4 + with: + python-version: ${{ env.MAIN_PYTHON_VERSION }} + checkout: false + skip-install: true + sphinxopts: -j auto + requires-xvfb: true - - name: "Build documentation" - run: | - xvfb-run make -C doc html SPHINXOPTS="-j auto --keep-going" + # - name: "Build documentation" + # run: | + # xvfb-run make -C doc html SPHINXOPTS="-j auto --keep-going" - - name: "Upload HTML Documentation" - uses: actions/upload-artifact@v3 - with: - name: documentation-html - path: doc/_build/html - retention-days: 7 + # - name: "Upload HTML Documentation" + # uses: actions/upload-artifact@v3 + # with: + # name: documentation-html + # path: doc/_build/html + # retention-days: 7 package: name: Package library From 20f6acaab7fb69dd182143494bdfb86dd73dbf24 Mon Sep 17 00:00:00 2001 From: Camille <78221213+clatapie@users.noreply.github.com> Date: Thu, 5 Oct 2023 12:46:10 +0200 Subject: [PATCH 07/38] maint: trying to fix cicd --- .github/workflows/ci_cd.yml | 47 +++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 25 deletions(-) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index 8e9afada..7ce5f958 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -226,27 +226,22 @@ jobs: - name: "Install Git and checkout project" uses: actions/checkout@v4 - - name: "Setup Python" - uses: actions/setup-python@v4 - with: - python-version: ${{ env.MAIN_PYTHON_VERSION }} - - - name: "Install OS packages" - run: | - sudo apt update - sudo apt-get install pandoc xvfb + # - name: "Install OS packages" + # run: | + # sudo apt update + # sudo apt-get install pandoc xvfb - - name: "Cache pip" - uses: actions/cache@v3 - with: - path: ~/.cache/pip - key: Python-v${{ env.RESET_PIP_CACHE }}-Linux-${{ env.MAIN_PYTHON_VERSION }}-${{ hashFiles('pyproject.toml') }} - restore-keys: | - Python-v${{ env.RESET_PIP_CACHE }}-Linux-${{ env.MAIN_PYTHON_VERSION }} + # - name: "Cache pip" + # uses: actions/cache@v3 + # with: + # path: ~/.cache/pip + # key: Python-v${{ env.RESET_PIP_CACHE }}-Linux-${{ env.MAIN_PYTHON_VERSION }}-${{ hashFiles('pyproject.toml') }} + # restore-keys: | + # Python-v${{ env.RESET_PIP_CACHE }}-Linux-${{ env.MAIN_PYTHON_VERSION }} - - name: "Install ansys-math-core and docs build requirements" - run: | - pip install .[doc] + # - name: "Install ansys-math-core and docs build requirements" + # run: | + # pip install .[doc] - name: "Login in Github container registry" uses: docker/login-action@v3.0.0 @@ -261,10 +256,10 @@ jobs: LICENSE_SERVER: ${{ secrets.LICENSE_SERVER }} MAPDL_IMAGE: '${{ env.DOCKER_PACKAGE }}:${{ env.DOCKER_IMAGE_VERSION_DOCS_BUILD }}' - - name: "Retrieve AnsysMath version" - run: | - echo "ANSYSMATH_VERSION=$(python -c 'from ansys.math.core import __version__; print(__version__)')" >> $GITHUB_ENV - echo "AnsysMath version is: $(python -c "from ansys.math.core import __version__; print(__version__)")" + # - name: "Retrieve AnsysMath version" + # run: | + # echo "ANSYSMATH_VERSION=$(python -c 'from ansys.math.core import __version__; print(__version__)')" >> $GITHUB_ENV + # echo "AnsysMath version is: $(python -c "from ansys.math.core import __version__; print(__version__)")" # - name: "Cache examples" # uses: actions/cache@v3 @@ -297,10 +292,12 @@ jobs: uses: ansys/actions/doc-build@v4 with: python-version: ${{ env.MAIN_PYTHON_VERSION }} - checkout: false - skip-install: true + skip-dependencies-cache: true sphinxopts: -j auto requires-xvfb: true + skip-json-build: true + checkout: false + # skip-install: true # - name: "Build documentation" # run: | From 7e6b106787326f2f0659a14edddefbe4e406599a Mon Sep 17 00:00:00 2001 From: Camille <78221213+clatapie@users.noreply.github.com> Date: Thu, 5 Oct 2023 13:00:22 +0200 Subject: [PATCH 08/38] maint: cleaning cicd and readding caches --- .github/workflows/ci_cd.yml | 83 +++++++++++-------------------------- 1 file changed, 24 insertions(+), 59 deletions(-) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index 7ce5f958..19d632a9 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -222,27 +222,9 @@ jobs: PYMAPDL_DB_PORT: 21001 # default won't work on GitHub runners PYMAPDL_START_INSTANCE: FALSE steps: - # This checkout is repeated later at the 'doc-build' action. This could be avoided by copything the sh file here, but introduces some code duplicity. - name: "Install Git and checkout project" uses: actions/checkout@v4 - # - name: "Install OS packages" - # run: | - # sudo apt update - # sudo apt-get install pandoc xvfb - - # - name: "Cache pip" - # uses: actions/cache@v3 - # with: - # path: ~/.cache/pip - # key: Python-v${{ env.RESET_PIP_CACHE }}-Linux-${{ env.MAIN_PYTHON_VERSION }}-${{ hashFiles('pyproject.toml') }} - # restore-keys: | - # Python-v${{ env.RESET_PIP_CACHE }}-Linux-${{ env.MAIN_PYTHON_VERSION }} - - # - name: "Install ansys-math-core and docs build requirements" - # run: | - # pip install .[doc] - - name: "Login in Github container registry" uses: docker/login-action@v3.0.0 with: @@ -256,34 +238,29 @@ jobs: LICENSE_SERVER: ${{ secrets.LICENSE_SERVER }} MAPDL_IMAGE: '${{ env.DOCKER_PACKAGE }}:${{ env.DOCKER_IMAGE_VERSION_DOCS_BUILD }}' - # - name: "Retrieve AnsysMath version" - # run: | - # echo "ANSYSMATH_VERSION=$(python -c 'from ansys.math.core import __version__; print(__version__)')" >> $GITHUB_ENV - # echo "AnsysMath version is: $(python -c "from ansys.math.core import __version__; print(__version__)")" - - # - name: "Cache examples" - # uses: actions/cache@v3 - # with: - # path: doc/source/examples - # key: Examples-v${{ env.RESET_EXAMPLES_CACHE }}-${{ env.ANSYSMATH_VERSION }}-${{ github.sha }} - # restore-keys: | - # Examples-v${{ env.RESET_EXAMPLES_CACHE }}-${{ env.ANSYSMATH_VERSION }} - - # - name: "Cache docs build directory" - # uses: actions/cache@v3 - # with: - # path: doc/_build - # key: doc-build-v${{ env.RESET_DOC_BUILD_CACHE }}-${{ env.ANSYSMATH_VERSION }}-${{ github.sha }} - # restore-keys: | - # doc-build-v${{ env.RESET_DOC_BUILD_CACHE }}-${{ env.ANSYSMATH_VERSION }} - - # - name: "Cache autosummary" - # uses: actions/cache@v3 - # with: - # path: doc/source/**/_autosummary/*.rst - # key: autosummary-v${{ env.RESET_AUTOSUMMARY_CACHE }}-${{ env.ANSYSMATH_VERSION }}-${{ github.sha }} - # restore-keys: | - # autosummary-v${{ env.RESET_AUTOSUMMARY_CACHE }}-${{ env.ANSYSMATH_VERSION }} + - name: "Cache examples" + uses: actions/cache@v3 + with: + path: doc/source/examples + key: Examples-v${{ env.RESET_EXAMPLES_CACHE }}-${{ env.ANSYSMATH_VERSION }}-${{ github.sha }} + restore-keys: | + Examples-v${{ env.RESET_EXAMPLES_CACHE }}-${{ env.ANSYSMATH_VERSION }} + + - name: "Cache docs build directory" + uses: actions/cache@v3 + with: + path: doc/_build + key: doc-build-v${{ env.RESET_DOC_BUILD_CACHE }}-${{ env.ANSYSMATH_VERSION }}-${{ github.sha }} + restore-keys: | + doc-build-v${{ env.RESET_DOC_BUILD_CACHE }}-${{ env.ANSYSMATH_VERSION }} + + - name: "Cache autosummary" + uses: actions/cache@v3 + with: + path: doc/source/**/_autosummary/*.rst + key: autosummary-v${{ env.RESET_AUTOSUMMARY_CACHE }}-${{ env.ANSYSMATH_VERSION }}-${{ github.sha }} + restore-keys: | + autosummary-v${{ env.RESET_AUTOSUMMARY_CACHE }}-${{ env.ANSYSMATH_VERSION }} - name: List run: pip list @@ -295,20 +272,8 @@ jobs: skip-dependencies-cache: true sphinxopts: -j auto requires-xvfb: true - skip-json-build: true checkout: false - # skip-install: true - - # - name: "Build documentation" - # run: | - # xvfb-run make -C doc html SPHINXOPTS="-j auto --keep-going" - - # - name: "Upload HTML Documentation" - # uses: actions/upload-artifact@v3 - # with: - # name: documentation-html - # path: doc/_build/html - # retention-days: 7 + package: name: Package library From 781134a734122d5935cc88f1fdc19ac2efe537fc Mon Sep 17 00:00:00 2001 From: Camille <78221213+clatapie@users.noreply.github.com> Date: Thu, 5 Oct 2023 13:37:23 +0200 Subject: [PATCH 09/38] maint: fixing cache --- .github/workflows/ci_cd.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index 19d632a9..b8d7dbdc 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -238,13 +238,13 @@ jobs: LICENSE_SERVER: ${{ secrets.LICENSE_SERVER }} MAPDL_IMAGE: '${{ env.DOCKER_PACKAGE }}:${{ env.DOCKER_IMAGE_VERSION_DOCS_BUILD }}' - - name: "Cache examples" - uses: actions/cache@v3 - with: - path: doc/source/examples - key: Examples-v${{ env.RESET_EXAMPLES_CACHE }}-${{ env.ANSYSMATH_VERSION }}-${{ github.sha }} - restore-keys: | - Examples-v${{ env.RESET_EXAMPLES_CACHE }}-${{ env.ANSYSMATH_VERSION }} + # - name: "Cache examples" + # uses: actions/cache@v3 + # with: + # path: doc/source/examples + # key: Examples-v${{ env.RESET_EXAMPLES_CACHE }}-${{ env.ANSYSMATH_VERSION }}-${{ github.sha }} + # restore-keys: | + # Examples-v${{ env.RESET_EXAMPLES_CACHE }}-${{ env.ANSYSMATH_VERSION }} - name: "Cache docs build directory" uses: actions/cache@v3 @@ -290,7 +290,7 @@ jobs: doc-deploy-dev: name: "Deploy development documentation" # Deploy development only when merging to main - # if: github.ref == 'refs/heads/main' This is commented for development purpose. Needs to be reactivated before merging. + if: github.ref == 'refs/heads/main' runs-on: ubuntu-latest needs: [package] steps: From 7bd5c7e5978559e58127523a76de611efad0b0d9 Mon Sep 17 00:00:00 2001 From: Camille <78221213+clatapie@users.noreply.github.com> Date: Thu, 5 Oct 2023 14:03:14 +0200 Subject: [PATCH 10/38] maint: fixing cache --- .github/workflows/ci_cd.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index b8d7dbdc..aa01298f 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -238,21 +238,21 @@ jobs: LICENSE_SERVER: ${{ secrets.LICENSE_SERVER }} MAPDL_IMAGE: '${{ env.DOCKER_PACKAGE }}:${{ env.DOCKER_IMAGE_VERSION_DOCS_BUILD }}' - # - name: "Cache examples" - # uses: actions/cache@v3 - # with: - # path: doc/source/examples - # key: Examples-v${{ env.RESET_EXAMPLES_CACHE }}-${{ env.ANSYSMATH_VERSION }}-${{ github.sha }} - # restore-keys: | - # Examples-v${{ env.RESET_EXAMPLES_CACHE }}-${{ env.ANSYSMATH_VERSION }} - - - name: "Cache docs build directory" + - name: "Cache examples" uses: actions/cache@v3 with: - path: doc/_build - key: doc-build-v${{ env.RESET_DOC_BUILD_CACHE }}-${{ env.ANSYSMATH_VERSION }}-${{ github.sha }} + path: doc/source/examples + key: Examples-v${{ env.RESET_EXAMPLES_CACHE }}-${{ env.ANSYSMATH_VERSION }}-${{ github.sha }} restore-keys: | - doc-build-v${{ env.RESET_DOC_BUILD_CACHE }}-${{ env.ANSYSMATH_VERSION }} + Examples-v${{ env.RESET_EXAMPLES_CACHE }}-${{ env.ANSYSMATH_VERSION }} + + # - name: "Cache docs build directory" + # uses: actions/cache@v3 + # with: + # path: doc/_build + # key: doc-build-v${{ env.RESET_DOC_BUILD_CACHE }}-${{ env.ANSYSMATH_VERSION }}-${{ github.sha }} + # restore-keys: | + # doc-build-v${{ env.RESET_DOC_BUILD_CACHE }}-${{ env.ANSYSMATH_VERSION }} - name: "Cache autosummary" uses: actions/cache@v3 From 7a80e84152d66b51efbe2021c0f89f134cd1afd5 Mon Sep 17 00:00:00 2001 From: Camille <78221213+clatapie@users.noreply.github.com> Date: Thu, 5 Oct 2023 14:15:44 +0200 Subject: [PATCH 11/38] maint: deploy dev doc --- .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 aa01298f..c2f11096 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -290,7 +290,7 @@ jobs: doc-deploy-dev: name: "Deploy development documentation" # Deploy development only when merging to main - if: github.ref == 'refs/heads/main' + # if: github.ref == 'refs/heads/main' Need to be readded before merging! runs-on: ubuntu-latest needs: [package] steps: From 124410ad9b51c78be2a0f6635b80db2d4f67e47a Mon Sep 17 00:00:00 2001 From: Camille <78221213+clatapie@users.noreply.github.com> Date: Thu, 5 Oct 2023 14:55:25 +0200 Subject: [PATCH 12/38] maint: fixing cache --- .github/workflows/ci_cd.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index c2f11096..45a44c86 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -242,25 +242,25 @@ jobs: uses: actions/cache@v3 with: path: doc/source/examples - key: Examples-v${{ env.RESET_EXAMPLES_CACHE }}-${{ env.ANSYSMATH_VERSION }}-${{ github.sha }} + key: Examples-v${{ env.RESET_EXAMPLES_CACHE }}-${{ github.sha }} restore-keys: | - Examples-v${{ env.RESET_EXAMPLES_CACHE }}-${{ env.ANSYSMATH_VERSION }} + Examples-v${{ env.RESET_EXAMPLES_CACHE }}- - # - name: "Cache docs build directory" - # uses: actions/cache@v3 - # with: - # path: doc/_build - # key: doc-build-v${{ env.RESET_DOC_BUILD_CACHE }}-${{ env.ANSYSMATH_VERSION }}-${{ github.sha }} - # restore-keys: | - # doc-build-v${{ env.RESET_DOC_BUILD_CACHE }}-${{ env.ANSYSMATH_VERSION }} + - name: "Cache docs build directory" + uses: actions/cache@v3 + with: + path: doc/_build + key: doc-build-v${{ env.RESET_DOC_BUILD_CACHE }}-${{ github.sha }} + restore-keys: | + doc-build-v${{ env.RESET_DOC_BUILD_CACHE }} - name: "Cache autosummary" uses: actions/cache@v3 with: path: doc/source/**/_autosummary/*.rst - key: autosummary-v${{ env.RESET_AUTOSUMMARY_CACHE }}-${{ env.ANSYSMATH_VERSION }}-${{ github.sha }} + key: autosummary-v${{ env.RESET_AUTOSUMMARY_CACHE }}-${{ github.sha }} restore-keys: | - autosummary-v${{ env.RESET_AUTOSUMMARY_CACHE }}-${{ env.ANSYSMATH_VERSION }} + autosummary-v${{ env.RESET_AUTOSUMMARY_CACHE }} - name: List run: pip list From 7a5feb1d63d1e260550f3ae0a32dae216114e5a9 Mon Sep 17 00:00:00 2001 From: Camille <78221213+clatapie@users.noreply.github.com> Date: Thu, 5 Oct 2023 15:07:28 +0200 Subject: [PATCH 13/38] maint: removing all caches --- .github/workflows/ci_cd.yml | 46 ++++++++++++++++++------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index 45a44c86..084c1c04 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -238,29 +238,29 @@ jobs: LICENSE_SERVER: ${{ secrets.LICENSE_SERVER }} MAPDL_IMAGE: '${{ env.DOCKER_PACKAGE }}:${{ env.DOCKER_IMAGE_VERSION_DOCS_BUILD }}' - - name: "Cache examples" - uses: actions/cache@v3 - with: - path: doc/source/examples - key: Examples-v${{ env.RESET_EXAMPLES_CACHE }}-${{ github.sha }} - restore-keys: | - Examples-v${{ env.RESET_EXAMPLES_CACHE }}- - - - name: "Cache docs build directory" - uses: actions/cache@v3 - with: - path: doc/_build - key: doc-build-v${{ env.RESET_DOC_BUILD_CACHE }}-${{ github.sha }} - restore-keys: | - doc-build-v${{ env.RESET_DOC_BUILD_CACHE }} - - - name: "Cache autosummary" - uses: actions/cache@v3 - with: - path: doc/source/**/_autosummary/*.rst - key: autosummary-v${{ env.RESET_AUTOSUMMARY_CACHE }}-${{ github.sha }} - restore-keys: | - autosummary-v${{ env.RESET_AUTOSUMMARY_CACHE }} + # - name: "Cache examples" + # uses: actions/cache@v3 + # with: + # path: doc/source/examples + # key: Examples-v${{ env.RESET_EXAMPLES_CACHE }}-${{ github.sha }} + # restore-keys: | + # Examples-v${{ env.RESET_EXAMPLES_CACHE }}- + + # - name: "Cache docs build directory" + # uses: actions/cache@v3 + # with: + # path: doc/_build + # key: doc-build-v${{ env.RESET_DOC_BUILD_CACHE }}-${{ github.sha }} + # restore-keys: | + # doc-build-v${{ env.RESET_DOC_BUILD_CACHE }} + + # - name: "Cache autosummary" + # uses: actions/cache@v3 + # with: + # path: doc/source/**/_autosummary/*.rst + # key: autosummary-v${{ env.RESET_AUTOSUMMARY_CACHE }}-${{ github.sha }} + # restore-keys: | + # autosummary-v${{ env.RESET_AUTOSUMMARY_CACHE }} - name: List run: pip list From 5097d1a8c8fbfade8a12d3339b2cc262b0fd8de0 Mon Sep 17 00:00:00 2001 From: Camille <78221213+clatapie@users.noreply.github.com> Date: Thu, 5 Oct 2023 15:59:34 +0200 Subject: [PATCH 14/38] maint: fixing cicd --- .github/workflows/ci_cd.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index 084c1c04..ddda16c7 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -272,6 +272,7 @@ jobs: skip-dependencies-cache: true sphinxopts: -j auto requires-xvfb: true + skip-json-build: true checkout: false From 6ee204491c586e7ddfec077627f89e6ea87d5c62 Mon Sep 17 00:00:00 2001 From: Camille <78221213+clatapie@users.noreply.github.com> Date: Thu, 5 Oct 2023 16:55:56 +0200 Subject: [PATCH 15/38] maint: fixing dependencies --- .github/workflows/ci_cd.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index ddda16c7..d80dd152 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -274,6 +274,7 @@ jobs: requires-xvfb: true skip-json-build: true checkout: false + dependencies: 'pandoc' package: From ee9c2ca5b03cdc63e113349c29d6af30baae9a27 Mon Sep 17 00:00:00 2001 From: Camille <78221213+clatapie@users.noreply.github.com> Date: Fri, 6 Oct 2023 09:53:37 +0200 Subject: [PATCH 16/38] maint: trying to fix DynamicScrapper --- .github/workflows/ci_cd.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index d80dd152..0ef9024c 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -20,10 +20,10 @@ env: PYMAPDL_START_INSTANCE: FALSE PYMAPDL_PORT: 21000 # default won't work on GitHub runners PYMAPDL_DB_PORT: 21001 # default won't work on GitHub runners - RESET_AUTOSUMMARY_CACHE: 1 - RESET_EXAMPLES_CACHE: 1 - RESET_DOC_BUILD_CACHE: 1 RESET_PIP_CACHE: 1 + # RESET_AUTOSUMMARY_CACHE: 1 + # RESET_EXAMPLES_CACHE: 1 + # RESET_DOC_BUILD_CACHE: 1 concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -269,12 +269,13 @@ jobs: uses: ansys/actions/doc-build@v4 with: python-version: ${{ env.MAIN_PYTHON_VERSION }} - skip-dependencies-cache: true + skip-install: false + checkout: false + dependencies: 'pandoc' + skip-dependencies-cache: false sphinxopts: -j auto requires-xvfb: true skip-json-build: true - checkout: false - dependencies: 'pandoc' package: From 6742654a21596d0224ec62bb0cad1c8c35c9e38a Mon Sep 17 00:00:00 2001 From: Camille <78221213+clatapie@users.noreply.github.com> Date: Fri, 6 Oct 2023 11:06:48 +0200 Subject: [PATCH 17/38] maint: attempt to fix cicd --- .github/workflows/ci_cd.yml | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index 0ef9024c..7102c115 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -224,6 +224,11 @@ jobs: steps: - name: "Install Git and checkout project" uses: actions/checkout@v4 + + - name: "Install os packages" + run: | + sudo apt update + sudo apt-get install pandoc - name: "Login in Github container registry" uses: docker/login-action@v3.0.0 @@ -271,11 +276,20 @@ jobs: python-version: ${{ env.MAIN_PYTHON_VERSION }} skip-install: false checkout: false - dependencies: 'pandoc' - skip-dependencies-cache: false - sphinxopts: -j auto + sphinxopts: -j auto --keep-going requires-xvfb: true skip-json-build: true + + - name: "Build documentation" + run: | + xvfb-run make -C doc html SPHINXOPTS="-j auto --keep-going" + + - name: "Upload HTML Documentation" + uses: actions/upload-artifact@v3 + with: + name: documentation-html + path: doc/_build/html + retention-days: 7 package: From fb436a20988150fbc16447c8e5994ad07e2382db Mon Sep 17 00:00:00 2001 From: Camille <78221213+clatapie@users.noreply.github.com> Date: Fri, 6 Oct 2023 11:10:14 +0200 Subject: [PATCH 18/38] fix: typo in cicd --- .github/workflows/ci_cd.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index 7102c115..dea3e6ca 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -280,16 +280,16 @@ jobs: requires-xvfb: true skip-json-build: true - - name: "Build documentation" - run: | - xvfb-run make -C doc html SPHINXOPTS="-j auto --keep-going" + # - name: "Build documentation" + # run: | + # xvfb-run make -C doc html SPHINXOPTS="-j auto --keep-going" - - name: "Upload HTML Documentation" - uses: actions/upload-artifact@v3 - with: - name: documentation-html - path: doc/_build/html - retention-days: 7 + # - name: "Upload HTML Documentation" + # uses: actions/upload-artifact@v3 + # with: + # name: documentation-html + # path: doc/_build/html + # retention-days: 7 package: From 5aa74ab9e3e6f113e2f52b6b08e9967f67a72f4d Mon Sep 17 00:00:00 2001 From: Camille <78221213+clatapie@users.noreply.github.com> Date: Fri, 6 Oct 2023 11:30:21 +0200 Subject: [PATCH 19/38] maint: installing `ansys-math-core` before validating MAPDL service --- .github/workflows/ci_cd.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index dea3e6ca..6e60b4de 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -224,11 +224,20 @@ jobs: steps: - name: "Install Git and checkout project" uses: actions/checkout@v4 + + - name: "Setup Python" + uses: actions/setup-python@v4 + with: + python-version: ${{ env.MAIN_PYTHON_VERSION }} - name: "Install os packages" run: | sudo apt update sudo apt-get install pandoc + + - name: "Install ansys-math-core" + run: | + pip install . - name: "Login in Github container registry" uses: docker/login-action@v3.0.0 @@ -274,7 +283,7 @@ jobs: uses: ansys/actions/doc-build@v4 with: python-version: ${{ env.MAIN_PYTHON_VERSION }} - skip-install: false + skip-install: true checkout: false sphinxopts: -j auto --keep-going requires-xvfb: true From 4ca17b33b4eb7553dd610785a8be69ec70d315db Mon Sep 17 00:00:00 2001 From: Camille <78221213+clatapie@users.noreply.github.com> Date: Fri, 6 Oct 2023 11:53:53 +0200 Subject: [PATCH 20/38] maint: removing ansys/actions --- .github/workflows/ci_cd.yml | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index 6e60b4de..632c0aa9 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -279,26 +279,26 @@ jobs: - name: List run: pip list - - name: "Run Ansys documentation building action" - uses: ansys/actions/doc-build@v4 - with: - python-version: ${{ env.MAIN_PYTHON_VERSION }} - skip-install: true - checkout: false - sphinxopts: -j auto --keep-going - requires-xvfb: true - skip-json-build: true + # - name: "Run Ansys documentation building action" + # uses: ansys/actions/doc-build@v4 + # with: + # python-version: ${{ env.MAIN_PYTHON_VERSION }} + # skip-install: true + # checkout: false + # sphinxopts: -j auto --keep-going + # requires-xvfb: true + # skip-json-build: true - # - name: "Build documentation" - # run: | - # xvfb-run make -C doc html SPHINXOPTS="-j auto --keep-going" + - name: "Build documentation" + run: | + xvfb-run make -C doc html SPHINXOPTS="-j auto --keep-going" - # - name: "Upload HTML Documentation" - # uses: actions/upload-artifact@v3 - # with: - # name: documentation-html - # path: doc/_build/html - # retention-days: 7 + - name: "Upload HTML Documentation" + uses: actions/upload-artifact@v3 + with: + name: documentation-html + path: doc/_build/html + retention-days: 7 package: From 03594e3c00125cbd7c285a1d1d62103cc7ba5f34 Mon Sep 17 00:00:00 2001 From: Camille <78221213+clatapie@users.noreply.github.com> Date: Fri, 6 Oct 2023 12:00:26 +0200 Subject: [PATCH 21/38] maint: adding doc requirements in cicd --- .github/workflows/ci_cd.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index 632c0aa9..16ecbb7f 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -235,9 +235,9 @@ jobs: sudo apt update sudo apt-get install pandoc - - name: "Install ansys-math-core" + - name: "Install ansys-math-core and documentation requirements" run: | - pip install . + pip install .[doc] - name: "Login in Github container registry" uses: docker/login-action@v3.0.0 From 8d64694f77071e031d5dfbdcb90ace02b3883cb2 Mon Sep 17 00:00:00 2001 From: Camille <78221213+clatapie@users.noreply.github.com> Date: Fri, 6 Oct 2023 15:12:47 +0200 Subject: [PATCH 22/38] maint: readding caches --- .github/workflows/ci_cd.yml | 48 ++++++++++++++++++------------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index 16ecbb7f..6969823c 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -21,9 +21,9 @@ env: PYMAPDL_PORT: 21000 # default won't work on GitHub runners PYMAPDL_DB_PORT: 21001 # default won't work on GitHub runners RESET_PIP_CACHE: 1 - # RESET_AUTOSUMMARY_CACHE: 1 - # RESET_EXAMPLES_CACHE: 1 - # RESET_DOC_BUILD_CACHE: 1 + RESET_AUTOSUMMARY_CACHE: 1 + RESET_EXAMPLES_CACHE: 1 + RESET_DOC_BUILD_CACHE: 1 concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -252,29 +252,29 @@ jobs: LICENSE_SERVER: ${{ secrets.LICENSE_SERVER }} MAPDL_IMAGE: '${{ env.DOCKER_PACKAGE }}:${{ env.DOCKER_IMAGE_VERSION_DOCS_BUILD }}' - # - name: "Cache examples" - # uses: actions/cache@v3 - # with: - # path: doc/source/examples - # key: Examples-v${{ env.RESET_EXAMPLES_CACHE }}-${{ github.sha }} - # restore-keys: | - # Examples-v${{ env.RESET_EXAMPLES_CACHE }}- + - name: "Cache examples" + uses: actions/cache@v3 + with: + path: doc/source/examples + key: Examples-v${{ env.RESET_EXAMPLES_CACHE }}-${{ github.sha }} + restore-keys: | + Examples-v${{ env.RESET_EXAMPLES_CACHE }}- - # - name: "Cache docs build directory" - # uses: actions/cache@v3 - # with: - # path: doc/_build - # key: doc-build-v${{ env.RESET_DOC_BUILD_CACHE }}-${{ github.sha }} - # restore-keys: | - # doc-build-v${{ env.RESET_DOC_BUILD_CACHE }} + - name: "Cache docs build directory" + uses: actions/cache@v3 + with: + path: doc/_build + key: doc-build-v${{ env.RESET_DOC_BUILD_CACHE }}-${{ github.sha }} + restore-keys: | + doc-build-v${{ env.RESET_DOC_BUILD_CACHE }} - # - name: "Cache autosummary" - # uses: actions/cache@v3 - # with: - # path: doc/source/**/_autosummary/*.rst - # key: autosummary-v${{ env.RESET_AUTOSUMMARY_CACHE }}-${{ github.sha }} - # restore-keys: | - # autosummary-v${{ env.RESET_AUTOSUMMARY_CACHE }} + - name: "Cache autosummary" + uses: actions/cache@v3 + with: + path: doc/source/**/_autosummary/*.rst + key: autosummary-v${{ env.RESET_AUTOSUMMARY_CACHE }}-${{ github.sha }} + restore-keys: | + autosummary-v${{ env.RESET_AUTOSUMMARY_CACHE }} - name: List run: pip list From 9e46c396d819a5ce83c384d5d36f29e598793e14 Mon Sep 17 00:00:00 2001 From: Camille <78221213+clatapie@users.noreply.github.com> Date: Fri, 6 Oct 2023 17:15:35 +0200 Subject: [PATCH 23/38] fix: resetting caches --- .github/workflows/ci_cd.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index 6969823c..74fa3d4c 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -20,10 +20,10 @@ env: PYMAPDL_START_INSTANCE: FALSE PYMAPDL_PORT: 21000 # default won't work on GitHub runners PYMAPDL_DB_PORT: 21001 # default won't work on GitHub runners - RESET_PIP_CACHE: 1 - RESET_AUTOSUMMARY_CACHE: 1 - RESET_EXAMPLES_CACHE: 1 - RESET_DOC_BUILD_CACHE: 1 + RESET_PIP_CACHE: 10 + RESET_AUTOSUMMARY_CACHE: 10 + RESET_EXAMPLES_CACHE: 10 + RESET_DOC_BUILD_CACHE: 10 concurrency: group: ${{ github.workflow }}-${{ github.ref }} From 906f8e375782c5854c517288865a533e33e79b18 Mon Sep 17 00:00:00 2001 From: Camille <78221213+clatapie@users.noreply.github.com> Date: Wed, 21 Feb 2024 11:24:19 +0100 Subject: [PATCH 24/38] maint: updating PyVista dependency --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 6b654041..e7956753 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,7 +43,7 @@ tests = [ "pytest==7.4.3", "pytest-cov==4.1.0", "pytest-rerunfailures==12.0", - "pyvista==0.42.3", + "pyvista==0.43.3", "vtk==9.2.6", ] doc = [ @@ -56,7 +56,7 @@ doc = [ "numpydoc==1.6.0", "pypandoc==1.12", "pytest-sphinx==0.5.0", - "pyvista[jupyter,trame]==0.42.2", + "pyvista[jupyter,trame]==0.43.3", "scipy==1.11.3", "sphinx-autobuild==2021.3.14", "sphinx-autodoc-typehints==1.24.0", From ddcfbc3ac9ac04f342db67ce1b95aadfa4029f78 Mon Sep 17 00:00:00 2001 From: Camille <78221213+clatapie@users.noreply.github.com> Date: Wed, 21 Feb 2024 11:35:17 +0100 Subject: [PATCH 25/38] fix: typo in CICD --- .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 85a8127f..6fedf8b9 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -243,7 +243,7 @@ jobs: restore-keys: | Python-v${{ env.RESET_PIP_CACHE }}-Linux-${{ env.MAIN_PYTHON_VERSION }} - - name: "Install ansys-math-core and documentation requirements"" + - name: "Install ansys-math-core and documentation requirements" run: | pip install .[doc] From d9669b2353cad68e7b55e00e35b9d3611da33226 Mon Sep 17 00:00:00 2001 From: Camille <78221213+clatapie@users.noreply.github.com> Date: Wed, 21 Feb 2024 11:45:03 +0100 Subject: [PATCH 26/38] fix: `actions/upload-artifact` to v4 --- .github/workflows/ci_cd.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index 6fedf8b9..e8d93c09 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -45,14 +45,14 @@ jobs: name: "Documentation Style Check" runs-on: ubuntu-latest steps: - - name: PyAnsys documentation style checks + - name: "PyAnsys documentation style checks" uses: ansys/actions/doc-style@v5 with: token: ${{ secrets.GITHUB_TOKEN }} smoke-tests: - name: Build and Smoke tests + name: "Build and Smoke tests" runs-on: ${{ matrix.os }} needs: [code-style] strategy: @@ -69,7 +69,7 @@ jobs: - should-release: false os: windows-latest steps: - - name: Build wheelhouse and perform smoke test + - name: "Build wheelhouse and perform smoke test" uses: ansys/actions/build-wheelhouse@v5 with: library-name: ${{ env.PACKAGE_NAME }} @@ -107,7 +107,7 @@ jobs: restore-keys: | Python-v${{ env.RESET_PIP_CACHE }}-${{ runner.os }}-${{ matrix.mapdl-version }} - - name: Install ansys-mapdl-core + - name: "Install ansys-mapdl-core" run: | python -m pip install ansys-mapdl-core @@ -149,7 +149,7 @@ jobs: name: ${{ matrix.mapdl-version }}-remote.xml flags: remote,${{ matrix.mapdl-version }} - - name: Upload coverage artifacts + - name: "Upload coverage artifacts" uses: actions/upload-artifact@v4 with: name: ${{ matrix.mapdl-version }}-remote.xml @@ -214,7 +214,7 @@ jobs: doc-build: - name: Doc building + name: "Doc building" runs-on: ubuntu-latest needs: [doc-style] env: @@ -284,7 +284,7 @@ jobs: restore-keys: | autosummary-v${{ env.RESET_AUTOSUMMARY_CACHE }} - - name: List + - name: "List installed packages" run: pip list # - name: "Run Ansys documentation building action" @@ -302,7 +302,7 @@ jobs: xvfb-run make -C doc html SPHINXOPTS="-j auto --keep-going" - name: "Upload HTML Documentation" - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: documentation-html path: doc/_build/html @@ -310,11 +310,11 @@ jobs: package: - name: Package library + name: "Package library" needs: [doc-build, build-test] runs-on: ubuntu-latest steps: - - name: Build library source and wheel artifacts + - name: "Build library source and wheel artifacts" uses: ansys/actions/build-library@v5 with: library-name: ${{ env.PACKAGE_NAME }} From eb6e549540f934e58aec7c469ab9f2bca76871f8 Mon Sep 17 00:00:00 2001 From: Camille <78221213+clatapie@users.noreply.github.com> Date: Wed, 21 Feb 2024 12:25:12 +0100 Subject: [PATCH 27/38] maint: readding `DynamicScraper` in `conf.py` --- doc/source/_static/README.md | 0 doc/source/conf.py | 3 ++- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 doc/source/_static/README.md diff --git a/doc/source/_static/README.md b/doc/source/_static/README.md new file mode 100644 index 00000000..e69de29b diff --git a/doc/source/conf.py b/doc/source/conf.py index 162b8102..d8aa6da9 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -7,6 +7,7 @@ from ansys_sphinx_theme import ansys_favicon, get_version_match, pyansys_logo_black import numpy as np import pyvista +from pyvista.plotting.utilities.sphinx_gallery import DynamicScraper from sphinx_gallery.sorting import FileNameSortKey from ansys.math.core import __version__ @@ -114,7 +115,7 @@ "backreferences_dir": None, # Modules for which function level galleries are created. In "doc_module": "ansys-math-core", - "image_scrapers": ("pyvista", "matplotlib"), + "image_scrapers": (DynamicScraper(), "matplotlib"), "ignore_pattern": "flycheck*", "thumbnail_size": (350, 350), } From 1242367e22e9986f19354903cee2ebaceedf0ceb Mon Sep 17 00:00:00 2001 From: Camille <78221213+clatapie@users.noreply.github.com> Date: Wed, 21 Feb 2024 12:30:25 +0100 Subject: [PATCH 28/38] fix: adding `sphinx-design` dependency --- doc/source/conf.py | 1 + pyproject.toml | 1 + 2 files changed, 2 insertions(+) diff --git a/doc/source/conf.py b/doc/source/conf.py index d8aa6da9..42ba9324 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -93,6 +93,7 @@ "sphinx.ext.coverage", "sphinx.ext.intersphinx", "sphinx_copybutton", + "sphinx_design", "sphinx_gallery.gen_gallery", "pyvista.ext.viewer_directive", ] diff --git a/pyproject.toml b/pyproject.toml index 0e4b582b..dcf16985 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -61,6 +61,7 @@ doc = [ "sphinx-autobuild==2024.2.4", "sphinx-autodoc-typehints==2.0.0", "sphinx-copybutton==0.5.2", + "sphinx-design==0.5.0", "sphinx-notfound-page==1.0.0", "sphinx-gallery==0.15.0", "trame==3.5.2", From 99be27f1f16f74124bc1aa7ea948ce467de93b7c Mon Sep 17 00:00:00 2001 From: Camille <78221213+clatapie@users.noreply.github.com> Date: Wed, 21 Feb 2024 14:18:30 +0100 Subject: [PATCH 29/38] maint: resetting caches --- .github/workflows/ci_cd.yml | 8 ++++---- doc/source/_static/README.rst | 0 2 files changed, 4 insertions(+), 4 deletions(-) delete mode 100644 doc/source/_static/README.rst diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index e8d93c09..55237809 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -20,10 +20,10 @@ env: PYMAPDL_START_INSTANCE: FALSE PYMAPDL_PORT: 21000 # default won't work on GitHub runners PYMAPDL_DB_PORT: 21001 # default won't work on GitHub runners - RESET_PIP_CACHE: 10 - RESET_AUTOSUMMARY_CACHE: 10 - RESET_EXAMPLES_CACHE: 10 - RESET_DOC_BUILD_CACHE: 10 + RESET_PIP_CACHE: 1 + RESET_AUTOSUMMARY_CACHE: 1 + RESET_EXAMPLES_CACHE: 1 + RESET_DOC_BUILD_CACHE: 1 concurrency: group: ${{ github.workflow }}-${{ github.ref }} diff --git a/doc/source/_static/README.rst b/doc/source/_static/README.rst deleted file mode 100644 index e69de29b..00000000 From 151e2b6c256d078f09ed3591c44e222e0b63be76 Mon Sep 17 00:00:00 2001 From: Camille <78221213+clatapie@users.noreply.github.com> Date: Wed, 21 Feb 2024 14:20:57 +0100 Subject: [PATCH 30/38] maint: removing `pyvista.FIGURE_PATH` --- doc/source/conf.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/doc/source/conf.py b/doc/source/conf.py index 42ba9324..a7dad7e0 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -19,11 +19,6 @@ # must be less than or equal to the XVFB window size pyvista.global_theme.window_size = np.array([1024, 768]) -# Save figures in specified directory -pyvista.FIGURE_PATH = os.path.join(os.path.abspath("./images/"), "auto-generated/") -if not os.path.exists(pyvista.FIGURE_PATH): - os.makedirs(pyvista.FIGURE_PATH) - # necessary when building the sphinx gallery pyvista.BUILDING_GALLERY = True pymath.BUILDING_GALLERY = True From 96de5eb91cbae6fd1410af155a4b5bc52e198785 Mon Sep 17 00:00:00 2001 From: Camille <78221213+clatapie@users.noreply.github.com> Date: Wed, 21 Feb 2024 14:50:36 +0100 Subject: [PATCH 31/38] maint: cleaning up CICD --- .github/workflows/ci_cd.yml | 36 +++++++++--------------------------- 1 file changed, 9 insertions(+), 27 deletions(-) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index 55237809..651dd64c 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -229,11 +229,6 @@ jobs: uses: actions/setup-python@v5 with: python-version: ${{ env.MAIN_PYTHON_VERSION }} - - - name: "Install os packages" - run: | - sudo apt update - sudo apt install pandoc - name: "Cache pip" uses: actions/cache@v4 @@ -284,29 +279,16 @@ jobs: restore-keys: | autosummary-v${{ env.RESET_AUTOSUMMARY_CACHE }} - - name: "List installed packages" - run: pip list - - # - name: "Run Ansys documentation building action" - # uses: ansys/actions/doc-build@v4 - # with: - # python-version: ${{ env.MAIN_PYTHON_VERSION }} - # skip-install: true - # checkout: false - # sphinxopts: -j auto --keep-going - # requires-xvfb: true - # skip-json-build: true - - - name: "Build documentation" - run: | - xvfb-run make -C doc html SPHINXOPTS="-j auto --keep-going" - - - name: "Upload HTML Documentation" - uses: actions/upload-artifact@v4 + - name: "Run Ansys documentation building action" + uses: ansys/actions/doc-build@v4 with: - name: documentation-html - path: doc/_build/html - retention-days: 7 + python-version: ${{ env.MAIN_PYTHON_VERSION }} + skip-install: true + checkout: false + sphinxopts: -j auto --keep-going + requires-xvfb: true + skip-json-build: true + dependencies: pandoc package: From e0c28b3a0a2d867d019408f27768f6dca487950d Mon Sep 17 00:00:00 2001 From: Camille <78221213+clatapie@users.noreply.github.com> Date: Wed, 21 Feb 2024 14:52:21 +0100 Subject: [PATCH 32/38] maint: resetting caches --- .github/workflows/ci_cd.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index 651dd64c..dd7777c7 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -20,10 +20,10 @@ env: PYMAPDL_START_INSTANCE: FALSE PYMAPDL_PORT: 21000 # default won't work on GitHub runners PYMAPDL_DB_PORT: 21001 # default won't work on GitHub runners - RESET_PIP_CACHE: 1 - RESET_AUTOSUMMARY_CACHE: 1 - RESET_EXAMPLES_CACHE: 1 - RESET_DOC_BUILD_CACHE: 1 + RESET_PIP_CACHE: 0 + RESET_AUTOSUMMARY_CACHE: 0 + RESET_EXAMPLES_CACHE: 0 + RESET_DOC_BUILD_CACHE: 0 concurrency: group: ${{ github.workflow }}-${{ github.ref }} From 0330c97fc9fbbd80165e25e7952917a49831380b Mon Sep 17 00:00:00 2001 From: Camille <78221213+clatapie@users.noreply.github.com> Date: Wed, 21 Feb 2024 15:28:42 +0100 Subject: [PATCH 33/38] maint: updating actions/doc-build to `v5` --- .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 dd7777c7..ef48de3c 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -280,7 +280,7 @@ jobs: autosummary-v${{ env.RESET_AUTOSUMMARY_CACHE }} - name: "Run Ansys documentation building action" - uses: ansys/actions/doc-build@v4 + uses: ansys/actions/doc-build@v5 with: python-version: ${{ env.MAIN_PYTHON_VERSION }} skip-install: true From 24a3de093ad18e8aca4deec3cb77f6e192430c41 Mon Sep 17 00:00:00 2001 From: Camille <78221213+clatapie@users.noreply.github.com> Date: Wed, 21 Feb 2024 15:51:47 +0100 Subject: [PATCH 34/38] Update .github/workflows/ci_cd.yml Co-authored-by: Roberto Pastor Muela <37798125+RobPasMue@users.noreply.github.com> --- .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 ef48de3c..1ec9d92c 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -306,7 +306,7 @@ jobs: doc-deploy-dev: name: "Deploy development documentation" # Deploy development only when merging to main - # if: github.ref == 'refs/heads/main' Need to be readded before merging! + if: github.ref == 'refs/heads/main' runs-on: ubuntu-latest needs: [package] steps: From 62118c02d3d3842cbf6efd11881d723992634df8 Mon Sep 17 00:00:00 2001 From: Camille <78221213+clatapie@users.noreply.github.com> Date: Wed, 21 Feb 2024 16:10:20 +0100 Subject: [PATCH 35/38] maint: reverting some changes in CICD --- .github/workflows/ci_cd.yml | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index ef48de3c..af280e3f 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -255,29 +255,35 @@ jobs: LICENSE_SERVER: ${{ secrets.LICENSE_SERVER }} MAPDL_IMAGE: '${{ env.DOCKER_PACKAGE }}:${{ env.DOCKER_IMAGE_VERSION_DOCS_BUILD }}' + - name: "Retrieve AnsysMath version" + run: | + echo "ANSYSMATH_VERSION=$(python -c 'from ansys.math.core import __version__; print(__version__)')" >> $GITHUB_ENV + echo "AnsysMath version is: $(python -c "from ansys.math.core import __version__; print(__version__)")" + - name: "Cache examples" uses: actions/cache@v4 with: path: doc/source/examples - key: Examples-v${{ env.RESET_EXAMPLES_CACHE }}-${{ github.sha }} + key: Examples-v${{ env.RESET_EXAMPLES_CACHE }}-${{ env.ANSYSMATH_VERSION }}-${{ github.sha }} restore-keys: | - Examples-v${{ env.RESET_EXAMPLES_CACHE }}- + Examples-v${{ env.RESET_EXAMPLES_CACHE }}-${{ env.ANSYSMATH_VERSION }} - name: "Cache docs build directory" uses: actions/cache@v4 with: path: doc/_build - key: doc-build-v${{ env.RESET_DOC_BUILD_CACHE }}-${{ github.sha }} + key: doc-build-v${{ env.RESET_DOC_BUILD_CACHE }}-${{ env.ANSYSMATH_VERSION }}-${{ github.sha }} restore-keys: | - doc-build-v${{ env.RESET_DOC_BUILD_CACHE }} + doc-build-v${{ env.RESET_DOC_BUILD_CACHE }}-${{ env.ANSYSMATH_VERSION }} + - name: "Cache autosummary" uses: actions/cache@v4 with: path: doc/source/**/_autosummary/*.rst - key: autosummary-v${{ env.RESET_AUTOSUMMARY_CACHE }}-${{ github.sha }} + key: autosummary-v${{ env.RESET_AUTOSUMMARY_CACHE }}-${{ env.ANSYSMATH_VERSION }}-${{ github.sha }} restore-keys: | - autosummary-v${{ env.RESET_AUTOSUMMARY_CACHE }} + autosummary-v${{ env.RESET_AUTOSUMMARY_CACHE }}-${{ env.ANSYSMATH_VERSION }} - name: "Run Ansys documentation building action" uses: ansys/actions/doc-build@v5 From 21a9ec6c48404f719bdcc7e1ae3ed2b1eb7cf26b Mon Sep 17 00:00:00 2001 From: Camille <78221213+clatapie@users.noreply.github.com> Date: Wed, 21 Feb 2024 16:55:40 +0100 Subject: [PATCH 36/38] maint: fix version output --- .github/workflows/ci_cd.yml | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index e1abe156..cf2ac0da 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -217,6 +217,8 @@ jobs: name: "Doc building" runs-on: ubuntu-latest needs: [doc-style] + outputs: + ANSYSMATH_VERSION: ${{ steps.version.outputs.ANSYSMATH_VERSION }} env: PYMAPDL_PORT: 21000 # default won't work on GitHub runners PYMAPDL_DB_PORT: 21001 # default won't work on GitHub runners @@ -257,33 +259,33 @@ jobs: - name: "Retrieve AnsysMath version" run: | - echo "ANSYSMATH_VERSION=$(python -c 'from ansys.math.core import __version__; print(__version__)')" >> $GITHUB_ENV + echo "ANSYSMATH_VERSION=$(python -c 'from ansys.math.core import __version__; print(__version__)')" >> $>> $GITHUB_OUTPUT echo "AnsysMath version is: $(python -c "from ansys.math.core import __version__; print(__version__)")" - name: "Cache examples" uses: actions/cache@v4 with: path: doc/source/examples - key: Examples-v${{ env.RESET_EXAMPLES_CACHE }}-${{ env.ANSYSMATH_VERSION }}-${{ github.sha }} + key: Examples-v${{ env.RESET_EXAMPLES_CACHE }}-${{ steps.version.outputs.ANSYSMATH_VERSION }}-${{ github.sha }} restore-keys: | - Examples-v${{ env.RESET_EXAMPLES_CACHE }}-${{ env.ANSYSMATH_VERSION }} + Examples-v${{ env.RESET_EXAMPLES_CACHE }}-${{ steps.version.outputs.ANSYSMATH_VERSION }} - name: "Cache docs build directory" uses: actions/cache@v4 with: path: doc/_build - key: doc-build-v${{ env.RESET_DOC_BUILD_CACHE }}-${{ env.ANSYSMATH_VERSION }}-${{ github.sha }} + key: doc-build-v${{ env.RESET_DOC_BUILD_CACHE }}-${{ steps.version.outputs.ANSYSMATH_VERSION }}-${{ github.sha }} restore-keys: | - doc-build-v${{ env.RESET_DOC_BUILD_CACHE }}-${{ env.ANSYSMATH_VERSION }} + doc-build-v${{ env.RESET_DOC_BUILD_CACHE }}-${{ steps.version.outputs.ANSYSMATH_VERSION }} - name: "Cache autosummary" uses: actions/cache@v4 with: path: doc/source/**/_autosummary/*.rst - key: autosummary-v${{ env.RESET_AUTOSUMMARY_CACHE }}-${{ env.ANSYSMATH_VERSION }}-${{ github.sha }} + key: autosummary-v${{ env.RESET_AUTOSUMMARY_CACHE }}-${{ steps.version.outputs.ANSYSMATH_VERSION }}-${{ github.sha }} restore-keys: | - autosummary-v${{ env.RESET_AUTOSUMMARY_CACHE }}-${{ env.ANSYSMATH_VERSION }} + autosummary-v${{ env.RESET_AUTOSUMMARY_CACHE }}-${{ steps.version.outputs.ANSYSMATH_VERSION }} - name: "Run Ansys documentation building action" uses: ansys/actions/doc-build@v5 From 47399a9222d892b937f66498b90802156cf39aba Mon Sep 17 00:00:00 2001 From: Camille <78221213+clatapie@users.noreply.github.com> Date: Wed, 21 Feb 2024 16:59:02 +0100 Subject: [PATCH 37/38] fix: CICD --- .github/workflows/ci_cd.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index cf2ac0da..304d829e 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -258,6 +258,7 @@ jobs: MAPDL_IMAGE: '${{ env.DOCKER_PACKAGE }}:${{ env.DOCKER_IMAGE_VERSION_DOCS_BUILD }}' - name: "Retrieve AnsysMath version" + id: version run: | echo "ANSYSMATH_VERSION=$(python -c 'from ansys.math.core import __version__; print(__version__)')" >> $>> $GITHUB_OUTPUT echo "AnsysMath version is: $(python -c "from ansys.math.core import __version__; print(__version__)")" From 732edff2faf893fb90be8cb411f33da1ae3252e6 Mon Sep 17 00:00:00 2001 From: Camille <78221213+clatapie@users.noreply.github.com> Date: Wed, 21 Feb 2024 17:03:06 +0100 Subject: [PATCH 38/38] fix: CICD typo --- .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 304d829e..653baded 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -260,7 +260,7 @@ jobs: - name: "Retrieve AnsysMath version" id: version run: | - echo "ANSYSMATH_VERSION=$(python -c 'from ansys.math.core import __version__; print(__version__)')" >> $>> $GITHUB_OUTPUT + echo "ANSYSMATH_VERSION=$(python -c 'from ansys.math.core import __version__; print(__version__)')" >> $GITHUB_OUTPUT echo "AnsysMath version is: $(python -c "from ansys.math.core import __version__; print(__version__)")" - name: "Cache examples"