Skip to content

Commit e13c72f

Browse files
authored
Refactor Getting Started and add Licensing (#1423)
* Add a licensing section Signed-off-by: paul.profizi <[email protected]> * Add a licensing section Signed-off-by: paul.profizi <[email protected]> * Add a licensing section Signed-off-by: paul.profizi <[email protected]> * Add a licensing section Signed-off-by: paul.profizi <[email protected]> * Allow for local build Signed-off-by: paul.profizi <[email protected]> * Fix doc Signed-off-by: paul.profizi <[email protected]> * Fix doc Signed-off-by: paul.profizi <[email protected]> * Fix link Signed-off-by: paul.profizi <[email protected]> * Update compatibility.rst Signed-off-by: paul.profizi <[email protected]> * Update description of licensed operators in licensing.rst Signed-off-by: paul.profizi <[email protected]> * Move and rename getting_started_with_dpf_server.rst to dpf_server.rst Signed-off-by: paul.profizi <[email protected]> * Update the getting started index.rst Signed-off-by: paul.profizi <[email protected]> * Refactor licensing.rst Signed-off-by: paul.profizi <[email protected]> * Refactor dpf_server.rst Signed-off-by: paul.profizi <[email protected]> * Fixes Signed-off-by: paul.profizi <[email protected]> * Fixes Signed-off-by: paul.profizi <[email protected]> * Fixes Signed-off-by: paul.profizi <[email protected]> * Update mentions to ansys_dpf_server Signed-off-by: paul.profizi <[email protected]> * Mark 'dyna' as a valid license increment Signed-off-by: paul.profizi <[email protected]> --------- Signed-off-by: paul.profizi <[email protected]>
1 parent b59499e commit e13c72f

File tree

9 files changed

+355
-250
lines changed

9 files changed

+355
-250
lines changed

doc/source/concepts/waysofusing.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ These capabilities can be accessed through client APIs, as shown here:
3232
.. image:: ../images/drawings/apis_2.png
3333

3434

35-
1. DPF server application can be accessed using Ansys Inc product, or DPF Server package (see :ref:`ref_getting_started_with_dpf_server`) available on the Customer portal.
35+
1. DPF server application can be accessed using Ansys Inc product, or DPF Server package (see :ref:`ref_dpf_server`) available on the Customer portal.
3636

3737
2. Several client APIs are available (CPython, IronPython, C++, and so on).
3838

doc/source/conf.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,8 @@ def verify_meilisearch_is_active(app):
319319
MEILISEARCH_PUBLIC_API_KEY = os.getenv("MEILISEARCH_PUBLIC_API_KEY", None)
320320
if not MEILISEARCH_PUBLIC_API_KEY:
321321
sys.stderr.write("Could not find MEILISEARCH_PUBLIC_API_KEY")
322-
sys.exit(1)
322+
# sys.exit(1)
323+
323324

324325
def setup(app):
325326
app.connect("builder-inited", verify_meilisearch_is_active)

doc/source/getting_started/compatibility.rst

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ more information, see `Ansys Platform Support <https://www.ansys.com/solutions/s
1313
Client-server
1414
-------------
1515

16-
The DPF server version depends on your installed Ansys version.
16+
The DPF server version depends on your installed Ansys version or your installed standalone DPF Server pre-release version.
1717
The following table shows client-server compatibility for supported
1818
Ansys versions. With Ansys 2022 R2 and later, you can use PyDPF-Core ``0.10`` and later.
1919
With Ansys 2021 R2 and 2022 R1, you can use PyDPF-Core
@@ -48,6 +48,16 @@ package should also be synchronized with the server version.
4848
- ``ansys.grpc.dpf`` Python module version
4949
- ``ansys.dpf.gatebin`` binaries Python module version
5050
- ``ansys.dpf.gate`` Python module version
51+
* - 8.0 (Ansys 2024 R2 pre0)
52+
- 0.11.0 and later
53+
- None
54+
- None
55+
- None
56+
* - 7.1 (Ansys 2024 R1)
57+
- 0.10.1 and later
58+
- None
59+
- None
60+
- None
5161
* - 7.0 (Ansys 2024 R1 pre0)
5262
- | 0.10.0 and later
5363
| 0.9.0
@@ -135,15 +145,3 @@ To get a specific version of the ``ansys-dpf-core`` package, such as 0.7.0, use
135145
.. code::
136146
137147
pip install --force-reinstall ansys-dpf-core==0.7.0
138-
139-
.. _target_environment_variable_with_dpf_section:
140-
141-
Environment variable
142-
--------------------
143-
144-
The ``start_local_server()`` method uses the ``Ans.Dpf.Grpc.bat`` file or
145-
``Ans.Dpf.Grpc.sh`` file to start the server. Ensure that the ``AWP_ROOT{VER}``
146-
environment variable is set to your installed Ansys version. For example, if Ansys
147-
2022 R2 is installed, ensure that the ``AWP_ROOT222`` environment
148-
variable is set to the path for this Ansys installation.
149-
Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
.. _ref_dpf_server:
2+
3+
==========
4+
DPF Server
5+
==========
6+
7+
DPF provides numerical simulation users and engineers with a toolbox for accessing and transforming
8+
simulation data. With DPF, you can perform complex preprocessing or postprocessing of large amounts of simulation data within a
9+
simulation workflow.
10+
11+
The DPF Server is packaged within the **Ansys installer** in Ansys 2021 R1 and later.
12+
13+
It is also available as a standalone package that contains all the necessary files to run, enabling DPF capabilities.
14+
The standalone DPF Server is available on the `DPF Pre-Release page <https://download.ansys.com/Others/DPF%20Pre-Release>`_ of the Ansys Customer Portal.
15+
The first standalone version of DPF Server available is 6.0 (2023 R2).
16+
17+
The sections on this page describe how to install and use a standalone DPF Server.
18+
19+
* For a quick start on using PyDPF, see :ref:`ref_getting_started`.
20+
* For more information on DPF and its use, see :ref:`ref_user_guide`.
21+
22+
23+
Install DPF Server
24+
------------------
25+
26+
.. _target_installing_server:
27+
28+
#. Download the ``ansys_dpf_server_win_v2024.2.pre0.zip`` or ``ansys_dpf_server_lin_v2024.2.pre0.zip`` file as appropriate.
29+
#. Unzip the package.
30+
#. Optional: download any other plugin ZIP file as appropriate and unzip the package. For example, to access the ``composites`` plugin for Linux,
31+
download ``ansys_dpf_composites_lin_v2024.2.pre0.zip`` and unzip the package in the same location as ``ansys_dpf_server_lin_v2024.2.pre0.zip``.
32+
#. Change to the root folder (``ansys_dpf_server_win_v2024.2.pre0``) of the unzipped package.
33+
#. In a Python environment, run this command:
34+
35+
.. code::
36+
37+
pip install -e .
38+
39+
40+
As detailed in :ref:`licensing`, a standalone DPF Server is protected using the license terms specified in the
41+
`DPFPreviewLicenseAgreement <https://download.ansys.com/-/media/dpf/dpfpreviewlicenseagreement.ashx?la=en&hash=CCFB07AE38C638F0D43E50D877B5BC87356006C9>`_
42+
file, which is available on the `DPF Pre-Release page <https://download.ansys.com/Others/DPF%20Pre-Release>`_
43+
of the Ansys Customer Portal.
44+
To accept these terms, you must set this environment variable:
45+
46+
.. code::
47+
48+
ANSYS_DPF_ACCEPT_LA=Y
49+
50+
To use :ref:`licensed DPF capabilities <target_to_ansys_license_mechanism>` you must set the
51+
``ANSYSLMD_LICENSE_FILE`` environment variable to point to a valid local or remote license
52+
following indications in :ref:`configure_licensing`.
53+
54+
55+
Use DPF Server
56+
--------------
57+
58+
DPF Server is protected using the license terms specified in the
59+
`DPFPreviewLicenseAgreement <https://download.ansys.com/-/media/dpf/dpfpreviewlicenseagreement.ashx?la=en&hash=CCFB07AE38C638F0D43E50D877B5BC87356006C9>`_
60+
file, which is available on the `DPF Pre-Release page <https://download.ansys.com/Others/DPF%20Pre-Release>`_
61+
of the Ansys Customer Portal.
62+
63+
Run DPF Server with PyDPF
64+
~~~~~~~~~~~~~~~~~~~~~~~~~
65+
66+
PyDPF-Core is a Python client API communicating with a **DPF Server**, either
67+
through the network using gRPC or directly in the same process. PyDPF-Post is a Python
68+
module for postprocessing based on PyDPF-Core.
69+
70+
Both PyDPF-Core and PyDPF-Post can be used with DPF Server. Installation instructions
71+
for PyDPF-Core are available in the PyDPF-Core `Getting started <https://dpf.docs.pyansys.com/version/stable/getting_started/install.html>`_.
72+
Installation instructions for PyDPF-Post are available in the PyDPF-Post `Getting started <https://post.docs.pyansys.com/version/stable/getting_started/install.html>`_.
73+
74+
With PyDPF-Core and PyDPF-Post, the first creation of most DPF entities starts a DPF Server with the current default configuration and context.
75+
For example, the following code automatically starts a DPF Server behind the scenes:
76+
77+
.. code::
78+
79+
from ansys.dpf import core as dpf
80+
data_sources = dpf.DataSources()
81+
82+
With PyDPF-Core, you can also explicitly start a DPF Server using this code:
83+
84+
.. code::
85+
86+
from ansys.dpf import core as dpf
87+
server = dpf.start_local_server()
88+
89+
To start a DPF Server from outside a Python environment, you can also use the execution script provided with your DPF Server package.
90+
On Windows, start the DPF Server by running the ``Ans.Dpf.Grpc.bat`` file in the unzipped package.
91+
On Linux, start the DPF Server by running the ``Ans.Dpf.Grpc.sh`` file in the unzipped package.
92+
93+
Manage multiple DPF Server installations
94+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
95+
96+
PyDPF automatically starts a local instance of a DPF Server when you run a method requiring a
97+
connection to a server, or when you use the ``start_local_server()`` method.
98+
The ``start_local_server()`` method allows to choose, if necessary, which DPF Server installation
99+
to use thanks to its ``ansys_path`` argument.
100+
PyDPF otherwise follows the logic below to automatically detect and choose which locally installed
101+
version of DPF Server to run:
102+
103+
- it uses the ``ANSYS_DPF_PATH`` environment variable in priority if set and targeting a valid path to a DPF Server installation.
104+
- it then checks the currently active Python environment for any installed standalone DPF Server, and uses the latest version available.
105+
- it then checks for ``AWP_ROOTXXX`` environment variables, which are set by the **Ansys installer**, and uses the latest version available.
106+
- if then raises an error if all of the steps above failed to return a valid path to a DPF Server installation.
107+
108+
Run DPF Server in a Docker container
109+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
110+
DPF Server can be run in a Docker container.
111+
112+
#. Along with the ``ansys_dpf_server_lin_v2024.2.pre0.zip`` file mentioned earlier
113+
in :ref:`Install DPF Server <target_installing_server>`, download the ``Dockerfile`` file.
114+
#. Optional: download any other plugin ZIP file as appropriate. For example, to access the ``composites`` plugin for Linux,
115+
download ``ansys_dpf_composites_lin_v2024.2.pre0.zip``.
116+
#. Copy all the ZIP files and ``Dockerfile`` file in a folder and navigate into that folder.
117+
#. To build the DPF Docker container, run the following command:
118+
119+
.. code::
120+
121+
docker build . -t dpf-core:v2024.2.pre0 --build-arg DPF_VERSION=242
122+
123+
5. To run the DPF Docker container, license it. For more information, see :ref:`DPF Preview License Agreement<target_to_license_terms>`.

doc/source/getting_started/index.rst

Lines changed: 22 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -15,66 +15,38 @@ PyDPF-Core is a Python client API communicating with a **DPF Server**, either
1515
through the network using gRPC or directly in the same process.
1616

1717

18-
Install PyDPF-Core
19-
------------------
20-
21-
To install PyDPF-Core, in a Python environment, run this command:
22-
23-
.. code::
24-
25-
pip install ansys-dpf-core
26-
27-
For more installation options, see :ref:`Installation section <installation>`.
28-
29-
3018
Install DPF Server
3119
------------------
3220

21+
To use PyDPF-Core, you need access to a DPF Server.
22+
3323
* DPF Server is packaged within the **Ansys installer** in Ansys 2021 R1 and later.
34-
To use it, download the standard installation using your preferred distribution channel,
35-
and install Ansys following the installer instructions. If you experience problems,
36-
see :ref:`Environment variable <target_environment_variable_with_dpf_section>`. For information on getting
37-
a licensed copy of Ansys, visit the `Ansys website <https://www.ansys.com/>`_.
24+
To use it, download the standard installation using your preferred distribution channel,
25+
and install Ansys following the installer instructions.
26+
For information on getting a licensed copy of Ansys, visit the `Ansys website <https://www.ansys.com/>`_.
3827

39-
* DPF Server is available as a **standalone** package (independent of the Ansys installer) on the
28+
* DPF Server pre-releases are also available as **standalone** packages (independent of the Ansys installer) on the
4029
`DPF Pre-Release page <https://download.ansys.com/Others/DPF%20Pre-Release>`_ of the Ansys Customer Portal.
41-
As explained in :ref:`Ansys licensing <target_to_ansys_license_mechanism>`,
42-
DPF Server is protected by an Ansys license mechanism. Once you have access to an
43-
Ansys license, install DPF Server:
44-
45-
.. card::
30+
As explained in :ref:`ref_licensing`, the standalone DPF Server is still protected by an Ansys license mechanism
31+
and requires accepting the :ref:`DPF Preview License Agreement<target_to_license_terms>`.
32+
Once you have access to an Ansys license, follow the guidelines to :ref:`install a standalone DPF Server <target_installing_server>`.
4633

47-
* Download the ``ansys_dpf_server_win_v2023.2.pre1.zip`` or ``ansys_dpf_server_lin_v2023.2.pre1.zip``
48-
file as appropriate.
49-
* Unzip the package and go to its root folder (``ansys_dpf_server_win_v2023.2.pre1`` or
50-
``ansys_dpf_server_lin_v2023.2.pre1``).
51-
* In a Python environment, run this command:
34+
For more information regarding installing, managing and running DPF servers, see :ref:`ref_dpf_server`.
5235

53-
.. code::
54-
55-
pip install -e .
56-
57-
* DPF Server is protected using the license terms specified in the
58-
`DPFPreviewLicenseAgreement <https://download.ansys.com/-/media/dpf/dpfpreviewlicenseagreement.ashx?la=en&hash=CCFB07AE38C638F0D43E50D877B5BC87356006C9>`_
59-
file, which is available on the `DPF Pre-Release page <https://download.ansys.com/Others/DPF%20Pre-Release>`_
60-
of the Ansys Customer Portal. To accept these terms, you must set this
61-
environment variable:
62-
63-
.. code::
36+
Install PyDPF-Core
37+
------------------
6438

65-
ANSYS_DPF_ACCEPT_LA=Y
39+
To install PyDPF-Core, in a Python environment, run this command:
6640

67-
For more information about the license terms, see :ref:`DPF Preview License Agreement<target_to_license_terms>`.
41+
.. code::
6842
69-
To use a remote license, set the ``ANSYSLMD_LICENSE_FILE`` environment
70-
variable to point to the Ansys license server ``<license_server_to_use>``:
43+
pip install ansys-dpf-core
7144
72-
.. code::
45+
Be sure to check the :ref:`compatibility guidelines <ref_compatibility>` to know if your
46+
DPF Server version is compatible with the latest version of PyDPF-Core.
7347

74-
ANSYSLMD_LICENSE_FILE=1055@<license_server_to_use>
48+
For more installation options, see :ref:`Installation section <installation>`.
7549

76-
For installation methods that do not use `pip <https://pypi.org/project/pip/>`_,
77-
such as using **Docker containers**, see :ref:`ref_getting_started_with_dpf_server`.
7850

7951
Use PyDPF-Core
8052
--------------
@@ -140,8 +112,10 @@ To use PyDPF-Core, in the same Python environment, run this command:
140112

141113
.. toctree::
142114
:hidden:
143-
144-
compatibility
115+
145116
install
117+
dpf_server
118+
compatibility
119+
licensing
146120
dependencies
147121

0 commit comments

Comments
 (0)