Skip to content

Adding links.rst to docs #1506

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 21 commits into from
Oct 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ env:
# You should go up in number, if you go down (or repeat a previous value)
# you might end up reusing a previous cache if it haven't been deleted already.
# It applies 7 days retention policy by default.
RESET_PIP_CACHE: 8
RESET_EXAMPLES_CACHE: 8
RESET_DOC_BUILD_CACHE: 8
RESET_AUTOSUMMARY_CACHE: 8
RESET_PIP_CACHE: 4
RESET_EXAMPLES_CACHE: 4
RESET_DOC_BUILD_CACHE: 4
RESET_AUTOSUMMARY_CACHE: 4

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ questions or submissions to this repository.


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

[PyAnsys Developer's Guide]: https://dev.docs.pyansys.com/
6 changes: 3 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ or in batch mode on Windows, Linux, and even Mac OS.

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

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

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


Run on Docker
Expand Down
8 changes: 7 additions & 1 deletion doc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ SPHINXOPTS = -j auto
SPHINXBUILD = sphinx-build
SOURCEDIR = source
BUILDDIR = build
LINKCHECKDIR = build/linkcheck

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

checklinks:
$(SPHINXBUILD) -b linkcheck $(SPHINXOPTS) $(LINKCHECKDIR)
@echo
@echo "Check finished. Report is in $(LINKCHECKDIR)."

# manually deploy to https://github.com/pyansys/pymapdl-docs
# WARNING: Use with care as this overwrites history of gh-pages
deploy:
Expand All @@ -48,7 +54,7 @@ deploy:
@echo "Are you sure? [y/N] " && read ans && [ $${ans:-N} = y ]
@echo "Deploying..."
touch build/html/.nojekyll
echo "mapdldocs.pyansys.com" >> build/html/CNAME
echo "mapdl.docs.pyansys.com" >> build/html/CNAME
cd build/html && git init
cd build/html && git add .
cd build/html && git checkout -b gh-pages
Expand Down
8 changes: 8 additions & 0 deletions doc/make.bat
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,14 @@ if "%SPHINXBUILD%" == "" (
)
set SOURCEDIR=source
set BUILDDIR=build
set LINKCHECKDIR=\%BUILDDIR%\linkcheck

if "%1" == "" goto help
if "%1" == "clean" goto clean
if "%1" == "clean-all" goto clean-all
if "%1" == "clean-examples" goto clean-examples
if "%1" == "linkcheck" goto linkcheck


%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
Expand Down Expand Up @@ -46,6 +49,11 @@ goto end
rmdir /s /q source\examples\gallery_examples > /NUL 2>&1
goto end

:linkcheck
%SPHINXBUILD% -b %1 %SPHINXOPTS% %SOURCEDIR% %LINKCHECKDIR%
echo "Check finished. Report is in %LINKCHECKDIR%."
goto end

:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%

Expand Down
7 changes: 7 additions & 0 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,15 @@
".DS_Store",
# because we include this in examples/index.rst
"examples/gallery_examples/index.rst",
"links.rst",
]

# make rst_epilog a variable, so you can add other epilog parts to it
rst_epilog = ""
# Read link all targets from file
with open("links.rst") as f:
rst_epilog += f.read()

# The name of the Pygments (syntax highlighting) style to use.
pygments_style = "sphinx"

Expand Down
18 changes: 9 additions & 9 deletions doc/source/contribution_and_api/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@ Contributing and API
====================

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

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

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

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

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

To reach the project support team, email `[email protected] <[email protected]>`_.
To reach the project support team, email `[email protected] <pyansys_support_>`_.

Viewing PyMAPDL Documentation
=============================

Documentation for the latest stable release of PyMAPDL is hosted at
`PyMAPDL Documentation <https://mapdldocs.pyansys.com>`_.
`PyMAPDL Documentation <pymapdl_docs_>`_.

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

Testing MAPDL
Expand Down Expand Up @@ -81,8 +81,8 @@ Code Style
==========

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

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

Expand Down
6 changes: 3 additions & 3 deletions doc/source/contribution_and_api/post.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ This class contains an API to post-process directly from MAPDL.
Should you wish to post-process MAPDL result files outside of PyMAPDL,
you can use one of the following packages:

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

.. currentmodule:: ansys.mapdl.core

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ Objective
Demonstrate the interoperability of PyAnsys with ``gmsh``, a very well known
open source Python meshing library.

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

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

This example is composed of several files.

