Skip to content

Commit 187ce6f

Browse files
authored
Adding links.rst to docs (#1506)
* Fixing links in API * Adding links file. * Removing include. * fixing duplicated references. * Update doc/source/conf.py * fixing links * fixing conf * Removing current release link * Testing underscore ending in reference. * adding trailing underscore for correct linking * Fixing more links * Adding linkcheck to make * Removing references to mapdldocs site. * Fixing warnings * removing style issues * removing link ending in main. * fixing errors * fixing duplicate links
1 parent b5f4b89 commit 187ce6f

File tree

37 files changed

+241
-140
lines changed

37 files changed

+241
-140
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ env:
2424
# You should go up in number, if you go down (or repeat a previous value)
2525
# you might end up reusing a previous cache if it haven't been deleted already.
2626
# It applies 7 days retention policy by default.
27-
RESET_PIP_CACHE: 8
28-
RESET_EXAMPLES_CACHE: 8
29-
RESET_DOC_BUILD_CACHE: 8
30-
RESET_AUTOSUMMARY_CACHE: 8
27+
RESET_PIP_CACHE: 4
28+
RESET_EXAMPLES_CACHE: 4
29+
RESET_DOC_BUILD_CACHE: 4
30+
RESET_AUTOSUMMARY_CACHE: 4
3131

3232
concurrency:
3333
group: ${{ github.workflow }}-${{ github.ref }}

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ questions or submissions to this repository.
1111

1212

1313
For contributing to this project, please refer to the [PyAnsys Developer's Guide].
14-
Further information about contributing to PyMAPDL can be found in [Contributing](https://mapdldocs.pyansys.com/contributing.html).
14+
Further information about contributing to PyMAPDL can be found in [Contributing](https://mapdl.docs.pyansys.com/contribution_and_api/index.html).
1515

1616
[PyAnsys Developer's Guide]: https://dev.docs.pyansys.com/

README.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ or in batch mode on Windows, Linux, and even Mac OS.
5353

5454
Documentation and issues
5555
------------------------
56-
For more information, see the `Documentation <https://mapdldocs.pyansys.com>`_ page.
57-
For some examples, see the `Examples gallery <https://mapdldocs.pyansys.com/examples/index.html>`_.
56+
For more information, see the `Documentation <https://mapdl.docs.pyansys.com>`_ page.
57+
For some examples, see the `Examples gallery <https://mapdl.docs.pyansys.com/examples/index.html>`_.
5858

5959
Feel free to post issues and other questions at `PyMAPDL Issues
6060
<https://github.com/pyansys/pymapdl/issues>`_. This is the best place
@@ -235,7 +235,7 @@ properties, or view mesh statistics. Additionally, there's the
235235
you can use to send or receive arrays between MAPDL and Python.
236236

237237
For more information, see the full documentation at `PyMAPDL Documentation
238-
<https://mapdldocs.pyansys.com>`_.
238+
<https://mapdl.docs.pyansys.com>`_.
239239

240240

241241
Run on Docker

doc/Makefile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ SPHINXOPTS = -j auto
66
SPHINXBUILD = sphinx-build
77
SOURCEDIR = source
88
BUILDDIR = build
9+
LINKCHECKDIR = build/linkcheck
910

1011
# Put it first so that "make" without argument is like "make help".
1112
help:
@@ -39,6 +40,11 @@ pdf:
3940
cd build/latex && latexmk -r latexmkrc -pdf *.tex -interaction=nonstopmode || true
4041
(test -f build/latex/*.pdf && echo pdf exists) || exit 1
4142

43+
checklinks:
44+
$(SPHINXBUILD) -b linkcheck $(SPHINXOPTS) $(LINKCHECKDIR)
45+
@echo
46+
@echo "Check finished. Report is in $(LINKCHECKDIR)."
47+
4248
# manually deploy to https://github.com/pyansys/pymapdl-docs
4349
# WARNING: Use with care as this overwrites history of gh-pages
4450
deploy:
@@ -48,7 +54,7 @@ deploy:
4854
@echo "Are you sure? [y/N] " && read ans && [ $${ans:-N} = y ]
4955
@echo "Deploying..."
5056
touch build/html/.nojekyll
51-
echo "mapdldocs.pyansys.com" >> build/html/CNAME
57+
echo "mapdl.docs.pyansys.com" >> build/html/CNAME
5258
cd build/html && git init
5359
cd build/html && git add .
5460
cd build/html && git checkout -b gh-pages

doc/make.bat

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,14 @@ if "%SPHINXBUILD%" == "" (
99
)
1010
set SOURCEDIR=source
1111
set BUILDDIR=build
12+
set LINKCHECKDIR=\%BUILDDIR%\linkcheck
1213

1314
if "%1" == "" goto help
1415
if "%1" == "clean" goto clean
1516
if "%1" == "clean-all" goto clean-all
1617
if "%1" == "clean-examples" goto clean-examples
18+
if "%1" == "linkcheck" goto linkcheck
19+
1720

1821
%SPHINXBUILD% >NUL 2>NUL
1922
if errorlevel 9009 (
@@ -46,6 +49,11 @@ goto end
4649
rmdir /s /q source\examples\gallery_examples > /NUL 2>&1
4750
goto end
4851

52+
:linkcheck
53+
%SPHINXBUILD% -b %1 %SPHINXOPTS% %SOURCEDIR% %LINKCHECKDIR%
54+
echo "Check finished. Report is in %LINKCHECKDIR%."
55+
goto end
56+
4957
:help
5058
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
5159

doc/source/conf.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,15 @@
141141
".DS_Store",
142142
# because we include this in examples/index.rst
143143
"examples/gallery_examples/index.rst",
144+
"links.rst",
144145
]
145146

147+
# make rst_epilog a variable, so you can add other epilog parts to it
148+
rst_epilog = ""
149+
# Read link all targets from file
150+
with open("links.rst") as f:
151+
rst_epilog += f.read()
152+
146153
# The name of the Pygments (syntax highlighting) style to use.
147154
pygments_style = "sphinx"
148155

doc/source/contribution_and_api/index.rst

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,9 @@ Contributing and API
55
====================
66

77
Overall guidance on contributing to a PyAnsys library appears in the
8-
`Contributing <https://dev.docs.pyansys.com/overview/contributing.html>`_ topic
8+
`Contributing <dev_guide_contributing_>`_ topic
99
in the *PyAnsys Developer's Guide*. Ensure that you are thoroughly familiar
10-
with it and all `Guidelines and Best Practices
11-
<https://dev.docs.pyansys.com/guidelines/index.html>`_ before attempting to
10+
with it and all `Coding style <dev_guide_coding_style_>`_ before attempting to
1211
contribute to PyMAPDL.
1312

1413
The following contribution information is specific to PyMAPDL.
@@ -30,7 +29,7 @@ Run this code to clone and install the latest version of PyMAPDL in development
3029
Posting Issues
3130
==============
3231

33-
Use the `PyMAPDL Issues <https://github.com/pyansys/pymapdl/issues>`_
32+
Use the `PyMAPDL Issues <pymapdl_issues_>`_
3433
page to submit questions, report bugs, and request new features. When possible, we
3534
recommend that you use these issue templates:
3635

@@ -39,16 +38,17 @@ recommend that you use these issue templates:
3938

4039
If your issue does not fit into one of these categories, create your own issue.
4140

42-
To reach the project support team, email `[email protected] <[email protected]>`_.
41+
To reach the project support team, email `[email protected] <pyansys_support_>`_.
4342

4443
Viewing PyMAPDL Documentation
4544
=============================
4645

4746
Documentation for the latest stable release of PyMAPDL is hosted at
48-
`PyMAPDL Documentation <https://mapdldocs.pyansys.com>`_.
47+
`PyMAPDL Documentation <pymapdl_docs_>`_.
4948

5049
Documentation for the latest development version, which tracks the
51-
``main`` branch, is hosted at `Development PyMAPDL Documentation <https://dev.mapdldocs.pyansys.com/>`_.
50+
``main`` branch, is hosted at
51+
`Development PyMAPDL Documentation <pymapdl_dev_docs_>`_.
5252
This version is automatically kept up to date via GitHub actions.
5353

5454
Testing MAPDL
@@ -81,8 +81,8 @@ Code Style
8181
==========
8282

8383
PyMAPDL follows PEP8 standard as outlined in the `PyAnsys Development Guide
84-
<https://dev.docs.pyansys.com>`_ and implements style checking using
85-
`pre-commit <https://pre-commit.com/>`_.
84+
<dev_guide_pyansys_>`_ and implements style checking using
85+
`pre-commit <precommit_>`_.
8686

8787
To ensure your code meets minimum code styling standards, run::
8888

doc/source/contribution_and_api/post.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ This class contains an API to post-process directly from MAPDL.
88
Should you wish to post-process MAPDL result files outside of PyMAPDL,
99
you can use one of the following packages:
1010

11-
* `DPF-Core <https://dpfdocs.pyansys.com/>`_ : Post-Processing using the Data Processing Framework (DPF). More complex yet and more powerful post-processing APIs.
12-
* `DPF-Post <https://postdocs.pyansys.com/>`_ : Streamlined and simplified DPF Post Processing. Higher level package and uses ``DPF-Core``.
13-
* `Legacy PyMAPDL Reader <https://readerdocs.pyansys.com/>`_: Legacy result file reader. Supports result files from MAPDL v14.5 to the current release.
11+
* `DPF-Core <dpf_core_docs_>`_ : Post-Processing using the Data Processing Framework (DPF). More complex yet and more powerful post-processing APIs.
12+
* `DPF-Post <dpf_post_docs_>`_ : Streamlined and simplified DPF Post Processing. Higher level package and uses ``DPF-Core``.
13+
* `Legacy PyMAPDL Reader <legacy_reader_docs_>`_: Legacy result file reader. Supports result files from MAPDL v14.5 to the current release.
1414

1515
.. currentmodule:: ansys.mapdl.core
1616

doc/source/examples/extended_examples/ex_01-gmsh_example/ex_01-gmsh_example.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ Objective
99
Demonstrate the interoperability of PyAnsys with ``gmsh``, a very well known
1010
open source Python meshing library.
1111

12-
For more information about ``gmsh`` please visit its website: `Gmsh <https://gmsh.info/>`_.
12+
For more information about ``gmsh`` please visit its website: `Gmsh <gmsh_>`_.
1313

1414
Description
1515
-----------
1616
In this example the interoperability of PyAnsys with the open source mesher ``gmsh`` is demonstrated.
1717
Using ``gmsh`` we import an external geometry file in STL format and then the
1818
geometry is imported into PyMAPDL using the
19-
`pymapdl-reader <https://github.com/pyansys/pymapdl-reader>`_ library.
19+
`pymapdl-reader <legacy_reader_docs_>`_ library.
2020

2121
This example is composed of several files.
2222

doc/source/examples/extended_examples/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ this project.
1515
+----------------------------+---------------------------------------------------------------------------------------------------------+
1616
| `Cart-Pole Simulation`_ | Demonstrates a reinforcement machine learning example using MAPDL through PyMAPDL. |
1717
+----------------------------+---------------------------------------------------------------------------------------------------------+
18-
| :ref:`extended_example01` | Demonstrates the interoperability between PyMAPDL and the `gmsh <https://gmsh.info/>`_ meshing library. |
18+
| :ref:`extended_example01` | Demonstrates the interoperability between PyMAPDL and the `gmsh <gmsh_>`_ meshing library. |
1919
+----------------------------+---------------------------------------------------------------------------------------------------------+
2020
| :ref:`python_upf_examples` | Demonstrates the interoperability between ``MAPDL`` user programmable functions and Python. |
2121
+----------------------------+---------------------------------------------------------------------------------------------------------+

doc/source/examples/index.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,11 @@ However in some cases, external files are needed. A link to those files is
5656
available at each example page.
5757
These links refers to the following GitHub repository where you can find all of them:
5858

59-
`GitHub Example Data Repository <https://github.com/pyansys/example-data>`_
59+
`GitHub Example Data Repository <example_data_repo_>`_
6060

6161
If you find out a missing or broken link, please open an issue in
62-
Github (`PyMAPDL Issues <https://github.com/pyansys/pymapdl/issues>`_)
63-
or email us at `PyAnsys Support <[email protected]>`_.
62+
Github (`PyMAPDL Issues <pymapdl_issues_>`_)
63+
or email us at `PyAnsys Support <pyansys_support_>`_.
6464

6565

6666

doc/source/examples/technology_showcase_examples/techdemo-1/ex_0-tecbrakesqueal.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -953,4 +953,4 @@ The following input files were used for this problem:
953953
| `Download all td-nn file sets in a single zip file. <https://storage.ansys.com/doclinks/techdemos.html?code=td-all-DLU-N2a>`_ |
954954
+-------------------------------------------------------------------------------------------------------------------------------------------+
955955

956-
For more information, see `Obtaining the Input Files. <https://ansyshelp.ansys.com/Views/Secured/corp/v212/en/ans_tec/tecintro.html>`_
956+
For more information, see `Obtaining the Input Files. <tech_demo_intro_>`_

doc/source/examples/technology_showcase_examples/techdemo-20/20-example-technology-showcase-dynamic-simulation-PCB.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ Starting MAPDL as a service and importing an external model
5555
.. code-block:: default
5656
5757
58-
import matplotlib.pyplot as plt
58+
import _.pyplot as plt
5959
6060
from ansys.mapdl.core import launch_mapdl
6161
from ansys.mapdl.core.examples import download_tech_demo_data
@@ -1995,7 +1995,7 @@ Using PyMAPDL result reader
19951995
***************************
19961996

19971997
*Not recommended* - PyMAPDL reader library is in process to being deprecated.
1998-
It is recommended to use `DPF Post <https://postdocs.pyansys.com/>`_.
1998+
It is recommended to use `DPF Post <dpf_post_docs_>`_.
19991999

20002000

20012001
.. GENERATED FROM PYTHON SOURCE LINES 163-167

doc/source/examples/technology_showcase_examples/techdemo-28/ex_28-tecfricstir.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1714,9 +1714,10 @@ The following papers are cited in this example problem:
17141714

17151715
The following files were used in this problem:
17161716

1717-
* :download:`fsw.py <https://github.com/pyansys/example-data/blob/master/tech_demos/td-28/fsw.py>` -- Python input file for the friction stir welding (FSW) problem.
1718-
* :download:`fsw.cdb <https://github.com/pyansys/example-data/blob/master/tech_demos/td-28/fsw.cdb>` -- Common database file containing the FSW model information (required by **fsw.py**)
1719-
.
1717+
* :download:`fsw.cdb <https://github.com/pyansys/example-data/blob/master/tech_demos/td-28/fsw.cdb>` -- Common database file containing the FSW model information
1718+
1719+
You can also download the MAPDL files from:
1720+
17201721
* `Download the zipped td-28 file set for this problem. <https://storage.ansys.com/doclinks/techdemos.html?code=td-28-DLU-N2a>`_
17211722
* `Download all td-nn file sets in a single zip file. <https://storage.ansys.com/doclinks/techdemos.html?code=td-all-DLU-N2a>`_
17221723

doc/source/getting_started/docker.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.. _docker:
1+
.. _pymapdl_docker:
22

33
************************
44
Use MAPDL through Docker
@@ -17,14 +17,14 @@ in a containerized environment (for example, Docker or Singularity):
1717

1818
Install the MAPDL image
1919
-----------------------
20-
There is a Docker image hosted on the `PyMAPDL GitHub
21-
<https://https://github.com/pyansys/pymapdl>`_ repository that you
20+
There is a Docker image hosted on the
21+
`PyMAPDL GitHub <pymapdl_repo_>`_ repository that you
2222
can download using your GitHub credentials.
2323

2424
Assuming that you have docker installed, you can get started by
2525
authorizing Docker to access this repository using a personal access
2626
token. Create a GitHub personal access token with ``packages read`` permissions
27-
according to `Creating a personal access token <https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token>`_
27+
according to `Creating a personal access token <gh_creating_pat_>`_
2828

2929
Save that token to a file with:
3030

@@ -127,7 +127,7 @@ with the ```-np``` switch. For example:
127127
docker run -e ANSYSLMD_LICENSE_FILE=$LICENSE_SERVER -p 50052:50052 $IMAGE -np 4
128128
129129
For additional command-line arguments, see the Ansys
130-
documentation at `ANSYS help <https://ansyshelp.ansys.com>`_. Also,
130+
documentation at `ANSYS help <ansys_help_>`_. Also,
131131
be sure to have the appropriate license for additional HPC features.
132132

133133
Use ``--restart`` policy with MAPDL products

doc/source/getting_started/index.rst

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ version of Ansys installed dictates the interface and features
66
available to you.
77

88
For more information on getting a licensed copy of Ansys, visit
9-
`Ansys <https://www.ansys.com/>`_ .
9+
`Ansys <ansys_>`_ .
1010

1111
You can also try the Student Version of Ansys products in
12-
`Ansys Student Versions <https://www.ansys.com/academic/students>`_.
12+
`Ansys Student Versions <ansys_student_version_>`_.
1313
The Student Version is valid during a calendar year with limited capabilities,
1414
such as on the number of nodes and elements.
1515

@@ -32,15 +32,15 @@ Python module
3232
The ``ansys.mapdl.core`` package currently supports Python 3.7 through
3333
Python 3.10 on Windows, Mac OS, and Linux.
3434

35-
Install the latest release from `PyPi
36-
<https://pypi.org/project/ansys-mapdl-core/>`_ with:
35+
Install the latest release from
36+
`PyPi <pymapdl_pypi_>`_ with:
3737

3838
.. code::
3939
4040
pip install ansys-mapdl-core
4141
42-
Alternatively, install the latest from `PyMAPDL GitHub
43-
<https://github.com/pyansys/pymapdl/issues>`_ via:
42+
Alternatively, install the latest from
43+
`PyMAPDL GitHub <pymapdl_issues_>`_ via:
4444

4545
.. code::
4646
@@ -63,8 +63,8 @@ after restarting the Python kernel.
6363
Offline installation
6464
~~~~~~~~~~~~~~~~~~~~
6565
If you lack an internet connection on your install machine, the recommended way
66-
of installing PyMAPDL is downloading the wheelhouse archive from the `Releases
67-
Page <https://github.com/pyansys/pymapdl/releases>`_ for your corresponding
66+
of installing PyMAPDL is downloading the wheelhouse archive from the
67+
`Releases Page <pymapdl_releases_>`_ for your corresponding
6868
machine architecture.
6969

7070
Each wheelhouse archive contains all the python wheels necessary to install
@@ -81,8 +81,7 @@ For example, on Linux with Python 3.7, unzip it and install it with the followin
8181
If you're on Windows with Python 3.9, unzip to a ``wheelhouse`` directory and
8282
install using the same command as above.
8383

84-
Consider installing using a `virtual environment
85-
<https://docs.python.org/3/library/venv.html>`_.
84+
Consider installing using a `virtual environment <using_venv_>`_.
8685

8786

8887
Ansys software requirements

doc/source/getting_started/using_julia.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,17 @@ If you like to work with Julia, you can use Python libraries as if they were Jul
1111
Install Julia
1212
=============
1313

14-
To install Julia, go to their website `<https://julialang.org/>`_ and follow the instructions given in the **Download** section.
14+
To install Julia, go to their website `julia`_ and follow the instructions given in the **Download** section.
1515

16-
* `Windows <https://julialang.org/downloads/platform/#windows>`_
17-
* `Linux <https://julialang.org/downloads/platform/#linux_and_freebsd>`_
18-
* `MacOS <https://julialang.org/downloads/platform/#macos>`_
16+
* `Windows <julia_windows_>`_
17+
* `Linux <julia_linux_and_freebsd_>`_
18+
* `MacOS <julia_macos_>`_
1919

2020
Set the Julia environment
2121
=========================
2222

23-
To have access to Python libraries within Julia, you must install the [PyCall](https://github.com/JuliaPy/PyCall.jl) Julia package.
24-
To install it, run Julia and switch to the package manager by pressing the``"]"`` key.
23+
To have access to Python libraries within Julia, you must install the `PyCall <pycall_>`_ Julia package.
24+
To install it, run Julia and switch to the package manager by pressing the ``"]"`` key.
2525

2626
If you need to work with different package versions or applications, it is beneficial to create a virtual environment in Julia.
2727
To create a virtual environment, use the ``activate`` command with the name of the new environment that you want to create or activate.
@@ -73,7 +73,7 @@ For example:
7373
Install PyMAPDL in Julia
7474
========================
7575

76-
PyCall includes a lightweight Python environment that uses `Conda <https://conda.io>`_ to manage and access Python packages.
76+
PyCall includes a lightweight Python environment that uses `Conda <conda_>`_ to manage and access Python packages.
7777
This environment, currently based on Python 3.9.7, includes the standard basic Python libraries.
7878
However, because it is a fully working Python environment, you can still use it from outside the Julia command line and install Python packages using ``pip``.
7979

doc/source/getting_started/versioning.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ text to and from the MAPDL service, relying on file IO for all other
2424
operations. While not as performant as gRPC, this interface still
2525
allows you to control a local instance of MAPDL. These versions of
2626
MAPDL support specific versions of Windows and Linux. For more information
27-
on the supported platforms, see `Ansys Platform Support
28-
<https://www.ansys.com/solutions/solutions-by-role/it-professionals/platform-support>`_.
27+
on the supported platforms, see
28+
`Ansys Platform Support <ansys_platform_support_>`_.
2929

3030
.. Note::
3131

0 commit comments

Comments
 (0)