From 5621b992b3f724bca48d3731c531ae0f78d45ea0 Mon Sep 17 00:00:00 2001 From: Dipin <26918585+dipinknair@users.noreply.github.com> Date: Wed, 14 Aug 2024 08:45:03 -0500 Subject: [PATCH] MAINT: update pymechanical version (#221) --- .github/workflows/ci_cd.yml | 38 +++++++++++++++---------------- doc/source/conf.py | 11 +++------ requirements/requirements_doc.txt | 4 ++-- 3 files changed, 23 insertions(+), 30 deletions(-) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index 5f084b97..f8e04d85 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -10,7 +10,7 @@ on: - main env: - MAIN_PYTHON_VERSION: '3.9' + MAIN_PYTHON_VERSION: '3.10' concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -45,7 +45,7 @@ jobs: doc-build: name: Documentation building runs-on: public-ubuntu-latest-8-cores - timeout-minutes: 30 + timeout-minutes: 60 container: image: ghcr.io/ansys/mechanical:24.2.0 options: --entrypoint /bin/bash @@ -59,35 +59,32 @@ jobs: - name: Set up Python run: | apt update - apt install -y python3.9 python3-pip - ln -s /usr/bin/python3.9 /usr/bin/python - python -m pip install --upgrade pip - python --version - pip3 --version - - - name: Install system dependencies - run: | - apt update - apt install -y make + apt install --reinstall ca-certificates + apt install lsb-release xvfb software-properties-common make -y + add-apt-repository ppa:deadsnakes/ppa -y + apt install -y python${{ env.MAIN_PYTHON_VERSION }} python${{ env.MAIN_PYTHON_VERSION }}-venv + python${{ env.MAIN_PYTHON_VERSION }} -m venv /env + apt install --reinstall ca-certificates + apt install lsb-release xvfb software-properties-common make -y + add-apt-repository ppa:deadsnakes/ppa -y + apt install -y python${{ env.MAIN_PYTHON_VERSION }} python${{ env.MAIN_PYTHON_VERSION }}-venv + python${{ env.MAIN_PYTHON_VERSION }} -m venv /env - name: Install Python requirements run: | - pip3 install -r requirements/requirements_doc.txt - - - name: Retrieve PyMechanial version - run: | - echo "PYMECHANICAL_VERSION=$(python -c 'from ansys.mechanical.core import __version__; print(__version__)')" >> $GITHUB_ENV - echo "PyMechanical version is: $(python -c "from ansys.mechanical.core import __version__; print(__version__)")" - id: version + . /env/bin/activate + pip install --upgrade pip + pip install -r requirements/requirements_doc.txt - name: Build docs env: SPHINXOPTS: '-j auto' LICENSE_SERVER: ${{ secrets.LICENSE_SERVER }} - ANSYSCL242_DIR: /install/ansys_inc/v242/licensingclient ANSYSLMD_LICENSE_FILE: 1055@${{ secrets.LICENSE_SERVER }} ANSYS_WORKBENCH_LOGGING_FILTER_LEVEL: 0 run: | + . /env/bin/activate + . /env/bin/activate xvfb-run mechanical-env make -C doc html > doc_build_output.txt 2>&1 || true cat doc_build_output.txt # @@ -104,6 +101,7 @@ jobs: env: SPHINXOPTS: '-j auto -W --keep-going' run: | + . /env/bin/activate xvfb-run make -C doc linkcheck > doc_linkcheck_output.txt 2>&1 || true cat doc_linkcheck_output.txt if grep -q "build succeeded" doc_build_output.txt; then diff --git a/doc/source/conf.py b/doc/source/conf.py index b9d62a11..664274ce 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -3,7 +3,7 @@ from datetime import datetime import ansys.mechanical.core -from ansys_sphinx_theme import ansys_favicon, pyansys_logo_black +from ansys_sphinx_theme import ansys_favicon import pyvista from pyvista.plotting.utilities.sphinx_gallery import DynamicScraper from sphinx_gallery.sorting import FileNameSortKey @@ -15,13 +15,14 @@ release = version = "0.1.dev0" # Select desired logo, theme, and declare the html title -html_logo = pyansys_logo_black html_favicon = ansys_favicon html_theme = "ansys_sphinx_theme" html_short_title = html_title = "PyMechanical Embedding Examples" +html_show_sourcelink = False # specify the location of your github repo html_theme_options = { + "logo": "pyansys", "github_url": "https://github.com/ansys/pymechanical-embedding-examples", "show_prev_next": False, "show_breadcrumbs": True, @@ -36,12 +37,6 @@ "icon": "fa fa-comment fa-fw", }, ], - "cheatsheet": { - "url": "https://cheatsheets.docs.pyansys.com/pymechanical_cheat_sheet.pdf", - "title": "PyMechanical cheat sheet", - "thumbnail": "https://cheatsheets.docs.pyansys.com/pymechanical_cheat_sheet.png", - "needs_download": True, - }, } # Sphinx extensions diff --git a/requirements/requirements_doc.txt b/requirements/requirements_doc.txt index d4816c89..645ab28f 100644 --- a/requirements/requirements_doc.txt +++ b/requirements/requirements_doc.txt @@ -1,6 +1,6 @@ #PyMechanical -ansys-mechanical-core[doc]==0.11.3 - +ansys-mechanical-core[doc]==0.11.5 +ansys-mechanical-core[viz]==0.11.5 # Documentation dependencies pyvista[jupyter]>=0.39.1 ipyvtklink==0.2.3