-
Notifications
You must be signed in to change notification settings - Fork 121
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Links checker and redirection capabilities (#2090)
* fixing contributing link * fixing more links * Improving bug template * Fixing links * Fixing make configuration * Adding anchor ignore. Adding redirect to krylov example * more info on old link * Removing deploy from make. Fixing link build directory Specifying the doctrees directory * fixing link * Adding it to cicd * Adding linkchecker workflow - Need to adapt and fix * Removing linkchecker from main cicd * Undoing some changes
- Loading branch information
Showing
10 changed files
with
155 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
name: LinkCheck - All files 🔗 | ||
|
||
on: | ||
schedule: | ||
- cron: "0 5 * * 0" # Runs at 05:00 on Sunday. | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
|
||
jobs: | ||
linkchecker: | ||
name: Check Links | ||
runs-on: ubuntu-latest | ||
env: | ||
PYANSYS_OFF_SCREEN: "True" | ||
PYMAPDL_PORT: 21000 # default won't work on GitHub runners | ||
PYMAPDL_DB_PORT: 21001 # default won't work on GitHub runners | ||
PYMAPDL_START_INSTANCE: FALSE | ||
ON_DOCUMENTATION: TRUE | ||
SHELLOPTS: "errexit:pipefail" | ||
steps: | ||
- name: "Install Git and checkout project" | ||
uses: actions/checkout@v3 | ||
|
||
- 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 install zip pandoc libgl1-mesa-glx xvfb texlive-latex-extra latexmk graphviz | ||
- 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: "Test virtual framebuffer" | ||
run: | | ||
pip install -r .ci/requirements_test_xvfb.txt | ||
xvfb-run python .ci/display_test.py | ||
- name: "Install ansys-mapdl-core" | ||
run: | | ||
pip install . | ||
xvfb-run python -c "from ansys.mapdl import core as pymapdl; print(pymapdl.Report())" | ||
- name: "Login in Github container registry" | ||
uses: docker/[email protected] | ||
with: | ||
registry: ghcr.io | ||
username: ${{ secrets.GH_USERNAME }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: "Pull, launch, and validate MAPDL service" | ||
run: .ci/start_mapdl.sh | ||
env: | ||
LICENSE_SERVER: ${{ secrets.LICENSE_SERVER }} | ||
MAPDL_IMAGE: '${{ env.DOCKER_PACKAGE }}:${{ env.DOCKER_IMAGE_VERSION_DOCS_BUILD }}' | ||
|
||
- name: "Retrieve PyMAPDL version" | ||
id: version | ||
run: | | ||
echo "PYMAPDL_VERSION=$(python -c 'from ansys.mapdl.core import __version__; print(__version__)')" >> $GITHUB_OUTPUT | ||
echo "PyMAPDL version is: $(python -c "from ansys.mapdl.core import __version__; print(__version__)")" | ||
- name: "Cache examples" | ||
uses: actions/cache@v3 | ||
with: | ||
path: doc/source/examples | ||
key: Examples-v${{ env.RESET_EXAMPLES_CACHE }}-${{ steps.version.outputs.PYMAPDL_VERSION }}-${{ github.sha }} | ||
restore-keys: | | ||
Examples-v${{ env.RESET_EXAMPLES_CACHE }}-${{ steps.version.outputs.PYMAPDL_VERSION }} | ||
- name: "Cache docs build directory" | ||
uses: actions/cache@v3 | ||
with: | ||
path: doc/_build | ||
key: doc-build-v${{ env.RESET_DOC_BUILD_CACHE }}-${{ steps.version.outputs.PYMAPDL_VERSION }}-${{ github.sha }} | ||
restore-keys: | | ||
doc-build-v${{ env.RESET_DOC_BUILD_CACHE }}-${{ steps.version.outputs.PYMAPDL_VERSION }} | ||
- name: "Cache autosummary" | ||
uses: actions/cache@v3 | ||
with: | ||
path: doc/source/**/_autosummary/*.rst | ||
key: autosummary-v${{ env.RESET_AUTOSUMMARY_CACHE }}-${{ steps.version.outputs.PYMAPDL_VERSION }}-${{ github.sha }} | ||
restore-keys: | | ||
autosummary-v${{ env.RESET_AUTOSUMMARY_CACHE }}-${{ steps.version.outputs.PYMAPDL_VERSION }} | ||
- name: "Install docs build requirements" | ||
run: | | ||
pip install .[doc] | ||
- name: "DPF server activation" | ||
run: | | ||
docker pull ghcr.io/ansys/dpf-core:22.2dev | ||
docker run -d --name dpfserver -p ${{ env.DPF_PORT }}:50052 ghcr.io/ansys/dpf-core:22.2dev && echo "DPF Server active on port ${{ env.DPF_PORT }}." | ||
- name: LinkCheck | ||
run: | | ||
make -C doc linkcheck | ||
- name: "Display linkchecker results" | ||
run: | | ||
echo "::group:: Display linkcher output" && cat doc/*/output.txt && echo "::endgroup::" || echo "Failed to display the output file." | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,25 +3,25 @@ | |
.. The substitution for the actual value is made on conf.py file. | ||
.. #Pyansys | ||
.. _pyansys: https://docs.pyansys.com/dev/ | ||
.. _pyansys: https://docs.pyansys.com/version/dev/ | ||
.. _pyansys_support: [email protected] | ||
.. _pyansys_core: [email protected] | ||
|
||
.. #Other projects | ||
.. _dpf_core_gh: https://github.com/pyansys/DPF-Core | ||
.. _dpf_post_gh: https://github.com/pyansys/DPF-Post | ||
.. _dpf_core_docs: https://dpf.docs.pyansys.com/dev/ | ||
.. _dpf_post_docs: https://post.docs.pyansys.com/dev/ | ||
.. _dpf_core_docs: https://dpf.docs.pyansys.com | ||
.. _dpf_post_docs: https://post.docs.pyansys.com | ||
.. _legacy_reader_docs: https://reader.docs.pyansys.com/ | ||
.. _example_data_repo: https://github.com/pyansys/example-data | ||
.. _ansys_tools_path: http://path.tools.docs.pyansys.com/ | ||
.. _pyansys_math: https://math.docs.pyansys.com/version/stable/ | ||
.. _pyansys_math_api: https://math.docs.pyansys.com/version/stable/api/index.html | ||
|
||
.. #PyAnsys Developer Guide | ||
.. _dev_guide_pyansys: https://dev.docs.pyansys.com/dev/ | ||
.. _dev_guide_contributing: https://dev.docs.pyansys.com/dev/how-to/contributing.html | ||
.. _dev_guide_coding_style: https://dev.docs.pyansys.com/dev/coding-style/index.html | ||
.. _dev_guide_pyansys: https://dev.docs.pyansys.com | ||
.. _dev_guide_contributing: https://dev.docs.pyansys.com/how-to/contributing.html | ||
.. _dev_guide_coding_style: https://dev.docs.pyansys.com/coding-style/index.html | ||
|
||
.. #Other libraries | ||
.. _pyvista_docs: https://docs.pyvista.org/version/stable/ | ||
|
@@ -106,6 +106,8 @@ | |
.. _gh_centos_wsl_1: https://github.com/wsldl-pg/CentWSL/ | ||
.. _gh_centos_wsl_2: https://github.com/mishamosher/CentOS-WSL/ | ||
.. _codecov: https://github.com/codecov | ||
.. _WSL_Windows_Toolbar_Launcher: https://github.com/cascadium/wsl-windows-toolbar-launcher | ||
.. _disabling_firewall_on_wsl: https://github.com/cascadium/wsl-windows-toolbar-launcher#firewall-rules | ||
|
||
.. #PyMAPDL related | ||
.. _pymapdl_main: pymapdl_docs_ | ||
|
@@ -124,11 +126,11 @@ | |
.. _pymapdl_examples: https://github.com/pyansys/pymapdl/tree/main/examples | ||
.. _pymapdl_2d_plate_with_a_hole: https://github.com/pyansys/pymapdl/blob/main/examples/00-mapdl-examples/2d_plate_with_a_hole.py | ||
.. _pymapdl_doc_2d_plate_with_a_hole: https://mapdl.docs.pyansys.com/version/stable/examples/gallery_examples/00-mapdl-examples/2d_plate_with_a_hole.html | ||
.. _pymapdl_doc_krylov_example: https://dev.mapdl.docs.pyansys.com/version/stable/examples/extended_examples/Krylov/krylov_example.html | ||
.. _pymapdl_doc_krylov_example: https://mapdl.docs.pyansys.com/version/stable/examples/extended_examples/Krylov/krylov_example.html | ||
.. _pymapdl_doc_krylov_example_rst: https://raw.githubusercontent.com/pyansys/pymapdl/main/doc/source/examples/extended_examples/Krylov/krylov_example.rst | ||
.. _pymapdl_doc_source: https://github.com/pyansys/pymapdl/tree/main/doc/source | ||
.. _pymapdl_techdemo_28_rst: https://raw.githubusercontent.com/pyansys/pymapdl-examples/main/doc/source/technology_showcase_examples/techdemo-28/ex_28-tecfricstir.rst | ||
.. _pymapdl_techdemo_28: https://examples.mapdl.docs.pyansys.com/version/stable/technology_showcase_examples/techdemo-28/ex_28-tecfricstir.html | ||
.. _pymapdl_techdemo_28: https://examples.mapdl.docs.pyansys.com/technology_showcase_examples/techdemo-28/ex_28-tecfricstir.html | ||
.. _pymapdl_docker_dir: https://github.com/pyansys/pymapdl/blob/main/docker | ||
.. _pymapdl_docker_compose_base: https://github.com/pyansys/pymapdl/blob/main/docker/docker-compose.yml | ||
.. _pymapdl_docker_compose_local: https://github.com/pyansys/pymapdl/blob/main/docker/docker-compose.local.yml | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters