Metadata-Version: 2.4
Name: ansys-dynamicreporting-core
Version: 0.10.1
Summary: Python interface to Ansys Dynamic Reporting
Author-email: "ANSYS, Inc." <pyansys.core@ansys.com>
Maintainer-email: "ANSYS, Inc." <pyansys.core@ansys.com>, Ansys ADR Team <adrteam@ansys.com>
License: MIT
Project-URL: homepage, https://github.com/ansys/pydynamicreporting
Project-URL: documentation, https://dynamicreporting.docs.pyansys.com/
Project-URL: changelog, https://github.com/ansys/pydynamicreporting/blob/main/CHANGELOG.rst
Project-URL: Bug Tracker, https://github.com/ansys/pydynamicreporting/issues
Project-URL: repository, https://github.com/ansys/pydynamicreporting
Project-URL: ci, https://github.com/ansys/pydynamicreporting/actions
Keywords: dynamicreporting,pydynamicreporting,pyansys,ansys
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.10
Description-Content-Type: text/x-rst
License-File: LICENSE
License-File: AUTHORS
Requires-Dist: filelock>=3.7.1
Requires-Dist: docker>=7.1.0
Requires-Dist: pypng>=0.20220715.0
Requires-Dist: requests>=2.32
Requires-Dist: urllib3<3.0.0
Requires-Dist: Pillow>=9.3.0
Requires-Dist: python-dateutil>=2.8.0
Requires-Dist: pytz>=2021.3
Requires-Dist: packaging>=21.0
Requires-Dist: build>=0.8.0
Requires-Dist: django~=4.2
Requires-Dist: djangorestframework~=3.15
Requires-Dist: django-guardian~=2.4
Requires-Dist: tzlocal~=5.0
Requires-Dist: numpy<3,>=1.23.5
Requires-Dist: python-pptx==0.6.19
Requires-Dist: pandas>=2.0
Requires-Dist: statsmodels>=0.14
Requires-Dist: docutils>=0.21
Requires-Dist: psycopg[binary]>=3.2.3
Provides-Extra: test
Requires-Dist: pytest>=8.3.3; extra == "test"
Requires-Dist: pytest-cov>=6.0.0; extra == "test"
Requires-Dist: psutil==6.0.0; extra == "test"
Provides-Extra: test-extra
Requires-Dist: docker>=7.1.0; extra == "test-extra"
Requires-Dist: psutil==6.0.0; extra == "test-extra"
Requires-Dist: exceptiongroup==1.0.0; extra == "test-extra"
Requires-Dist: pytest>=8.3.3; extra == "test-extra"
Requires-Dist: pytest-cov>=6.0.0; extra == "test-extra"
Requires-Dist: pyvista==0.44.1; extra == "test-extra"
Requires-Dist: vtk==9.4.0; extra == "test-extra"
Requires-Dist: ansys-dpf-core==0.13.0; extra == "test-extra"
Provides-Extra: doc
Requires-Dist: ansys-sphinx-theme==1.1.1; extra == "doc"
Requires-Dist: numpydoc==1.8.0; extra == "doc"
Requires-Dist: pillow==10.4.0; extra == "doc"
Requires-Dist: docker>=7.1.0; extra == "doc"
Requires-Dist: Sphinx==8.0.2; extra == "doc"
Requires-Dist: sphinx-copybutton==0.5.2; extra == "doc"
Requires-Dist: sphinx-gallery==0.18.0; extra == "doc"
Provides-Extra: dev
Requires-Dist: build; extra == "dev"
Requires-Dist: packaging; extra == "dev"
Requires-Dist: twine; extra == "dev"
Requires-Dist: ipdb; extra == "dev"
Requires-Dist: ipython; extra == "dev"
Requires-Dist: whatsonpypi; extra == "dev"
Requires-Dist: ansys-sphinx-theme==1.1.1; extra == "dev"
Requires-Dist: numpy<3,>=1.23.5; extra == "dev"
Requires-Dist: numpydoc==1.8.0; extra == "dev"
Requires-Dist: pillow==10.4.0; extra == "dev"
Requires-Dist: psutil==6.0.0; extra == "dev"
Requires-Dist: docker>=7.1.0; extra == "dev"
Requires-Dist: pytest>=8.3.3; extra == "dev"
Requires-Dist: pytest-cov>=6.0.0; extra == "dev"
Requires-Dist: Sphinx==8.0.2; extra == "dev"
Requires-Dist: sphinx-copybutton==0.5.2; extra == "dev"
Requires-Dist: sphinx-gallery==0.18.0; extra == "dev"
Requires-Dist: pre-commit>=4.0.1; extra == "dev"
Requires-Dist: black>=25.0.0; extra == "dev"
Requires-Dist: isort>=6.0.0; extra == "dev"
Dynamic: license-file

