|
| 1 | +.. _ref_report: |
| 2 | + |
| 3 | +User guide |
| 4 | +========== |
| 5 | + |
| 6 | +This section explains how to use ``pyansys-tools-report`` and its features. |
| 7 | + |
| 8 | +Using PyAnsys Tools Report |
| 9 | +-------------------------- |
| 10 | + |
| 11 | +Once the ``pyansys-tools-report`` package is installed in your own personal environment (if not, please proceed |
| 12 | +to :ref:`ref_getting_started`), you can start importing the package and using it. |
| 13 | + |
| 14 | +In order to import the package, please run: |
| 15 | + |
| 16 | +.. code:: python |
| 17 | +
|
| 18 | + import ansys.tools.report as pyansys_report |
| 19 | +
|
| 20 | +The ``pyansys-tools-report`` contains a main class called ``Report``. This class is basically an extension of the |
| 21 | +``scooby.Report``, but customized for showing Ansys libraries and variables in a common format. |
| 22 | + |
| 23 | +The possible arguments that the ``Report`` class accepts can be found in the `API reference <../api/index.html>`_. Please, have a look |
| 24 | +at it to understand the arguments you may use. A simple example of Ansys variables and libraries is shown below. |
| 25 | + |
| 26 | +.. code:: python |
| 27 | +
|
| 28 | + # After defining my_ansys_libs and my_ansys_vars with the needed format (see API Reference) |
| 29 | + # we can start the instantiation of the report |
| 30 | + # |
| 31 | + # Instantiate a Report object |
| 32 | + rep = report.Report(ansys_libs=my_ansys_libs, ansys_vars=my_ansys_vars) |
| 33 | +
|
| 34 | + # For printing the report |
| 35 | + rep |
| 36 | +
|
| 37 | +The typical output of a ``Report`` would look as follows: |
| 38 | + |
| 39 | +.. code-block:: text |
| 40 | +
|
| 41 | + >>> ------------------------------------------------------------------------------- |
| 42 | + >>> PyAnsys Software and Environment Report |
| 43 | + >>> ------------------------------------------------------------------------------- |
| 44 | + >>> Date: Wed Nov 30 14:54:58 2022 Romance Standard Time |
| 45 | + >>> |
| 46 | + >>> OS : Windows |
| 47 | + >>> CPU(s) : 16 |
| 48 | + >>> Machine : AMD64 |
| 49 | + >>> Architecture : 64bit |
| 50 | + >>> Environment : Python |
| 51 | + >>> GPU Vendor : Intel |
| 52 | + >>> GPU Renderer : Intel(R) UHD Graphics |
| 53 | + >>> GPU Version : 4.5.0 - Build 30.0.100.9955 |
| 54 | + >>> |
| 55 | + >>> Python 3.10.4 (tags/v3.10.4:9d38120, Mar 23 2022, 23:13:41) [MSC v.1929 64 bit (AMD64)] |
| 56 | + >>> |
| 57 | + >>> ansys-mapdl-core : X.Y.Z |
| 58 | + >>> ansys-dpf-core : X.Y.Z |
| 59 | + >>> ansys-dpf-post : X.Y.Z |
| 60 | + >>> ansys-dpf-gate : X.Y.Z |
| 61 | + >>> ansys-fluent-core : X.Y.Z |
| 62 | + >>> pyaedt : X.Y.Z |
| 63 | + >>> ansys-platform-instancemanagement : X.Y.Z |
| 64 | + >>> ansys-grantami-bomanalytics : X.Y.Z |
| 65 | + >>> ansys-openapi-common : X.Y.Z |
| 66 | + >>> ansys-mapdl-reader : X.Y.Z |
| 67 | + >>> ansys-fluent-visualization : X.Y.Z |
| 68 | + >>> ansys-fluent-parametric : X.Y.Z |
| 69 | + >>> ansys-sphinx-theme : X.Y.Z |
| 70 | + >>> ansys-seascape : X.Y.Z |
| 71 | + >>> pyansys-tools-report : X.Y.Z |
| 72 | + >>> pyansys-tools-versioning : X.Y.Z |
| 73 | + >>> matplotlib : X.Y.Z |
| 74 | + >>> numpy : X.Y.Z |
| 75 | + >>> pyvista : X.Y.Z |
| 76 | + >>> appdirs : X.Y.Z |
| 77 | + >>> tqdm : X.Y.Z |
| 78 | + >>> pyiges : X.Y.Z |
| 79 | + >>> scipy : X.Y.Z |
| 80 | + >>> grpc : X.Y.Z |
| 81 | + >>> google.protobuf : X.Y.Z |
| 82 | + >>> |
| 83 | + >>> |
| 84 | + >>> ------------------------------------------------------------------------------- |
| 85 | + >>> Ansys Environment Report |
| 86 | + >>> ------------------------------------------------------------------------------- |
| 87 | + >>> |
| 88 | + >>> |
| 89 | + >>> Ansys Installation |
| 90 | + >>> ****************** |
| 91 | + >>> Version Location |
| 92 | + >>> ------------------ |
| 93 | + >>> MyLib1 v1.2 |
| 94 | + >>> MyLib2 v1.3 |
| 95 | + >>> |
| 96 | + >>> |
| 97 | + >>> Ansys Environment Variables |
| 98 | + >>> *************************** |
| 99 | + >>> MYVAR_1 VAL_1 |
| 100 | + >>> MYVAR_2 VAL_2 |
| 101 | +
|
| 102 | +
|
| 103 | +By default, the ``Report`` class would look for a certain set of environment variables. The following |
| 104 | +strings are searched for in the available environment variables. If any match is found, they are included |
| 105 | +in the report: |
| 106 | + |
| 107 | +* ``AWP_ROOT`` |
| 108 | +* ``ANS`` |
| 109 | +* ``MAPDL`` |
| 110 | +* ``FLUENT`` |
| 111 | +* ``AEDT`` |
| 112 | +* ``DPF`` |
| 113 | + |
| 114 | +Also, several Python packages are reported by default. The set of reported packages always includes |
| 115 | +the following list: |
| 116 | + |
| 117 | +* ``ansys-mapdl-core`` |
| 118 | +* ``ansys-dpf-core`` |
| 119 | +* ``ansys-dpf-post`` |
| 120 | +* ``ansys-dpf-gate`` |
| 121 | +* ``ansys-fluent-core`` |
| 122 | +* ``pyaedt`` |
| 123 | +* ``ansys-platform-instancemanagement`` |
| 124 | +* ``ansys-grantami-bomanalytics`` |
| 125 | +* ``ansys-openapi-common`` |
| 126 | +* ``ansys-mapdl-reader`` |
| 127 | +* ``ansys-fluent-visualization`` |
| 128 | +* ``ansys-fluent-parametric`` |
| 129 | +* ``ansys-sphinx-theme`` |
| 130 | +* ``ansys-seascape`` |
| 131 | +* ``pyansys-tools-report`` |
| 132 | +* ``pyansys-tools-versioning`` |
| 133 | +* ``matplotlib`` |
| 134 | +* ``numpy`` |
| 135 | +* ``pyvista`` |
| 136 | +* ``appdirs`` |
| 137 | +* ``tqdm`` |
| 138 | +* ``pyiges`` |
| 139 | +* ``scipy`` |
| 140 | +* ``grpc`` |
| 141 | +* ``google.protobuf`` |
| 142 | + |
| 143 | +If you want the ``Report`` class to look for some extra environment variables by default, please |
| 144 | +`raise an issue <https://github.com/ansys/ansys-tools-common/issues>`_. |
| 145 | + |
| 146 | +Enjoy its use. If you have any doubts, please raise a question/issue in the |
| 147 | +`PyAnsys Tools Report Issues <https://github.com/ansys/ansys-tools-common/issues>`_ site. |
0 commit comments