From 78cd6159e1e52e70b6789fc523e6387db57f2faf Mon Sep 17 00:00:00 2001 From: dkunhamb Date: Thu, 31 Aug 2023 09:23:58 -0500 Subject: [PATCH 01/16] 8 cores unbuntu- no core settings inside sphinx conf --- .github/workflows/ci_cd.yml | 2 +- .pre-commit-config.yaml | 5 ----- doc/source/conf.py | 10 +++++----- 3 files changed, 6 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index 409c3ed7..6aaefb23 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -49,7 +49,7 @@ jobs: doc-build: name: Documentation building - runs-on: ubuntu-latest + runs-on: public-ubuntu-latest-8-cores container: image: ghcr.io/ansys/mechanical:23.2.0 options: --entrypoint /bin/bash diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8704496f..a8cf23ae 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -40,8 +40,3 @@ repos: - id: check-yaml - id: trailing-whitespace -- repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.26.3 - hooks: - - id: check-github-workflows - diff --git a/doc/source/conf.py b/doc/source/conf.py index 069075db..4b30a97f 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -129,11 +129,11 @@ # configure pymechanical for embedding ansys.mechanical.core.BUILDING_GALLERY = True -app = ansys.mechanical.core.App(version=232) -if "PYMECHANICAL_BUILDING_GALLERY_GITHUB" in os.environ: - config = app.ExtAPI.Application.SolveConfigurations["My Computer"] - config.SolveProcessSettings.MaxNumberOfCores = 1 - config.SolveProcessSettings.DistributeSolution = False +# if "PYMECHANICAL_BUILDING_GALLERY_GITHUB" in os.environ: +# app = ansys.mechanical.core.App(version=232) +# config = app.ExtAPI.Application.SolveConfigurations["My Computer"] +# config.SolveProcessSettings.MaxNumberOfCores = 1 +# config.SolveProcessSettings.DistributeSolution = False # static path html_static_path = ["_static"] From b14434b04add43d7b51f4977ab904749d96986b5 Mon Sep 17 00:00:00 2001 From: dkunhamb Date: Thu, 31 Aug 2023 09:33:57 -0500 Subject: [PATCH 02/16] headless display action --- .github/workflows/ci_cd.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index 6aaefb23..23007e59 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -56,6 +56,9 @@ jobs: needs: [style, doc-style] steps: + - name: Setup headless display + uses: pyvista/setup-headless-display-action@v1 + - name: Install system dependencies run: | apt update From 08439381280dd1d7526f5e51465308a1cf1b09e9 Mon Sep 17 00:00:00 2001 From: dkunhamb Date: Thu, 31 Aug 2023 09:41:38 -0500 Subject: [PATCH 03/16] headless display action with ubuntu latest --- .github/workflows/ci_cd.yml | 2 +- doc/source/conf.py | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index 23007e59..b4103daa 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -49,7 +49,7 @@ jobs: doc-build: name: Documentation building - runs-on: public-ubuntu-latest-8-cores + runs-on: ubuntu-latest container: image: ghcr.io/ansys/mechanical:23.2.0 options: --entrypoint /bin/bash diff --git a/doc/source/conf.py b/doc/source/conf.py index 4b30a97f..9b921d2a 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -129,11 +129,11 @@ # configure pymechanical for embedding ansys.mechanical.core.BUILDING_GALLERY = True -# if "PYMECHANICAL_BUILDING_GALLERY_GITHUB" in os.environ: -# app = ansys.mechanical.core.App(version=232) -# config = app.ExtAPI.Application.SolveConfigurations["My Computer"] -# config.SolveProcessSettings.MaxNumberOfCores = 1 -# config.SolveProcessSettings.DistributeSolution = False +if "PYMECHANICAL_BUILDING_GALLERY_GITHUB" in os.environ: + app = ansys.mechanical.core.App(version=232) + config = app.ExtAPI.Application.SolveConfigurations["My Computer"] + config.SolveProcessSettings.MaxNumberOfCores = 1 + config.SolveProcessSettings.DistributeSolution = False # static path html_static_path = ["_static"] From 38eb5a2c29ef116e795f713ae10ddef90cdc14f9 Mon Sep 17 00:00:00 2001 From: dkunhamb Date: Thu, 31 Aug 2023 10:32:23 -0500 Subject: [PATCH 04/16] headless display action order modified --- .github/workflows/ci_cd.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index b4103daa..047b9415 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -56,9 +56,6 @@ jobs: needs: [style, doc-style] steps: - - name: Setup headless display - uses: pyvista/setup-headless-display-action@v1 - - name: Install system dependencies run: | apt update @@ -68,6 +65,9 @@ jobs: # pip install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org npm install -g @mermaid-js/mermaid-cli + - name: Setup headless display + uses: pyvista/setup-headless-display-action@v1 + - name: Install Git and checkout project uses: actions/checkout@v3 From cbe440b439a5c8f37c7fa4b051fb3dbc1d838767 Mon Sep 17 00:00:00 2001 From: dkunhamb Date: Fri, 1 Sep 2023 15:25:00 -0500 Subject: [PATCH 05/16] adding env inside ENV --- .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 409c3ed7..b188a3ff 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -100,6 +100,7 @@ jobs: ANSYSCL232_DIR: /install/ansys_inc/v232/licensingclient ANSYSLMD_LICENSE_FILE: 1055@${{ secrets.LICENSE_SERVER }} ANSYS_WORKBENCH_LOGGING_FILTER_LEVEL: 0 + LD_PRELOAD: libstdc++.so.6.0.28 run: | xvfb-run /install/ansys_inc/v232/aisol/.workbench_lite make -C doc html > doc_build_output.txt 2>&1 cat doc_build_output.txt From 3fd92a139018dfb0e5d0a0f67e42c4731825da7a Mon Sep 17 00:00:00 2001 From: dkunhamb Date: Fri, 1 Sep 2023 15:56:49 -0500 Subject: [PATCH 06/16] env with command --- .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 ee05f945..55638630 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -103,8 +103,8 @@ jobs: ANSYSCL232_DIR: /install/ansys_inc/v232/licensingclient ANSYSLMD_LICENSE_FILE: 1055@${{ secrets.LICENSE_SERVER }} ANSYS_WORKBENCH_LOGGING_FILTER_LEVEL: 0 - LD_PRELOAD: libstdc++.so.6.0.28 run: | + export LD_PRELOAD=libstdc++.so.6.0.28 xvfb-run /install/ansys_inc/v232/aisol/.workbench_lite make -C doc html > doc_build_output.txt 2>&1 cat doc_build_output.txt # From 9fc2cb6f6715e023c5d2083502889c04d9f73ebb Mon Sep 17 00:00:00 2001 From: dkunhamb Date: Wed, 6 Sep 2023 15:52:39 -0500 Subject: [PATCH 07/16] editing wblite --- .github/workflows/ci_cd.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index 55638630..fd60f646 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -104,7 +104,8 @@ jobs: ANSYSLMD_LICENSE_FILE: 1055@${{ secrets.LICENSE_SERVER }} ANSYS_WORKBENCH_LOGGING_FILTER_LEVEL: 0 run: | - export LD_PRELOAD=libstdc++.so.6.0.28 + file_path="/install/ansys_inc/v232/aisol/.workbench_lite" + sed -i '/export \$LD_LIBRARY_PATH/i export \$LD_PRELOAD' "$file_path" xvfb-run /install/ansys_inc/v232/aisol/.workbench_lite make -C doc html > doc_build_output.txt 2>&1 cat doc_build_output.txt # From b4d8c60a0cad4277e7c474161e6a6ed0edc0029c Mon Sep 17 00:00:00 2001 From: dkunhamb Date: Wed, 6 Sep 2023 16:06:21 -0500 Subject: [PATCH 08/16] debug --- .github/workflows/ci_cd.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index fd60f646..409ecb99 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -104,7 +104,9 @@ jobs: ANSYSLMD_LICENSE_FILE: 1055@${{ secrets.LICENSE_SERVER }} ANSYS_WORKBENCH_LOGGING_FILTER_LEVEL: 0 run: | + set -x file_path="/install/ansys_inc/v232/aisol/.workbench_lite" + echo $file_pathfit sed -i '/export \$LD_LIBRARY_PATH/i export \$LD_PRELOAD' "$file_path" xvfb-run /install/ansys_inc/v232/aisol/.workbench_lite make -C doc html > doc_build_output.txt 2>&1 cat doc_build_output.txt From cc3c576ffddf601794e632709edcaf4b0b35e2e2 Mon Sep 17 00:00:00 2001 From: dkunhamb Date: Wed, 6 Sep 2023 17:55:35 -0500 Subject: [PATCH 09/16] adding env directly --- .github/workflows/ci_cd.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index 409ecb99..51c357ec 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -104,10 +104,7 @@ jobs: ANSYSLMD_LICENSE_FILE: 1055@${{ secrets.LICENSE_SERVER }} ANSYS_WORKBENCH_LOGGING_FILTER_LEVEL: 0 run: | - set -x - file_path="/install/ansys_inc/v232/aisol/.workbench_lite" - echo $file_pathfit - sed -i '/export \$LD_LIBRARY_PATH/i export \$LD_PRELOAD' "$file_path" + sed -i '/LD_LIBRARY_PATH/a export LD_PRELOAD' /install/ansys_inc/v232/aisol/.workbench_lite xvfb-run /install/ansys_inc/v232/aisol/.workbench_lite make -C doc html > doc_build_output.txt 2>&1 cat doc_build_output.txt # From c0841da03319c804368dff3fcd3a364d7434f6fa Mon Sep 17 00:00:00 2001 From: dkunhamb Date: Thu, 7 Sep 2023 08:10:43 -0500 Subject: [PATCH 10/16] wblite --- .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 51c357ec..f32ab04b 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -105,6 +105,7 @@ jobs: ANSYS_WORKBENCH_LOGGING_FILTER_LEVEL: 0 run: | sed -i '/LD_LIBRARY_PATH/a export LD_PRELOAD' /install/ansys_inc/v232/aisol/.workbench_lite + cat /install/ansys_inc/v232/aisol/.workbench_lite xvfb-run /install/ansys_inc/v232/aisol/.workbench_lite make -C doc html > doc_build_output.txt 2>&1 cat doc_build_output.txt # From d27b136a7d2996fcec68282cef0b334e55749bed Mon Sep 17 00:00:00 2001 From: dkunhamb Date: Thu, 7 Sep 2023 08:40:54 -0500 Subject: [PATCH 11/16] adding true for wblite --- .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 f32ab04b..ec0a1626 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -106,7 +106,7 @@ jobs: run: | sed -i '/LD_LIBRARY_PATH/a export LD_PRELOAD' /install/ansys_inc/v232/aisol/.workbench_lite cat /install/ansys_inc/v232/aisol/.workbench_lite - xvfb-run /install/ansys_inc/v232/aisol/.workbench_lite make -C doc html > doc_build_output.txt 2>&1 + xvfb-run /install/ansys_inc/v232/aisol/.workbench_lite make -C doc html > doc_build_output.txt 2>&1 || true cat doc_build_output.txt # # Check if Error occurred From fdbc92ae553f83360873c9b919fb7356801901f5 Mon Sep 17 00:00:00 2001 From: dkunhamb Date: Thu, 7 Sep 2023 08:57:50 -0500 Subject: [PATCH 12/16] remove headless display --- .github/workflows/ci_cd.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index ec0a1626..aabf4425 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -65,9 +65,6 @@ jobs: # pip install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org npm install -g @mermaid-js/mermaid-cli - - name: Setup headless display - uses: pyvista/setup-headless-display-action@v1 - - name: Install Git and checkout project uses: actions/checkout@v3 From cd90d34863ef5a9a609f119e4bf1f34597c3e7c7 Mon Sep 17 00:00:00 2001 From: dkunhamb Date: Thu, 7 Sep 2023 09:19:59 -0500 Subject: [PATCH 13/16] changing regexpre --- .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 aabf4425..9260c28e 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -101,7 +101,7 @@ jobs: ANSYSLMD_LICENSE_FILE: 1055@${{ secrets.LICENSE_SERVER }} ANSYS_WORKBENCH_LOGGING_FILTER_LEVEL: 0 run: | - sed -i '/LD_LIBRARY_PATH/a export LD_PRELOAD' /install/ansys_inc/v232/aisol/.workbench_lite + sed -i '/eval \$@/i export LD_PRELOAD' /install/ansys_inc/v232/aisol/.workbench_lite cat /install/ansys_inc/v232/aisol/.workbench_lite xvfb-run /install/ansys_inc/v232/aisol/.workbench_lite make -C doc html > doc_build_output.txt 2>&1 || true cat doc_build_output.txt From 9b85060db16e60f607f220cad876388f63dc3e87 Mon Sep 17 00:00:00 2001 From: dkunhamb Date: Thu, 7 Sep 2023 11:36:32 -0500 Subject: [PATCH 14/16] checking build success on output --- .github/workflows/ci_cd.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index 9260c28e..e778e786 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -106,10 +106,9 @@ jobs: xvfb-run /install/ansys_inc/v232/aisol/.workbench_lite make -C doc html > doc_build_output.txt 2>&1 || true cat doc_build_output.txt # - # Check if Error occurred + # Check if "build succeeded" string is present in doc_build_output.txt # - output=$(grep -c ".*make:.*Error.*" doc_build_output.txt || true) - if [ $output -eq 0 ]; then + if grep -q "build succeeded" doc_build_output.txt; then echo "Documentation building succeeded" exit 0 else From f2cbb9a72e614031be871b7091b7313541debee3 Mon Sep 17 00:00:00 2001 From: dkunhamb Date: Fri, 8 Sep 2023 08:53:41 -0500 Subject: [PATCH 15/16] removing building_gallery --- doc/source/conf.py | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/doc/source/conf.py b/doc/source/conf.py index 9b921d2a..87873a53 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -2,7 +2,6 @@ from datetime import datetime import os -import ansys.mechanical.core from ansys_sphinx_theme import ansys_favicon from ansys_sphinx_theme import pyansys_logo_black as logo import numpy as np @@ -72,7 +71,7 @@ # directory where function granular galleries are stored "backreferences_dir": None, # Modules for which function level galleries are created. In - "doc_module": "ansys-mapdl-core", + "doc_module": "ansys.mechanical.core", "image_scrapers": ("pyvista", "matplotlib"), "ignore_pattern": "flycheck*", "thumbnail_size": (350, 350), @@ -127,14 +126,6 @@ if not os.path.exists(pyvista.FIGURE_PATH): os.makedirs(pyvista.FIGURE_PATH) -# configure pymechanical for embedding -ansys.mechanical.core.BUILDING_GALLERY = True -if "PYMECHANICAL_BUILDING_GALLERY_GITHUB" in os.environ: - app = ansys.mechanical.core.App(version=232) - config = app.ExtAPI.Application.SolveConfigurations["My Computer"] - config.SolveProcessSettings.MaxNumberOfCores = 1 - config.SolveProcessSettings.DistributeSolution = False - # static path html_static_path = ["_static"] From bed7400bb9cf81037ef5a57a19b0bbdf390faa8c Mon Sep 17 00:00:00 2001 From: dkunhamb Date: Fri, 8 Sep 2023 09:03:10 -0500 Subject: [PATCH 16/16] reverting workflow precommit --- .pre-commit-config.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a8cf23ae..eb88887b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -40,3 +40,7 @@ repos: - id: check-yaml - id: trailing-whitespace +- repo: https://github.com/python-jsonschema/check-jsonschema + rev: 0.26.3 + hooks: + - id: check-github-workflows