Skip to content
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

Edits for overall doc review prior to public release #239

Merged
merged 30 commits into from
Jul 26, 2023
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
5924497
Edits to RST fles
PipKat Jul 11, 2023
3a7e619
Edits to PY files in core/utils
PipKat Jul 11, 2023
f58df9b
Fix Vale issues other than in the calc_functions.rst file
PipKat Jul 11, 2023
d94a937
Fix bad capitalization of PyEnSight
PipKat Jul 11, 2023
fd94f1f
Edits to calc_functions.rst and other minor edits
PipKat Jul 12, 2023
089f364
Run pre-commit and fix typos and a trailing whitespace
PipKat Jul 12, 2023
bf915c4
Resolve Vale issues
PipKat Jul 12, 2023
845c451
Fix remaining Vale issues, mostly by turning Vale off in places
PipKat Jul 12, 2023
e5f844b
Merge branch 'main' into doc/review_for_release
PipKat Jul 13, 2023
88613fb
Merge branch 'main' into doc/review_for_release
PipKat Jul 13, 2023
f7a2ed2
Edits to API PY files
PipKat Jul 13, 2023
c831ab1
Merge branch 'main' into doc/review_for_release
PipKat Jul 14, 2023
6d2c720
Minor edit
PipKat Jul 14, 2023
83f342f
Merge branch 'doc/review_for_release' of https://github.com/pyansys/p…
PipKat Jul 14, 2023
bfa11b3
Edits to RST and PY files for examples
PipKat Jul 14, 2023
8c3a1f8
A few last-minute edits
PipKat Jul 14, 2023
c94dd38
Fix typo
PipKat Jul 14, 2023
cf7aa04
Grrr! Add "enablement" to Vale's accept.txt file
PipKat Jul 14, 2023
cfe0278
Edits to close comments and based on rendered doc through Calculation…
PipKat Jul 17, 2023
23b9204
Fix EnSight not being capitalized correctly
PipKat Jul 17, 2023
933a9a3
Submit edits to resolve comments
PipKat Jul 18, 2023
0f7acea
Use lists for third column displaying options
PipKat Jul 18, 2023
6620aa3
More fixes for formatting issues
PipKat Jul 18, 2023
61eba06
Final attepmt for today to fix formatting issues
PipKat Jul 18, 2023
0f86557
Fix more format issues in the calc_functions.rst file
PipKat Jul 18, 2023
37f0210
Fix missing letter on image extension
PipKat Jul 18, 2023
1d3734c
Remove a comma--last push of the evening!
PipKat Jul 18, 2023
ea20ff6
Merge branch 'main' into doc/review_for_release
PipKat Jul 25, 2023
382728c
Fix spacing issues in calc_functions.rst file
PipKat Jul 25, 2023
9658286
Minor corrections to close the open comments
PipKat Jul 25, 2023
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
130 changes: 69 additions & 61 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,36 +34,53 @@ PyEnSight

Overview
--------
This repository contains the pythonic API to EnSight_, the Ansys simulation Post
Processor. This API allows the user to:
PyEnSight is a Python wrapper for EnSight_, the Ansys simulation
postprocessor. It supports Pythonic access to EnSight so that you
communicate directly with itEnSight from Python. With PyEnSight,
you can perform these essential actions:

* Start an EnSight session, or connect to an existing one.
* Read simulation data (from any of the supported solver output formats) into the session.
* Generate complex post-processing results in a pythonic fashion.
* Start a new EnSight session or connect to an existing one.
* Read simulation data from any supported solver output format into the session.
* Generate complex postprocessing results in a Pythonic fashion.
* Visualize the processed data, extract it, or get a widget to embed it in an external app.

The user can then choose to visualize the processed data, extract it, or
get a widget to embed in an external application.

|title|
Documentation and Issues
------------------------
For comprehensive information on PyEnSight, see the latest release
`documentation <https://ensight.docs.pyansys.com/>`_.

On the `PyEnSight Issues <https://github.com/ansys/pyensight/issues>`_
page, you can create issues to submit questions, report bugs, and
request new features. This is the best place to post questions and code.

Installation
------------
Include installation directions. Note that this README will be
included in your PyPI package, so be sure to include ``pip``
directions along with developer installation directions. For example.
To use PyEnSight, you must have a locally installed and licensed copy of
Ansys EnSight 2022 R2 or later. The ``ansys-pyensight-core`` package supports
Python 3.8 through Python 3.11 on Windows and Linux.

Two modes of installation are available:

Install ansys-ensight with:
- User installation
- Developer installation

User installation
~~~~~~~~~~~~~~~~~
Install the latest release from `PyPI <https://pypi.org/project/ansys-optislang-core/>`_
with this command:

.. code::

pip install ansys-ensight-core
PipKat marked this conversation as resolved.
Show resolved Hide resolved


Development
-----------
Developer installation
~~~~~~~~~~~~~~~~~~~~~~
If you plan on doing local *development* of PyEnSight with GitHub, consider
using a `virtual environment <https://docs.python.org/3/library/venv.html>`_.

To clone and install in development mode:
To clone PyEnSight and then install it in a virtual environment, run these
commands:

