Skip to content

Commit

Permalink
Unique operator static documentation (#866)
Browse files Browse the repository at this point in the history
* Update CI and scripts

* Make the operator doc unique again
  • Loading branch information
PProfizi authored Mar 30, 2023
1 parent 9783e80 commit 929c6c7
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 73 deletions.
11 changes: 11 additions & 0 deletions .ci/build_operators_doc.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import ansys.dpf.core as dpf
from ansys.dpf.core.server_context import (
SERVER_CONTEXT,
)

print(f"Server version: {dpf.global_server().version}")
# Generate entry documentation
print("Generating operator documentation")
print(f"Current context: {SERVER_CONTEXT}")
dpf.operators.utility.html_doc(r"../docs/source/_static/dpf_operators.html").eval()
print("Done.\n")
20 changes: 0 additions & 20 deletions .ci/operator_doc_per_context.py

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/update_operators.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ jobs:
shell: bash
working-directory: .ci
run: |
python operator_doc_per_context.py
python build_operators_doc.py
timeout-minutes: 5

- name: "Show changes"
Expand Down
35 changes: 13 additions & 22 deletions docs/source/operator_reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,43 +6,34 @@ Operators

DPF operators provide for manipulating and transforming simulation data.

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

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

.. grid:: 2
.. grid:: 1

.. grid-item::
.. card:: Operators (Entry)
.. card:: Operators
:link-type: doc
:link: operator_reference_entry
:link: operator_reference_load

Click here to get started with operators available in DPF Entry.
Click here to get started with operators available in DPF.

+++
.. button-link:: ENTRY
.. button-link:: OPEN
:color: secondary
:expand:
:outline:
:click-parent:

.. grid-item::
.. card:: Operators (Premium)
:link-type: doc
:link: operator_reference_premium

Click here to get started with operators
available in DPF Premium.

+++
.. button-link:: PREMIUM
:color: secondary
:expand:
:outline:
:click-parent:

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

=================
Operators (Entry)
=================
=========
Operators
=========

Loading operators.

.. raw:: html

<iframe
src="_static/dpf_entry.html#CPython"
src="_static/dpf_operators.html#CPython"
style="
position: fixed;
top: 36px;
Expand Down
26 changes: 0 additions & 26 deletions docs/source/operator_reference_premium.rst

This file was deleted.

0 comments on commit 929c6c7

Please sign in to comment.