PyDynamicReporting
==================

|pyansys| |python| |pypi| |GH-CI| |cov| |MIT| |black|

.. |pyansys| image:: https://img.shields.io/badge/Py-Ansys-ffc107.svg?labelColor=black&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAABDklEQVQ4jWNgoDfg5mD8vE7q/3bpVyskbW0sMRUwofHD7Dh5OBkZGBgW7/3W2tZpa2tLQEOyOzeEsfumlK2tbVpaGj4N6jIs1lpsDAwMJ278sveMY2BgCA0NFRISwqkhyQ1q/Nyd3zg4OBgYGNjZ2ePi4rB5loGBhZnhxTLJ/9ulv26Q4uVk1NXV/f///////69du4Zdg78lx//t0v+3S88rFISInD59GqIH2esIJ8G9O2/XVwhjzpw5EAam1xkkBJn/bJX+v1365hxxuCAfH9+3b9/+////48cPuNehNsS7cDEzMTAwMMzb+Q2u4dOnT2vWrMHu9ZtzxP9vl/69RVpCkBlZ3N7enoDXBwEAAA+YYitOilMVAAAAAElFTkSuQmCC
   :target: https://docs.pyansys.com/
   :alt: PyAnsys

.. |python| image:: https://img.shields.io/pypi/pyversions/ansys-dynamicreporting-core?logo=pypi
   :target: https://pypi.org/project/ansys-dynamicreporting-core/
   :alt: Python

.. |pypi| image:: https://img.shields.io/pypi/v/ansys-dynamicreporting-core.svg?logo=python&logoColor=white
   :target: https://pypi.org/project/ansys-dynamicreporting-core
   :alt: PyPI

.. |GH-CI| image:: https://github.com/ansys/pydynamicreporting/actions/workflows/ci_cd.yml/badge.svg?branch=main
   :target: https://github.com/ansys/pydynamicreporting/actions?query=branch%3Amain
   :alt: GH-CI

.. |cov| image:: https://codecov.io/gh/ansys/pydynamicreporting/graph/badge.svg?token=WCAK7QRLR3
   :target: https://codecov.io/gh/ansys/pydynamicreporting
   :alt: codecov

.. |MIT| image:: https://img.shields.io/badge/License-MIT-yellow.svg
   :target: https://opensource.org/licenses/MIT
   :alt: MIT

.. |black| image:: https://img.shields.io/badge/code%20style-black-000000.svg?style=flat
   :target: https://github.com/psf/black
   :alt: Black

.. _Nexus: https://nexusdemo.ensight.com/docs/html/Nexus.html

Overview
--------
PyDynamicReporting is the Python client library for Ansys Dynamic Reporting,
previously documented as `Nexus`_. Ansys Dynamic Reporting is a service for
pushing items of many types, including images, text, 3D scenes, and tables,
into a database, where you can keep them organized and create dynamic reports
from them. When you use PyDynamicReporting to connect to an instance of
Ansys Dynamic Reporting, you have a Pythonic way of accessing all capabilities
of Ansys Dynamic Reporting.

Documentation and issues
------------------------
Documentation for the latest stable release of PyDynamicReporting is hosted at
`PyDynamicReporting documentation <https://dynamicreporting.docs.pyansys.com/version/stable/>`_.

In the upper right corner of the documentation's title bar, there is an option
for switching from viewing the documentation for the latest stable release
to viewing the documentation for the development version or previously
released versions.

You can also `view <https://cheatsheets.docs.pyansys.com/pydynamicreporting_cheat_sheet.png>`_ or
`download <https://cheatsheets.docs.pyansys.com/pydynamicreporting_cheat_sheet.pdf>`_ the
PyDynamicReporting cheat sheet. This one-page reference provides syntax rules and commands
for using PyDynamicReporting.

On the `PyDynamicReporting Issues <https://github.com/ansys/pydynamicreporting/issues>`_
page, you can create issues to report bugs and request new features. On the `Discussions <https://discuss.ansys.com/>`_
page on the Ansys Developer portal, you can post questions, share ideas, and get community feedback.

To reach the project support team, email `pyansys.core@ansys.com <pyansys.core@ansys.com>`_.

Installation
------------
The ``pydynamicreporting`` package supports Python 3.10 through 3.13 on
Windows and Linux. It is currently available on the PyPi
`repository <https://pypi.org/project/ansys-dynamicreporting-core/>`_.

To install the package, simply run

.. code::

   pip install ansys-dynamicreporting-core

Developer installation
^^^^^^^^^^^^^^^^^^^^^^
To clone and install the ``pydynamicreporting`` package in development mode,
run this code:

.. code::

   git clone https://github.com/ansys/pydynamicreporting
   cd pydynamicreporting
   pip install virtualenv
   virtualenv venv  # create virtual environment
   source venv/bin/activate  # (.\venv\Scripts\activate for Windows shell)
   make install-dev  # install pydynamicreporting in editable mode

