Skip to content

Commit

Permalink
Fix import for downloading pdf from UI. (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
margalva authored Jul 13, 2023
1 parent 2fbd24a commit 46a8dc6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 14 deletions.
18 changes: 6 additions & 12 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -55,24 +55,18 @@ features. This is the best place to post questions and code.
Installation
------------
The ``pydynamicreporting`` package supports Python 3.7 through 3.11 on
Windows and Linux. It is currently available only on the Ansys private
repository at `PyAnsysPyPI <https://pkgs.dev.azure.com/pyansys/_packaging/pyansys/pypi>`_.
Windows and Linux. It is currently available on the PyPi
`repository <https://pypi.org/project/ansys-dynamicreporting-core/>`_.

Installing from this private repository requires a PAT (private access
token). For information on obtaining a PAT, see `Release and publishing
<https://dev.docs.pyansys.com/dev/how-to/releasing.html#downloading-artifacts>`_
in the *PyAnsys Developer's Guide*.

To install the package from the Ansys private repository, run this code,
where ``<PAT>`` is the obtained token:
To install the package, simply run

.. code::
pip install --pre ansys-dynamicreporting-core --index-url=https://<PAT>@pkgs.dev.azure.com/pyansys/_packaging/pyansys/pypi/simple/
pip install ansys-dynamicreporting-core
Once the ``pydynamicreporting`` package is publicly available on GitHub, two modes
of installation are available:
Alternatively, the user can download the repository and locally build the
package. Two modes of installation are available:

- Developer installation
- User installation
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ requires = [

[project]
name = "ansys-dynamicreporting-core"
version = "0.4.dev0"
version = "0.5.dev0"
authors = [
{name = "ANSYS, Inc.", email = "pyansys.core@ansys.com"},
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -865,7 +865,7 @@ def export_report_as_pdf(
url = self.build_url_with_query(report_guid, query)
file_path = os.path.abspath(file_name)
if has_qt and (parent is not None):
from report_download_pdf import NexusPDFSave
from .report_download_pdf import NexusPDFSave

app = QtGui.QGuiApplication.instance()
worker = NexusPDFSave(app)
Expand Down

0 comments on commit 46a8dc6

Please sign in to comment.