From 94dcb82152d01f9206ce016953dd264a7b8277f0 Mon Sep 17 00:00:00 2001 From: Camille <78221213+clatapie@users.noreply.github.com> Date: Tue, 31 Oct 2023 16:50:03 +0100 Subject: [PATCH 1/8] fix: doc building --- doc/source/common_jupyter_execute.py | 2 +- .../techdemo-1/ex_01-tecbrakesqueal.rst | 5 +++-- .../techdemo-20/ex_20-tecPCB.rst | 2 +- .../techdemo-21/ex_21-tecbuckling.rst | 2 +- .../techdemo-28/ex_28-tecfricstir.rst | 2 +- .../tech-demos/21-example-technology-showcase-buckling.py | 2 +- requirements/requirements_doc.txt | 2 +- 7 files changed, 9 insertions(+), 8 deletions(-) diff --git a/doc/source/common_jupyter_execute.py b/doc/source/common_jupyter_execute.py index d826c612..be849caa 100644 --- a/doc/source/common_jupyter_execute.py +++ b/doc/source/common_jupyter_execute.py @@ -25,6 +25,6 @@ pyvista.global_theme.show_scalar_bar = True pyvista.global_theme.return_cpos = False -pyvista.set_jupyter_backend("panel") +pyvista.set_jupyter_backend("trame") mytheme = pyvista.global_theme diff --git a/doc/source/technology_showcase_examples/techdemo-1/ex_01-tecbrakesqueal.rst b/doc/source/technology_showcase_examples/techdemo-1/ex_01-tecbrakesqueal.rst index 70e8c692..854ab3f9 100644 --- a/doc/source/technology_showcase_examples/techdemo-1/ex_01-tecbrakesqueal.rst +++ b/doc/source/technology_showcase_examples/techdemo-1/ex_01-tecbrakesqueal.rst @@ -185,7 +185,8 @@ Start this example by launching MAPDL and loading the model. pyvista.set_plot_theme('document') from ansys.mapdl.core import launch_mapdl, Mapdl - from ansys.mapdl.core.examples import download_tech_demo_data, ansys_colormap + from ansys.mapdl.core.examples.downloads import download_tech_demo_data + from ansys.mapdl.core.examples.examples import ansys_colormap cdb_path = download_tech_demo_data("td-1", "disc_pad_model.cdb") @@ -217,7 +218,7 @@ Start this example by launching MAPDL and loading the model. :hide-code: from ansys.mapdl.core import examples - from ansys.mapdl.core.examples import download_vtk_rotor, download_tech_demo_data + from ansys.mapdl.core.examples.downloads import download_vtk_rotor, download_tech_demo_data rotor = pyvista.read(download_vtk_rotor()) rotor.plot(color='w', show_edges=True) diff --git a/doc/source/technology_showcase_examples/techdemo-20/ex_20-tecPCB.rst b/doc/source/technology_showcase_examples/techdemo-20/ex_20-tecPCB.rst index 87af9c7f..248a7a9c 100644 --- a/doc/source/technology_showcase_examples/techdemo-20/ex_20-tecPCB.rst +++ b/doc/source/technology_showcase_examples/techdemo-20/ex_20-tecPCB.rst @@ -52,7 +52,7 @@ between the IC packages and the circuit board. import _.pyplot as plt from ansys.mapdl.core import launch_mapdl - from ansys.mapdl.core.examples import download_tech_demo_data + from ansys.mapdl.core.examples.downloads import download_tech_demo_data # start MAPDL as a service mapdl = launch_mapdl() diff --git a/doc/source/technology_showcase_examples/techdemo-21/ex_21-tecbuckling.rst b/doc/source/technology_showcase_examples/techdemo-21/ex_21-tecbuckling.rst index 64747a44..5b015c38 100644 --- a/doc/source/technology_showcase_examples/techdemo-21/ex_21-tecbuckling.rst +++ b/doc/source/technology_showcase_examples/techdemo-21/ex_21-tecbuckling.rst @@ -47,7 +47,7 @@ Starting MAPDL as a service and importing an external model from ansys.mapdl.core import launch_mapdl - from ansys.mapdl.core.examples import download_tech_demo_data + from ansys.mapdl.core.examples.downloads import download_tech_demo_data # define geometric parameters bs = 95.3 # Ring spacing (mm) diff --git a/doc/source/technology_showcase_examples/techdemo-28/ex_28-tecfricstir.rst b/doc/source/technology_showcase_examples/techdemo-28/ex_28-tecfricstir.rst index 8bfba028..c38c014e 100644 --- a/doc/source/technology_showcase_examples/techdemo-28/ex_28-tecfricstir.rst +++ b/doc/source/technology_showcase_examples/techdemo-28/ex_28-tecfricstir.rst @@ -125,7 +125,7 @@ cylindrical shape tool, as shown in the following figure: :hide-code: from ansys.mapdl.core import examples - from ansys.mapdl.core.examples import download_vtk_rotor, download_tech_demo_data + from ansys.mapdl.core.examples.downloads import download_vtk_rotor, download_tech_demo_data cdbfile = download_tech_demo_data("td-28", "fsw.cdb") # Generating geometry, just for plotting purposes. diff --git a/examples/tech-demos/21-example-technology-showcase-buckling.py b/examples/tech-demos/21-example-technology-showcase-buckling.py index 337426f7..f6c923a5 100644 --- a/examples/tech-demos/21-example-technology-showcase-buckling.py +++ b/examples/tech-demos/21-example-technology-showcase-buckling.py @@ -51,7 +51,7 @@ # from ansys.mapdl.core import launch_mapdl -from ansys.mapdl.core.examples import download_tech_demo_data +from ansys.mapdl.core.examples.downloads import download_tech_demo_data # define geometric parameters bs = 95.3 # Ring spacing (mm) diff --git a/requirements/requirements_doc.txt b/requirements/requirements_doc.txt index 3629b244..8eabc39a 100644 --- a/requirements/requirements_doc.txt +++ b/requirements/requirements_doc.txt @@ -5,7 +5,7 @@ nest-asyncio==1.5.7 pandas==2.0.3 plotly==5.16.1 pythreejs==2.4.2 -pyvista==0.42.3 +pyvista[jupyter]==0.42.3 vtk==9.2.6 # Documentation dependencies From d072b3fce6a7b57cab2e5f8725f68528d362cd05 Mon Sep 17 00:00:00 2001 From: Camille <78221213+clatapie@users.noreply.github.com> Date: Tue, 31 Oct 2023 16:53:11 +0100 Subject: [PATCH 2/8] fix: vale checks --- doc/.vale.ini | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/doc/.vale.ini b/doc/.vale.ini index 7ce9bda0..49d58f77 100644 --- a/doc/.vale.ini +++ b/doc/.vale.ini @@ -26,3 +26,8 @@ Vocab = ANSYS # Apply the following styles BasedOnStyles = Vale, Google + +TokenIgnores = (:(func|class|meth|attr|py):`(?:.|\n)*?`)|(<.*>)|(.. code::.*\n| .*) + +# Removing Google-specific rule - Not applicable under some circumstances +Google.Colons = NO From 4935e51723d423aaa23a3501adc2a7b6d2769950 Mon Sep 17 00:00:00 2001 From: Camille <78221213+clatapie@users.noreply.github.com> Date: Tue, 31 Oct 2023 17:02:49 +0100 Subject: [PATCH 3/8] fix: vale checks --- doc/.vale.ini | 2 +- doc/source/contributing/write_examples.rst | 4 ++-- doc/styles/Vocab/ANSYS/accept.txt | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/doc/.vale.ini b/doc/.vale.ini index 49d58f77..102f18f8 100644 --- a/doc/.vale.ini +++ b/doc/.vale.ini @@ -5,7 +5,7 @@ StylesPath = "styles" # The options are `suggestion`, `warning`, or `error` (defaults to “warning”). -MinAlertLevel = error +MinAlertLevel = warning # By default, `code` and `tt` are ignored. IgnoredScopes = code, tt diff --git a/doc/source/contributing/write_examples.rst b/doc/source/contributing/write_examples.rst index f2a28261..1c8f3115 100644 --- a/doc/source/contributing/write_examples.rst +++ b/doc/source/contributing/write_examples.rst @@ -38,5 +38,5 @@ The more visual your example is, the better. Python facilitates the creation of sophisticate graphics and plots: take advantage of that. -Packages like `matplotlib `_, `pandas `_ -or `pyvista `_ can help you create nice graphics, tables, or plots . +Packages like `Matplotlib `_, `Pandas `_ +or `PyVista `_ can help you create nice graphics, tables, or plots . diff --git a/doc/styles/Vocab/ANSYS/accept.txt b/doc/styles/Vocab/ANSYS/accept.txt index 6903ccca..473be627 100644 --- a/doc/styles/Vocab/ANSYS/accept.txt +++ b/doc/styles/Vocab/ANSYS/accept.txt @@ -54,6 +54,7 @@ Prasanna pres Prestressed prestressed +PyVista Rao ROTY Schroth From cb0a106bca7d6255367e84ea6e09b7a3306a1cef Mon Sep 17 00:00:00 2001 From: Camille <78221213+clatapie@users.noreply.github.com> Date: Tue, 31 Oct 2023 17:07:15 +0100 Subject: [PATCH 4/8] fix: `.vale.ini` --- doc/.vale.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/.vale.ini b/doc/.vale.ini index 102f18f8..6b5d5910 100644 --- a/doc/.vale.ini +++ b/doc/.vale.ini @@ -27,7 +27,7 @@ Vocab = ANSYS # Apply the following styles BasedOnStyles = Vale, Google -TokenIgnores = (:(func|class|meth|attr|py):`(?:.|\n)*?`)|(<.*>)|(.. code::.*\n| .*) +TokenIgnores = (:(func|class|meth|attr|py):`(?:.|\n)*?`)|(<.*>)|(.. (code|jupyter-execute)::.*\n| .*) # Removing Google-specific rule - Not applicable under some circumstances Google.Colons = NO From d4427a3d65a943e652021488996a4fbd3f3cf4e1 Mon Sep 17 00:00:00 2001 From: Camille <78221213+clatapie@users.noreply.github.com> Date: Tue, 31 Oct 2023 17:47:27 +0100 Subject: [PATCH 5/8] maint: reset caches --- .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 4e0ff66c..7ae762c9 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -13,8 +13,8 @@ on: env: MAIN_PYTHON_VERSION: '3.9' - RESET_EXAMPLES_CACHE: 0 - RESET_DOC_BUILD_CACHE: 0 + RESET_EXAMPLES_CACHE: 9 + RESET_DOC_BUILD_CACHE: 9 USE_CACHE: true concurrency: From d6e0c004035b51560f3798167d1b0db0d0df5449 Mon Sep 17 00:00:00 2001 From: Camille <78221213+clatapie@users.noreply.github.com> Date: Tue, 31 Oct 2023 17:47:49 +0100 Subject: [PATCH 6/8] maint: reset caches --- .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 7ae762c9..0568d345 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -15,7 +15,7 @@ env: MAIN_PYTHON_VERSION: '3.9' RESET_EXAMPLES_CACHE: 9 RESET_DOC_BUILD_CACHE: 9 - USE_CACHE: true + USE_CACHE: false concurrency: group: ${{ github.workflow }}-${{ github.ref }} From 4b5a076f13f9227abd8d4c91640982fc4e1547cc Mon Sep 17 00:00:00 2001 From: Camille <78221213+clatapie@users.noreply.github.com> Date: Tue, 31 Oct 2023 17:59:40 +0100 Subject: [PATCH 7/8] maint: updating sphinx-notfound-page --- requirements/requirements_doc.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/requirements_doc.txt b/requirements/requirements_doc.txt index 8eabc39a..9ac1379c 100644 --- a/requirements/requirements_doc.txt +++ b/requirements/requirements_doc.txt @@ -19,6 +19,6 @@ sphinxemoji==0.2.0 sphinx-gallery==0.14.0 sphinx-autobuild==2021.3.14 sphinx-autodoc-typehints==1.24.0 -sphinx-notfound-page==0.8.3 +sphinx-notfound-page==1.0.0 panel==1.2.1 pypandoc==1.11 From 5580009d1667eae6925fc96a1de92ec785e41bfc Mon Sep 17 00:00:00 2001 From: Camille <78221213+clatapie@users.noreply.github.com> Date: Tue, 31 Oct 2023 18:02:15 +0100 Subject: [PATCH 8/8] maint: reverting changes in `ci_cd.yml` --- .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 0568d345..4e0ff66c 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -13,9 +13,9 @@ on: env: MAIN_PYTHON_VERSION: '3.9' - RESET_EXAMPLES_CACHE: 9 - RESET_DOC_BUILD_CACHE: 9 - USE_CACHE: false + RESET_EXAMPLES_CACHE: 0 + RESET_DOC_BUILD_CACHE: 0 + USE_CACHE: true concurrency: group: ${{ github.workflow }}-${{ github.ref }}