Skip to content

Commit

Permalink
deploy: 326e192
Browse files Browse the repository at this point in the history
  • Loading branch information
johannesloibl committed Nov 28, 2023
0 parents commit 9f170df
Show file tree
Hide file tree
Showing 146 changed files with 28,063 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .buildinfo
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 30bb7cd181cdb7683f68dc9df09b2c07
tags: 645f666f9bcd5a90fca523b33c5a78b7
Binary file added .doctrees/changelog.doctree
Binary file not shown.
Binary file added .doctrees/contact.doctree
Binary file not shown.
Binary file added .doctrees/dev.doctree
Binary file not shown.
Binary file added .doctrees/environment.pickle
Binary file not shown.
Binary file added .doctrees/examples/asset_scripts.doctree
Binary file not shown.
Binary file added .doctrees/examples/demo_reports.doctree
Binary file not shown.
Binary file added .doctrees/examples/index.doctree
Binary file not shown.
Binary file added .doctrees/index.doctree
Binary file not shown.
Binary file added .doctrees/installation.doctree
Binary file not shown.
Binary file added .doctrees/intro.doctree
Binary file not shown.
Binary file added .doctrees/plugins/index.doctree
Binary file not shown.
Binary file added .doctrees/plugins/plugin.doctree
Binary file not shown.
Binary file added .doctrees/reference/api.doctree
Binary file not shown.
Binary file added .doctrees/reference/assets.doctree
Binary file not shown.
Binary file added .doctrees/reference/building.doctree
Binary file not shown.
Binary file added .doctrees/reference/cli.doctree
Binary file not shown.
Binary file added .doctrees/reference/components.doctree
Binary file not shown.
Binary file added .doctrees/reference/directive.doctree
Binary file not shown.
Binary file added .doctrees/reference/index.doctree
Binary file not shown.
Binary file added .doctrees/reference/project_structure.doctree
Binary file not shown.
Binary file added .doctrees/reference/settings.doctree
Binary file not shown.
Binary file added .doctrees/reference/templating.doctree
Binary file not shown.
Binary file added .doctrees/template_designer_guide.doctree
Binary file not shown.
Binary file added .doctrees/user_guide.doctree
Binary file not shown.
Empty file added .nojekyll
Empty file.
16 changes: 16 additions & 0 deletions _images/build_flow.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/chirping_crickets.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions _images/generation_time_templating.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/overview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/pptx.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
377 changes: 377 additions & 0 deletions _modules/index.html

Large diffs are not rendered by default.

477 changes: 477 additions & 0 deletions _modules/pharaoh/assetlib/api.html

Large diffs are not rendered by default.

653 changes: 653 additions & 0 deletions _modules/pharaoh/assetlib/finder.html

Large diffs are not rendered by default.

778 changes: 778 additions & 0 deletions _modules/pharaoh/assetlib/generation.html

Large diffs are not rendered by default.

560 changes: 560 additions & 0 deletions _modules/pharaoh/assetlib/matlab_engine.html

Large diffs are not rendered by default.

583 changes: 583 additions & 0 deletions _modules/pharaoh/assetlib/resource.html

Large diffs are not rendered by default.

1,507 changes: 1,507 additions & 0 deletions _modules/pharaoh/project.html

Large diffs are not rendered by default.

519 changes: 519 additions & 0 deletions _modules/pharaoh/templating/second_level/env_filters.html

Large diffs are not rendered by default.

513 changes: 513 additions & 0 deletions _modules/pharaoh/templating/second_level/env_globals.html

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions _sources/changelog.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Release History
===============

v0.5.0
------
27 changes: 27 additions & 0 deletions _sources/contact.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
=======
Contact
=======

Help!
-----

todo


Bug reports
-----------

If you think you found a bug, please provide following information when contacting us:

- Your operating system name and version
- Infos about your Pharaoh installation:

Open a terminal with your Pharaoh env loaded (e.g. in PyCharm) and type
``pharaoh info`` or ``python -m pharaoh info``.

