Skip to content

Commit 929c6c7

Browse files
authored
Unique operator static documentation (#866)
* Update CI and scripts * Make the operator doc unique again
1 parent 9783e80 commit 929c6c7

File tree

6 files changed

+29
-73
lines changed

6 files changed

+29
-73
lines changed

.ci/build_operators_doc.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import ansys.dpf.core as dpf
2+
from ansys.dpf.core.server_context import (
3+
SERVER_CONTEXT,
4+
)
5+
6+
print(f"Server version: {dpf.global_server().version}")
7+
# Generate entry documentation
8+
print("Generating operator documentation")
9+
print(f"Current context: {SERVER_CONTEXT}")
10+
dpf.operators.utility.html_doc(r"../docs/source/_static/dpf_operators.html").eval()
11+
print("Done.\n")

.ci/operator_doc_per_context.py

Lines changed: 0 additions & 20 deletions
This file was deleted.

.github/workflows/update_operators.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ jobs:
6666
shell: bash
6767
working-directory: .ci
6868
run: |
69-
python operator_doc_per_context.py
69+
python build_operators_doc.py
7070
timeout-minutes: 5
7171

7272
- name: "Show changes"

docs/source/operator_reference.rst

Lines changed: 13 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -6,43 +6,34 @@ Operators
66

77
DPF operators provide for manipulating and transforming simulation data.
88

9-
From DPF Server for Ansys 2023 R2 and later, the operators available in DPF depend on the active
9+
From DPF Server for Ansys 2023 R2 and later, the licensing logic for operators in DPF depend on the active
1010
`ServerContext <https://dpf.docs.pyansys.com/api/ansys.dpf.core.server_context.html#servercontext>`_.
1111

12-
The available contexts are **Entry** and **Premium**. Click a section to discover the operators available in your context.
12+
The available contexts are **Premium** and **Entry**.
13+
Licensed operators are marked as in the documentation using the ``license`` property.
14+
Operators with the ``license`` property as **None** do not require a license check-out.
1315
For more information about using these two contexts, see :ref:`user_guide_server_context`.
16+
Click below to access the operators documentation.
1417

15-
.. grid:: 2
18+
.. grid:: 1
1619

1720
.. grid-item::
18-
.. card:: Operators (Entry)
21+
.. card:: Operators
1922
:link-type: doc
20-
:link: operator_reference_entry
23+
:link: operator_reference_load
2124

22-
Click here to get started with operators available in DPF Entry.
25+
Click here to get started with operators available in DPF.
2326

2427
+++
25-
.. button-link:: ENTRY
28+
.. button-link:: OPEN
2629
:color: secondary
2730
:expand:
2831
:outline:
2932
:click-parent:
3033

31-
.. grid-item::
32-
.. card:: Operators (Premium)
33-
:link-type: doc
34-
:link: operator_reference_premium
35-
36-
Click here to get started with operators
37-
available in DPF Premium.
38-
39-
+++
40-
.. button-link:: PREMIUM
41-
:color: secondary
42-
:expand:
43-
:outline:
44-
:click-parent:
4534

4635
.. note::
47-
For Ansys 2023 R1 and earlier, you should use the Premium documentation.
36+
For Ansys 2023 R1 and earlier, the context is equivalent to Premium, with all operators loaded.
37+
For DPF Server 2023.2.pre0, the server context defines which operators are loaded and
38+
accessible. Use the `PyDPF-Core 0.7 operator documentation<https://dpf.docs.pyansys.com/version/0.7/operator_reference.html#>`_ to learn more.
4839
Some operators in the documentation might not be available for a particular server version.

docs/source/operator_reference_entry.rst renamed to docs/source/operator_reference_load.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
:orphan:
22

3-
=================
4-
Operators (Entry)
5-
=================
3+
=========
4+
Operators
5+
=========
66

77
Loading operators.
88

99
.. raw:: html
1010

1111
<iframe
12-
src="_static/dpf_entry.html#CPython"
12+
src="_static/dpf_operators.html#CPython"
1313
style="
1414
position: fixed;
1515
top: 36px;

docs/source/operator_reference_premium.rst

Lines changed: 0 additions & 26 deletions
This file was deleted.

0 commit comments

Comments
 (0)