The preceding code creates an "editable" installation that lets you develop and test
PyDynamicReporting at the same time.

To build and create a production-like installation on Windows (not required on other OSes),
first install `chocolatey <https://chocolatey.org/install>`_. Then:

.. code::

   choco install make  # install make on Windows
   make clean  # clean
   make build   # build
   # this replaces the editable installation done previously. If you don't want to replace,
   # switch your virtual environments to test the new install separately.
   make install
   # you can skip the steps above and just do 'make all'
   make smoketest  # test import

Local GitHub Actions
^^^^^^^^^^^^^^^^^^^^
To run GitHub Actions on your local desktop (recommended), install the
`act <https://github.com/nektos/act#readme>`_ package.

.. code::

   choco install act-cli

To run a job, such as the ``style`` job from the ``ci_cd.yml`` file, use
this command, where ``style`` is the job name:

.. code::

   act -W '.github/workflows/ci_cd.yml' -j style --bind


Deploy and upload steps **must always** be ignored. If they are not ignored,
before running GitHub Actions locally, add ``if: ${{ !env.ACT }}`` to the
workflow step and commit this change if required.

Local tests
^^^^^^^^^^^
To run tests on your local desktop (recommended), use the `make` target
`test-dev`. This target runs the tests in the same way as GitHub Actions but using
a local Ansys installation instead of Docker. You must specify the path to your Ansys
installation and the test file you are trying to run.

.. code::

   make test-dev TEST_FILE="tests/test_service.py" INSTALL_PATH="C:\Program Files\ANSYS Inc\v252"

Note that any tests that require Docker will obviously fail.

Creating a Release
------------------

- Before creating a new branch, make sure your local repository is up to date:

  .. code-block:: bash

      git pull

  This ensures you have the latest changes from the default branch (usually ``main`` or ``develop``).

- Create a new branch for the release:

  .. code-block:: bash

      git checkout -b release/0.10

  **Important:**
  The release branch must only include the **major** and **minor** version numbers.
  Do not include the patch version.
  For example, use ``release/0.10``, not ``release/0.10.0``.

- If creating a **patch release**, do not create a new branch.
  Instead, reuse the existing ``release/0.10`` branch.

- Update the version number in ``pyproject.toml``:

  If the current version is:

  .. code-block:: toml

      version = "0.10.0.dev0"

  bump it to:

  .. code-block:: toml

      version = "0.10.0"

- **Important:**
  Every time you create a development (``dev``) release, you should first release the corresponding stable version on PyPI before bumping the development version.

  For example:

  - If you are at ``0.10.0.dev0``, first release ``0.10.0`` on PyPI.
  - Then, after the release, bump the version to ``0.10.1.dev0``.

  Otherwise, it may feel confusing to have a ``dev`` version without a corresponding stable release.

- Create a commit for the version bump:

  .. code-block:: bash

      git commit -am "MAINT: Bump version to v0.10.0"

- Then push the branch:

  .. code-block:: bash

      git push --set-upstream origin release/0.10

- Create a tag for the release:

  .. code-block:: bash

      git tag v0.10.0
      git push origin v0.10.0

  **Important:**
  The release tag must always include the full **major.minor.patch** version number.
  Always include the ``v`` prefix.
  For example, use ``v0.10.0``, not ``v0.10``.
  Creating and pushing the tag automatically triggers the release workflow in GitHub Actions.


Dependencies
------------
To use PyDynamicReporting, you must have a locally installed and licensed copy
of Ansys 2023 R2 or later.

To use PyDynamicReporting Serverless (ansys.dynamicreporting.core.serverless),
you must have a locally installed and licensed copy of Ansys 2025 R1 or later.

Basic usage
-----------
This code shows how to start the simplest PyDynamicReporting session:

.. code:: pycon

    >>> import ansys.dynamicreporting.core as adr
    >>> adr_service = adr.Service(ansys_installation=r"C:\Program Files\ANSYS Inc\v232")
    >>> ret = adr_service.connect()
    >>> my_img = adr_service.create_item()
    >>> my_img.item_image = "image.png"
    >>> adr_service.visualize_report()


License and acknowledgements
----------------------------
PyDynamicReporting is licensed under the MIT license.

PyDynamicReporting makes no commercial claim over Ansys whatsoever.
This library extends the functionality of Ansys Dynamic Reporting by
adding a Python interface to Ansys Dynamic Reporting without changing
the core behavior or license of the original software. The use of
PyDynamicReporting requires a legally licensed copy of an Ansys product
that supports Ansys Dynamic Reporting.

To get a copy of Ansys, visit the `Ansys <https://www.ansys.com/>`_ website.