Expand Down
2 changes: 1 addition & 1 deletion doc/source/examples/extended_examples/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ this project.
+----------------------------+---------------------------------------------------------------------------------------------------------+
| `Cart-Pole Simulation`_ | Demonstrates a reinforcement machine learning example using MAPDL through PyMAPDL. |
+----------------------------+---------------------------------------------------------------------------------------------------------+
| :ref:`extended_example01` | Demonstrates the interoperability between PyMAPDL and the `gmsh <https://gmsh.info/>`_ meshing library. |
| :ref:`extended_example01` | Demonstrates the interoperability between PyMAPDL and the `gmsh <gmsh_>`_ meshing library. |
+----------------------------+---------------------------------------------------------------------------------------------------------+
| :ref:`python_upf_examples` | Demonstrates the interoperability between ``MAPDL`` user programmable functions and Python. |
+----------------------------+---------------------------------------------------------------------------------------------------------+
Expand Down
6 changes: 3 additions & 3 deletions doc/source/examples/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ However in some cases, external files are needed. A link to those files is
available at each example page.
These links refers to the following GitHub repository where you can find all of them:

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

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



Original file line number Diff line number Diff line change
Expand Up @@ -953,4 +953,4 @@ The following input files were used for this problem:
| `Download all td-nn file sets in a single zip file. <https://storage.ansys.com/doclinks/techdemos.html?code=td-all-DLU-N2a>`_ |
+-------------------------------------------------------------------------------------------------------------------------------------------+

For more information, see `Obtaining the Input Files. <https://ansyshelp.ansys.com/Views/Secured/corp/v212/en/ans_tec/tecintro.html>`_
For more information, see `Obtaining the Input Files. <tech_demo_intro_>`_
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Starting MAPDL as a service and importing an external model
.. code-block:: default


import matplotlib.pyplot as plt
import _.pyplot as plt

from ansys.mapdl.core import launch_mapdl
from ansys.mapdl.core.examples import download_tech_demo_data
Expand Down Expand Up @@ -1995,7 +1995,7 @@ Using PyMAPDL result reader
***************************

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


.. GENERATED FROM PYTHON SOURCE LINES 163-167
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1714,9 +1714,10 @@ The following papers are cited in this example problem:

The following files were used in this problem:

* :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.
* :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**)
.
* :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

You can also download the MAPDL files from:

* `Download the zipped td-28 file set for this problem. <https://storage.ansys.com/doclinks/techdemos.html?code=td-28-DLU-N2a>`_
* `Download all td-nn file sets in a single zip file. <https://storage.ansys.com/doclinks/techdemos.html?code=td-all-DLU-N2a>`_

Expand Down
10 changes: 5 additions & 5 deletions doc/source/getting_started/docker.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.. _docker:
.. _pymapdl_docker:

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

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

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

Save that token to a file with:

Expand Down Expand Up @@ -127,7 +127,7 @@ with the ```-np``` switch. For example:
docker run -e ANSYSLMD_LICENSE_FILE=$LICENSE_SERVER -p 50052:50052 $IMAGE -np 4

For additional command-line arguments, see the Ansys
documentation at `ANSYS help <https://ansyshelp.ansys.com>`_. Also,
documentation at `ANSYS help <ansys_help_>`_. Also,
be sure to have the appropriate license for additional HPC features.

Use ``--restart`` policy with MAPDL products
Expand Down
19 changes: 9 additions & 10 deletions doc/source/getting_started/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ version of Ansys installed dictates the interface and features
available to you.

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

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

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

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

.. code::

pip install ansys-mapdl-core

Alternatively, install the latest from `PyMAPDL GitHub
<https://github.com/pyansys/pymapdl/issues>`_ via:
Alternatively, install the latest from
`PyMAPDL GitHub <pymapdl_issues_>`_ via:

.. code::

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

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

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


Ansys software requirements
Expand Down
14 changes: 7 additions & 7 deletions doc/source/getting_started/using_julia.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@ If you like to work with Julia, you can use Python libraries as if they were Jul
Install Julia
=============

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

* `Windows <https://julialang.org/downloads/platform/#windows>`_
* `Linux <https://julialang.org/downloads/platform/#linux_and_freebsd>`_
* `MacOS <https://julialang.org/downloads/platform/#macos>`_
* `Windows <julia_windows_>`_
* `Linux <julia_linux_and_freebsd_>`_
* `MacOS <julia_macos_>`_

Set the Julia environment
=========================

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

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

PyCall includes a lightweight Python environment that uses `Conda <https://conda.io>`_ to manage and access Python packages.
PyCall includes a lightweight Python environment that uses `Conda <conda_>`_ to manage and access Python packages.
This environment, currently based on Python 3.9.7, includes the standard basic Python libraries.
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``.

Expand Down
4 changes: 2 additions & 2 deletions doc/source/getting_started/versioning.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ text to and from the MAPDL service, relying on file IO for all other
operations. While not as performant as gRPC, this interface still
allows you to control a local instance of MAPDL. These versions of
MAPDL support specific versions of Windows and Linux. For more information
on the supported platforms, see `Ansys Platform Support
<https://www.ansys.com/solutions/solutions-by-role/it-professionals/platform-support>`_.
on the supported platforms, see
`Ansys Platform Support <ansys_platform_support_>`_.

.. Note::

Expand Down
Loading