.. code::

Expand All @@ -74,9 +91,11 @@ To clone and install in development mode:
source venv/bin/activate # (.\venv\Scripts\activate for Windows shell)
pip install .[dev] # install development dependencies

Now you can start developing pyensight.
A developer installation allows you to edit ``ansys-pyensight`` files locally.
Any changes that you make are reflected in your setup after restarting the
Python kernel.

To build and install pyensight:
To build and install PyEnSight, run these commands:

.. code::

Expand All @@ -86,52 +105,57 @@ To build and install pyensight:
pip install .[tests] # install test dependencies
pytest # Run the tests

Pre-commit setup:
Pre-commit setup
----------------

``pre-commit`` is a multi-language package manager for pre-commit hooks.


To install pre-commit into your git hooks, run:
To install pre-commit into your git hooks, run this command:

.. code::

pre-commit install

pre-commit will now run on every commit. Every time you clone a project using pre-commit, this should always be the first thing you do.
``pre-commit`` then runs on every commit. Each time you clone a project,
installing ``pre-commit`` should always be the first action that you take.

If you want to manually run all pre-commit hooks on a repository, run:
If you want to manually run all pre-commit hooks on a repository, run this
command:

.. code::

pre-commit run --all-files

This will run a bunch of formatters on your source files.
This runs a bunch of formatters on your source files.

To run individual hooks, use:
To run individual hooks, use this command, where ``<hook_id>`` is obtained from
from the ``.pre-commit-config.yaml`` file:

.. code::

pre-commit run <hook_id>

``<hook_id>`` can be obtained from ``.pre-commit-config.yaml``.
The first time pre-commit runs on a file, it will automatically download, install, and run the hook.

The first time pre-commit runs on a file, it automatically downloads, installs,
and runs the hook.

Local GitHub actions:

To simulate GitHub Actions on your local desktop (recommended), install `act <https://github.com/nektos/act#readme>`_.
To run a job, for example - ``docs`` from ``ci_cd.yml``, use:
Local GitHub actions
--------------------
Simulating GitHub Actions on your local desktop is recommended. After installing the
`act <https://github.com/nektos/act#readme>`_ package, you can run a job. For
example, this command runs the ``docs`` job defined in the ``ci_cd.yml`` file:

.. code::

act -j docs

Deploy and upload steps **must always** be ignored. If not, please add ``if: ${{ !env.ACT }}`` to the workflow step (and commit if required) before running.

Deploy and upload steps **must always** be ignored. If they are not ignored, before
running a job, add ``if: ${{ !env.ACT }}`` to the workflow step (and commit if required).

Usage
-----
The simplest PyEnSight session may be started like this:
You can use this code to start the simplest PyEnSight session:

.. code:: python

Expand All @@ -142,7 +166,7 @@ The simplest PyEnSight session may be started like this:
... f.write(data)


Optionally, PyEnSight can work with an EnSight Docker container like this:
Optionally, EnSight can work with an EnSight Docker container using code like this:

.. code:: python

Expand All @@ -154,36 +178,20 @@ Optionally, PyEnSight can work with an EnSight Docker container like this:
>>> with open("image.png", "wb") as f:
... f.write(data)

The ``data_directory`` specifies the host directory to map into the container at the mount point /data within
the container. This provides a method for EnSight running in the container to access the host's file system
to read or write data. The optional argument ``use_dev=True`` specifies that the latest development version
of EnSight should be used.


Dependencies
------------
You will need a locally installed and licensed copy of Ansys to run EnSight, with the
first supported version being Ansys 2022 R2.


Documentation and Issues
------------------------
Please see the latest release `documentation <https://ensight.docs.pyansys.com/>`_
page for more details.

Please feel free to post issues and other questions at `PyEnSight Issues
<https://github.com/ansys/pyensight/issues>`_. This is the best place
to post questions and code.

In the preceding code, the ``data_directory`` argument specifies the host directory
to map into the container at the mount point, providing access to the data within
the container. This provides a method for EnSight running in the container to access
the host's file system to read or write data. The optional ``use_dev=True`` argument
specifies that the latest development version of EnSight should be used.

License
-------
``PyEnSight`` is licensed under the MIT license.
PyEnSight is licensed under the MIT license.

This module, ``ansys-ensight`` makes no commercial claim over Ansys whatsoever.
This tool extends the functionality of ``EnSight`` by adding a remote Python interface
to EnSight without changing the core behavior or license of the original
software. The use of interactive EnSight control by ``PyEnSight`` requires a
PyEnsight makes no commercial claim over Ansys whatsoever. This library extends the functionality
of Ansys EnSight by adding a remote Python interface to EnSight without changing the core behavior
or license of the original software. The use of interactive control of PyEnSight requires a
legally licensed local copy of Ansys.

To get a copy of Ansys, please visit `Ansys <https://www.ansys.com/>`_.
For more information on EnSight, see the `Ansys Ensight <https://www.ansys.com/products/fluids/ansys-ensight>`_
page on the Ansys website.
2 changes: 1 addition & 1 deletion doc/source/_static/README.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Static files will be found here (like images and other assets).
Static files are found here (like images and other assets).
Loading