-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 9f170df
Showing
146 changed files
with
28,063 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Empty file.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
519 changes: 519 additions & 0 deletions
519
_modules/pharaoh/templating/second_level/env_filters.html
Large diffs are not rendered by default.
Oops, something went wrong.
513 changes: 513 additions & 0 deletions
513
_modules/pharaoh/templating/second_level/env_globals.html
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Release History | ||
=============== | ||
|
||
v0.5.0 | ||
------ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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`` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
=========== | ||
Development | ||
=========== | ||
|
||
todo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Asset Scripts | ||
============= | ||
|
||
.. image:: /_static/chirping_crickets.gif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
======== | ||
Examples | ||
======== | ||
|
||
.. toctree:: | ||
:maxdepth: 3 | ||
|
||
demo_reports | ||
asset_scripts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Plugin Architecture | ||
=================== | ||
|
||
|
||
.. image:: /_static/chirping_crickets.gif |
Oops, something went wrong.