That should return something like ``Pharaoh vX.Y.Z [Python 3.9.13, Windows-10-10.0.19045-SP0]``.
- Any details about your local setup that might be helpful in troubleshooting
- The complete error message and traceback (not just a screenshot of parts of the error)
- Log files
- Detailed steps to reproduce the bug
- Maybe also a list of packages in your Python env: ``pip freeze > pharaoh_env_packages.txt``
5 changes: 5 additions & 0 deletions _sources/dev.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
===========
Development
===========

todo
4 changes: 4 additions & 0 deletions _sources/examples/asset_scripts.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Asset Scripts
=============

.. image:: /_static/chirping_crickets.gif
13 changes: 13 additions & 0 deletions _sources/examples/demo_reports.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Demo Reports
============

HTML
----

.. image:: /_static/chirping_crickets.gif


Confluence
----------

.. image:: /_static/chirping_crickets.gif
9 changes: 9 additions & 0 deletions _sources/examples/index.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
========
Examples
========

.. toctree::
:maxdepth: 3

demo_reports
asset_scripts
35 changes: 35 additions & 0 deletions _sources/index.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
=======
Pharaoh
=======

Pharaoh is a |Sphinx|-based Python framework for
generating reports in various format (HTML, Confluence, PDF) by combining the power of configurable
|Jinja| templates and Python scripts for asset (tables, plots, pictures, etc...) generation.

.. image:: _static/overview.png
:scale: 75%

=================
Table of Contents
=================

.. toctree::
:maxdepth: 3

intro
installation
user_guide
template_designer_guide
reference/index
plugins/index
examples/index
contact
changelog
dev

Indices and tables
==================

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
85 changes: 85 additions & 0 deletions _sources/installation.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
============
Installation
============

Requirements
============

Any of the following Python versions are compatible.
If you don't have any installed, please download and execute a version by clicking the links below.

- **Python 3.11 (recommended)**
[`Download Python 3.11.4 <https://www.python.org/ftp/python/3.11.4/python-3.11.4-amd64.exe>`_]
- **Python 3.10**
[`Download Python 3.10.11 <https://www.python.org/ftp/python/3.10.11/python-3.10.11-amd64.exe>`_]
- **Python 3.9** (min. 3.9.2)
[`Download Python 3.9.13 <https://www.python.org/ftp/python/3.9.13/python-3.9.13-amd64.exe>`_]


Installation via Pip
====================

Create a virtual environment
----------------------------

A virtual environment has its own Python binary (which matches the version of the binary that was
used to create this environment) and can have its own independent set of installed Python packages
in its site directories.

The easiest way to create a virtual environment, is to let the IDE PyCharm (recommended) create one for you.
`Configure a virtual environment <https://www.jetbrains.com/help/pycharm/creating-virtual-
environment.html#python_create_virtual_env>`_ shows how to do that.

The other option is to create it via command line like follows and then configure PyCharm to use this as
project interpreter.

.. seealso:: `venv — Creation of virtual environments <https://docs.python.org/3/library/venv.html>`_

#. Open a shell (e.g. an Inicio shell or PowerShell)
#. Change into your workspace: :code:`cd C:\\temp`
#. Create a virtual environment: :code:`C:\\Python311\\python.exe -m venv pharaoh_venv`
#. Activate it:

- Powershell :code:`.\\pharaoh_venv\\Scripts\\Activate.ps1`
- Bash: :code:`source ./pharaoh_venv/Scripts/activate`
- Cmd/Bat: :code:`.\\pharaoh_venv\\Scripts\\activate.bat`
#. You should be getting a prefix to your command line like this: :code:`(pharaoh_venv) PS C:\\temp>`
#. Ensure you use binary packages where possible by installing `wheel` first :code:`pip install wheel`

You can find more information about `virtual environments here
<https://packaging.python.org/guides/installing-using-pip-and-virtual-environments/>`_.


Install
-------

