Skip to content

Commit d111768

Browse files
committed
feat: fix links and enable multi-version (#275)
* feat: update links * Enable multi-version * feat: updating main Python version and release docs action * fix: pre-commit * fix: typo * fix: link checks on ubuntu * fix: broken link
1 parent a68bd09 commit d111768

File tree

9 files changed

+78
-50
lines changed

9 files changed

+78
-50
lines changed

.github/workflows/ci-build.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ concurrency:
1515
env:
1616
PACKAGE_NAME: pyansys
1717
PACKAGE_NAMESPACE: pyansys
18-
MAIN_PYTHON_VERSION: '3.9'
18+
MAIN_PYTHON_VERSION: '3.11'
1919
DOCUMENTATION_CNAME: "docs.pyansys.com"
2020

2121
jobs:
@@ -173,3 +173,14 @@ jobs:
173173
with:
174174
library-name: ${{ env.PACKAGE_NAME }}
175175
additional-artifacts: 'all-deps-Linux-3.8 all-deps-Linux-3.9 all-deps-Linux-3.10 all-deps-Linux-3.11 all-deps-Windows-3.8 all-deps-Windows-3.9 all-deps-Windows-3.10 all-deps-Windows-3.11 all-deps-macOS-3.8 all-deps-macOS-3.9 all-deps-macOS-3.10 all-deps-macOS-3.11'
176+
177+
docs-release:
178+
name: Deploy release docs
179+
runs-on: ubuntu-latest
180+
needs: [release]
181+
steps:
182+
- name: Deploy the latest release documentation
183+
uses: ansys/actions/doc-deploy-stable@v4
184+
with:
185+
cname: ${{ env.DOCUMENTATION_CNAME }}
186+
token: ${{ secrets.GITHUB_TOKEN }}

doc/Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ help:
1818
%: Makefile
1919
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
2020

21+
# Customized HTML build
22+
html:
23+
@$(SPHINXBUILD) -M linkcheck "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
24+
@$(SPHINXBUILD) -M html "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
25+
2126
# Customized PDF build
2227
pdf:
2328
@$(SPHINXBUILD) -M latex "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

doc/make.bat

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ set SOURCEDIR=source
1111
set BUILDDIR=_build
1212

1313
if "%1" == "" goto help
14+
if "%1" == "html" goto html
1415

1516
%SPHINXBUILD% >NUL 2>NUL
1617
if errorlevel 9009 (
@@ -28,6 +29,11 @@ if errorlevel 9009 (
2829
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
2930
goto end
3031

32+
:html
33+
%SPHINXBUILD% -M linkcheck %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
34+
%SPHINXBUILD% -M html %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
35+
goto end
36+
3137
:help
3238
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
3339

doc/source/api.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ PyAnsys packages API reference
2222

2323
.. grid-item-card:: PyAEDT
2424
:img-top: _static/thumbnails/pyaedt.png
25-
:link: https://aedt.docs.pyansys.com/dev/API/index.html
25+
:link: https://aedt.docs.pyansys.com/version/stable/API/index.html
2626
:text-align: center
2727
:class-title: pyansys-card-title
2828

@@ -52,25 +52,25 @@ PyAnsys packages API reference
5252

5353
.. grid-item-card:: PyFluent
5454
:img-top: _static/thumbnails/pyfluent.png
55-
:link: https://fluent.docs.pyansys.com/api/index.html
55+
:link: https://fluent.docs.pyansys.com/version/stable/api/index.html
5656
:text-align: center
5757
:class-title: pyansys-card-title
5858

5959
.. grid-item-card:: PyFluent-Parametric
6060
:img-top: _static/thumbnails/pyfluent-parametric.png
61-
:link: https://parametric.fluent.docs.pyansys.com/api/index.html
61+
:link: https://parametric.fluent.docs.pyansys.com/version/stable/api/index.html
6262
:text-align: center
6363
:class-title: pyansys-card-title
6464

6565
.. grid-item-card:: PyFluent-Visualization
6666
:img-top: _static/thumbnails/pyfluent-visualization.png
67-
:link: https://visualization.fluent.docs.pyansys.com/api/index.html
67+
:link: https://visualization.fluent.docs.pyansys.com/version/stable/api/index.html
6868
:text-align: center
6969
:class-title: pyansys-card-title
7070

7171
.. grid-item-card:: PyMAPDL
7272
:img-top: _static/thumbnails/pymapdl.png
73-
:link: https://mapdl.docs.pyansys.com/dev/api/index.html
73+
:link: https://mapdl.docs.pyansys.com/version/stable/api/index.html
7474
:text-align: center
7575
:class-title: pyansys-card-title
7676

@@ -106,7 +106,7 @@ PyAnsys packages API reference
106106

107107
.. grid-item-card:: PyPrimeMesh
108108
:img-top: _static/thumbnails/intro.png
109-
:link: https://prime.docs.pyansys.com/dev/api/index.html
109+
:link: https://prime.docs.pyansys.com/version/stable/api/index.html
110110
:text-align: center
111111
:class-title: pyansys-card-title
112112

@@ -118,13 +118,13 @@ PyAnsys packages API reference
118118

119119
.. grid-item-card:: PySystemCoupling
120120
:img-top: _static/thumbnails/pysystem-coupling.png
121-
:link: https://systemcoupling.docs.pyansys.com/dev/api/index.html
121+
:link: https://systemcoupling.docs.pyansys.com/version/stable/api/index.html
122122
:text-align: center
123123
:class-title: pyansys-card-title
124124

125125
.. grid-item-card:: PyTwin
126126
:img-top: _static/thumbnails/pytwin.png
127-
:link: https://twin.docs.pyansys.com/dev/api/index.html
127+
:link: https://twin.docs.pyansys.com/version/stable/api/index.html
128128
:text-align: center
129129
:class-title: pyansys-card-title
130130

doc/source/conf.py

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
"""Configuration file for docs.pyansys.com landing page."""
22
from datetime import datetime
3+
import os
34

4-
from ansys_sphinx_theme import pyansys_logo_black
5+
from ansys_sphinx_theme import get_version_match, pyansys_logo_black
56
from sphinx.builders.latex import LaTeXBuilder
67

78
from pyansys import __version__ as pyansys_version
@@ -11,6 +12,8 @@
1112
project = "pyansys"
1213
copyright = f"(c) {datetime.now().year} ANSYS, Inc. All rights reserved"
1314
author = "ANSYS Inc."
15+
cname = os.getenv("DOCUMENTATION_CNAME", default="nocname.com")
16+
switcher_version = get_version_match(pyansys_version)
1417

1518
# get the PyAnsys version
1619
release = version = pyansys_version
@@ -36,26 +39,29 @@
3639
"github_url": "https://github.com/ansys/pyansys",
3740
"show_prev_next": False,
3841
"show_breadcrumbs": True,
39-
# "collapse_navigation": True,
42+
"collapse_navigation": True,
4043
"use_edit_page_button": True,
4144
"icon_links": [
42-
# {
43-
# "name": "Support",
44-
# "url": "https://github.com/ansys/pyansys/discussions",
45-
# "icon": "fa fa-comment fa-fw",
46-
# },
45+
{
46+
"name": "Support",
47+
"url": "https://github.com/ansys/pyansys/discussions",
48+
"icon": "fa fa-comment fa-fw",
49+
},
4750
{
4851
"name": "Contribute",
4952
"url": "https://dev.docs.pyansys.com/how-to/contributing.html",
5053
"icon": "fa fa-wrench",
5154
},
5255
],
53-
# "switcher": {
54-
# "json_url": f"https://{cname}/release/versions.json",
55-
# "version_match": get_version_match(__version__),
56-
# },
56+
"switcher": {
57+
"json_url": f"https://{cname}/versions.json",
58+
"version_match": switcher_version,
59+
},
60+
"check_switcher": False,
5761
}
5862

63+
# Check all references work fine
64+
nitpicky = True
5965

6066
# The suffix(es) of source filenames.
6167
source_suffix = ".rst"

doc/source/examples.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,19 +41,19 @@ PyAnsys packages examples
4141

4242
.. grid-item-card:: PyFluent
4343
:img-top: _static/thumbnails/pyfluent.png
44-
:link: https://fluent.docs.pyansys.com/dev/examples/index.html
44+
:link: https://fluent.docs.pyansys.com/version/stable/examples/index.html
4545
:text-align: center
4646
:class-title: pyansys-card-title
4747

4848
.. grid-item-card:: PyFluent-Parametric
4949
:img-top: _static/thumbnails/pyfluent-parametric.png
50-
:link: https://parametric.fluent.docs.pyansys.com/dev/examples/index.html
50+
:link: https://parametric.fluent.docs.pyansys.com/version/stable/examples/index.html
5151
:text-align: center
5252
:class-title: pyansys-card-title
5353

5454
.. grid-item-card:: PyFluent-Visualization
5555
:img-top: _static/thumbnails/pyfluent-visualization.png
56-
:link: https://visualization.fluent.docs.pyansys.com/dev/examples/index.html
56+
:link: https://visualization.fluent.docs.pyansys.com/version/stable/examples/index.html
5757
:text-align: center
5858
:class-title: pyansys-card-title
5959

@@ -95,7 +95,7 @@ PyAnsys packages examples
9595

9696
.. grid-item-card:: PyPrimeMesh
9797
:img-top: _static/thumbnails/intro.png
98-
:link: https://prime.docs.pyansys.com/dev/examples/index.html
98+
:link: https://prime.docs.pyansys.com/version/stable/examples/index.html
9999
:text-align: center
100100
:class-title: pyansys-card-title
101101

doc/source/getting_started.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Getting started
44
PyAnsys libraries fall into two categories:
55

66
- Wrappers over products like `MAPDL <https://www.ansys.com/training-center/course-catalog/structures/ansys-mechanical-advanced-use-of-mapdl-in-mechanical>`_, `Fluent <https://www.ansys.com/products/fluids/ansys-fluent>`_, or `AEDT <https://www.ansys.com/products/electronics/ansys-maxwell>`_
7-
- Supporting libraries like `DPF <dpf_post_gh>`_
7+
- Supporting libraries like `DPF <dpf_post_gh_>`
88

99
Most PyAnsys packages require a local installation of Ansys. The version
1010
of Ansys installed dictates the interface and features available to

doc/source/index.rst

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -18,71 +18,71 @@ it is now a collection of many Python packages for using Ansys products through
1818

1919
.. grid-item-card:: PyAEDT
2020
:img-top: _static/thumbnails/pyaedt.png
21-
:link: https://aedt.docs.pyansys.com/
21+
:link: https://aedt.docs.pyansys.com/version/stable
2222
:text-align: center
2323
:class-title: pyansys-card-title
2424

2525
Pythonic interface to AEDT (Ansys Electronic Desktop)
2626

2727
.. grid-item-card:: PyAnsys Math
2828
:img-top: _static/thumbnails/pyansys-math.png
29-
:link: https://math.docs.pyansys.com/
29+
:link: https://math.docs.pyansys.com/version/stable
3030
:text-align: center
3131
:class-title: pyansys-card-title
3232

3333
Pythonic interface to PyAnsys Math libraries
3434

3535
.. grid-item-card:: PyDPF-Core
3636
:img-top: _static/thumbnails/pydpf-core.png
37-
:link: https://dpf.docs.pyansys.com
37+
:link: https://dpf.docs.pyansys.com/version/stable
3838
:text-align: center
3939
:class-title: pyansys-card-title
4040

4141
Pythonic interface to DPF (Data Processing Framework) for building more advanced and customized workflows
4242

4343
.. grid-item-card:: PyDPF-Post
4444
:img-top: _static/thumbnails/pydpf-post.png
45-
:link: https://post.docs.pyansys.com/
45+
:link: https://post.docs.pyansys.com/version/stable
4646
:text-align: center
4747
:class-title: pyansys-card-title
4848

4949
Pythonic interface to access and post process Ansys solver result files
5050

5151
.. grid-item-card:: PyDPF Composites
5252
:img-top: _static/thumbnails/pydpf-composites.png
53-
:link: https://composites.dpf.docs.pyansys.com/
53+
:link: https://composites.dpf.docs.pyansys.com/version/stable
5454
:text-align: center
5555
:class-title: pyansys-card-title
5656

5757
Pythonic interface to post-process layered and short-fiber composite models
5858

5959
.. grid-item-card:: PyFluent
6060
:img-top: _static/thumbnails/pyfluent.png
61-
:link: https://fluent.docs.pyansys.com/
61+
:link: https://fluent.docs.pyansys.com/version/stable
6262
:text-align: center
6363
:class-title: pyansys-card-title
6464

6565
Pythonic interface to Ansys Fluent
6666

6767
.. grid-item-card:: PyFluent-Parametric
6868
:img-top: _static/thumbnails/pyfluent-parametric.png
69-
:link: https://parametric.fluent.docs.pyansys.com/
69+
:link: https://parametric.fluent.docs.pyansys.com/version/stable
7070
:text-align: center
7171
:class-title: pyansys-card-title
7272

7373
Pythonic interface to Ansys Fluent parametric workflows
7474

7575
.. grid-item-card:: PyFluent-Visualization
7676
:img-top: _static/thumbnails/pyfluent-visualization.png
77-
:link: https://visualization.fluent.docs.pyansys.com/
77+
:link: https://visualization.fluent.docs.pyansys.com/version/stable
7878
:text-align: center
7979
:class-title: pyansys-card-title
8080

8181
Pythonic interface to visualize Ansys Fluent simulations
8282

8383
.. grid-item-card:: PyMAPDL
8484
:img-top: _static/thumbnails/pymapdl.png
85-
:link: https://mapdl.docs.pyansys.com/
85+
:link: https://mapdl.docs.pyansys.com/version/stable
8686
:text-align: center
8787
:class-title: pyansys-card-title
8888

@@ -98,23 +98,23 @@ it is now a collection of many Python packages for using Ansys products through
9898

9999
.. grid-item-card:: PyMechanical
100100
:img-top: _static/thumbnails/pymechanical.png
101-
:link: https://mechanical.docs.pyansys.com/
101+
:link: https://mechanical.docs.pyansys.com/version/stable
102102
:text-align: center
103103
:class-title: pyansys-card-title
104104

105105
Pythonic interface to Ansys Mechanical
106106

107107
.. grid-item-card:: PyMotorCAD
108108
:img-top: _static/thumbnails/pymotorcad.png
109-
:link: https://motorcad.docs.pyansys.com/
109+
:link: https://motorcad.docs.pyansys.com/version/stable
110110
:text-align: center
111111
:class-title: pyansys-card-title
112112

113113
Pythonic interface to Ansys Motor-CAD
114114

115115
.. grid-item-card:: PyOptislang
116116
:img-top: _static/thumbnails/pyoptislang.png
117-
:link: https://optislang.docs.pyansys.com/
117+
:link: https://optislang.docs.pyansys.com/version/stable
118118
:text-align: center
119119
:class-title: pyansys-card-title
120120

@@ -130,39 +130,39 @@ it is now a collection of many Python packages for using Ansys products through
130130

131131
.. grid-item-card:: PyPrimeMesh
132132
:img-top: _static/thumbnails/intro.png
133-
:link: https://prime.docs.pyansys.com
133+
:link: https://prime.docs.pyansys.com/version/stable
134134
:text-align: center
135135
:class-title: pyansys-card-title
136136

137137
Pythonic interface to Ansys Prime Server, which delivers core Ansys meshing technology
138138

139139
.. grid-item-card:: PySeascape
140140
:img-top: _static/thumbnails/intro.png
141-
:link: https://seascape.docs.pyansys.com/
141+
:link: https://seascape.docs.pyansys.com/version/stable
142142
:text-align: center
143143
:class-title: pyansys-card-title
144144

145145
Pythonic interface to communicate with Ansys RedHawkSC and TotemSC
146146

147147
.. grid-item-card:: PySystem Coupling
148148
:img-top: _static/thumbnails/pysystem-coupling.png
149-
:link: https://systemcoupling.docs.pyansys.com/
149+
:link: https://systemcoupling.docs.pyansys.com/version/stable
150150
:text-align: center
151151
:class-title: pyansys-card-title
152152

153153
Pythonic interface to communicate with Ansys System Coupling
154154

155155
.. grid-item-card:: PyTwin
156156
:img-top: _static/thumbnails/pytwin.png
157-
:link: https://twin.docs.pyansys.com/
157+
:link: https://twin.docs.pyansys.com/version/stable
158158
:text-align: center
159159
:class-title: pyansys-card-title
160160

161161
Pythonic interface to communicate with consumption workflows for Ansys digital twins
162162

163163
.. grid-item-card:: Granta MI BoM Analytics
164164
:img-top: _static/thumbnails/intro.png
165-
:link: https://bomanalytics.grantami.docs.pyansys.com/
165+
:link: https://bomanalytics.grantami.docs.pyansys.com/version/stable
166166
:text-align: center
167167
:class-title: pyansys-card-title
168168

0 commit comments

Comments
 (0)