After the virtual environment has been created, activate it and install ifx-pharaoh via pip::

pip install pharaoh-report[<extras>]

.. note:: Refer to section :ref:`Extras <section_extras>` to install additional dependencies.

.. note:: For updating Pharaoh to the latest version, append the ``-U`` flag to the pip command

Then you would be able to run::

pip install pharaoh-report[<extras>]


.. _section_extras:

Extras
------

The ``extras`` field is a comma-separated list of additional dependency groups.

Following extra dependencies may be installed, depending on your use case:

- ``bokeh``: Installs the Bokeh plotting framework and exporters
- ``holoview``: Installs the Holoviews plotting framework
- ``plotly``: Installs the Plotly plotting framework and exporters
- ``matplotlib``: Installs the Matplotlib plotting framework
- ``jupyter``: Installs Jupyter for asset script implementation
- ``pandas``: Installs Pandas Data Analysis Library
- ``pdf``: Installs an SVG to PDF converter for the LaTeX builder
- ``all-plotting``: Installs all supported plotting frameworks
88 changes: 88 additions & 0 deletions _sources/intro.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
============
Introduction
============

Pharaoh is a |Sphinx|-based Python framework for
generating reports in various formats (HTML, Confluence, PDF) by combining the power of configurable
|Jinja| templates and Python scripts for asset (tables, plots, pictures, etc...) generation.

.. image:: _static/overview.png
:scale: 75%
:target: _static/showcase_slides.pptx


Click the PowerPoint icon to download the latest presentation slides:

.. image:: _static/pptx.png
:scale: 50%
:target: _static/showcase_slides.pptx


.. _example_report:

.. seealso:: :ref:`examples/demo_reports:Demo Reports` (might not reflect latest development version)


Pharaoh mainly serves two user groups:

**Template Designers**
They are creating pre-defined configurable templates & data post-processing methods and for your project and
therefore provide a simplification layer for the end user.

**End-Users**
They will build reports based on the templates the template designers created.
They provide the final content (assets like plots, table, etc...) and configuration
(context to fill template variables) for the templates.


Working Principle
=================

The standard Pharaoh workflow consists of following major steps:

#. **Project Generation**

Generates a Pharaoh project with one or multiple components based on predefined templates.
Its core is a fully-preconfigured |Sphinx| documentation project.

This generation is called **first-level templating** or **generation-time templating**
further on in the documentation.

It may be checked into GIT for incremental modifications or generated each time, depending on your project setup.

Now the templates and asset scripts in the generated components as well as the project settings
can be modified by the user.

.. image:: _static/generation_time_templating.svg

#. **Asset Generation**

During asset generation, the asset scripts of each component are executed.

By using the resources files of its own and/or other components,
asset scripts are producing dynamic content assets for the later report,
like plots, images, tables and additional data (e.g. json) used for rendering the templates.

Those assets are then registered with metadata, so that they can be searched/included by the templates.

Each asset script may produce any amount of assets.

#. **Project Build**

Translates an existing Pharaoh project to a configured target format (e.g. HTML, Confluence, LaTeX),
while performing an additional templating step via |Jinja|.

This is called **second-level templating** or **build-time templating** further on in the documentation.

Templates may inherit and extend existing or user-defined base-templates (for re-use purposes).

Templates may dynamically include other templates.

Templates are rendered using a rendering context (variables that can be used in template),
that contains following data:

- Project Settings
- Static/manually entered context data
- Dynamic context data, that is created by executing a Python script (potentially accessing generated assets)

.. image:: _static/build_flow.svg
10 changes: 10 additions & 0 deletions _sources/plugins/index.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
=======
Plugins
=======

.. seealso:: :ref:`plugins/plugin:Plugin Architecture`

.. toctree::
:maxdepth: 3

plugin
5 changes: 5 additions & 0 deletions _sources/plugins/plugin.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Plugin Architecture
===================


.. image:: /_static/chirping_crickets.gif
Loading

0 comments on commit 9f170df

Please sign in to comment.