Skip to main content

The visualization plattform for ZEN-garden

Project description

ZEN-temple

ZEN-temple is a FastAPI Application that provides a REST API to access results from ZEN-garden. It is used as a backend for ZEN-Explorer.

PyPI - Version Python Version from PEP 621 TOML

GitHub Actions: Type checker

GitHub License

🛠️ Requirements

📦 Installation

Perform the following steps to install ZEN-temple:

  1. Clone the repository and navigate into the folder:

    git clone https://github.com/ZEN-universe/ZEN-temple.git
    cd ZEN-temple
    
  2. Create a new conda environment, activate it, and install all dependencies:

    conda create --name <your-env-name> python==3.13
    conda activate <your-env-name>
    pip install -e .[mypy]
    
  3. Create a new copy of .env.

    cp .env.example .env
    

    Modify the SOLUTION_FOLDER variable to the location of your solutions, e.g. ./outputs. This is the outputs folder generated by ZEN-garden.

▶️ Usage

Open this folder in your terminal. Activate your conda environment for this project and run the application with the following commands:

conda activate <your-env-name>
python -m zen_temple.main --reload

For information about the available command line arguments run:

python -m zen_temple.main --help

📤 Release workflow

To create a new release of ZEN-temple follow the following steps. The idea is that for each major release (from v0.4.x to v0.5.0) we sync the version number of ZEN-explorer and ZEN-temple

  1. Bump version in ZEN-explorer bash scripts/bump_version.sh and update its CHANGELOG.md.
  2. Commit and upload the updated files to GitHub.
  3. Create a new release for ZEN-explorer: https://github.com/ZEN-universe/ZEN-explorer/releases/new
  4. Bump version in ZEN-temple bash scripts/bump_version.sh and update CHANGELOG.md.
  5. Commit and upload the updated files to GitHub.
  6. Create a new release for ZEN-temple, e.g. <version>. For a pre-release also add a suffix .dev1, i.e. <version>.dev1, and mark the release as pre-release: https://github.com/ZEN-universe/ZEN-temple/releases/new
  7. (optional) Look at PyPI whether the new release has successfully been created: https://pypi.org/project/zen-temple/#history

🗂️ Folder structure

The folder and file structure is the following:

Explorer

explorer contains the HTML files for the frontend.

[!WARNING]
Do not edit the files in this folder. This folder is automatically generated by the frontend repository pipeline.

Models

models contains the Pydantic-models that are used for the documentation. Some of these models also include generators that create an instance of the model given the path of a solution. See https://fastapi.tiangolo.com/tutorial/body/#create-your-data-model

Repositories

repositories contains the repositories for the data access. These provide an abstraction layer for the routers such that the data access is separated from the data source. Arguably, the generators defined in the models should be part of the repository in order to separate the instantiation of the models from the way that the solutions are stored. For more information visit https://www.umlboard.com/design-patterns/repository.html

Routers

routers contains the FastAPI routers which define the different paths of the API server. For more information visit https://fastapi.tiangolo.com/tutorial/bigger-applications/

Config

config.py contains the config of the application.

Main

main.py contains the setup of the FastAPI application. For more information visit https://fastapi.tiangolo.com/tutorial/bigger-applications/

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

zen_temple-0.9.4.tar.gz (46.5 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

zen_temple-0.9.4-py3-none-any.whl (46.6 MB view details)

Uploaded Python 3

File details

Details for the file zen_temple-0.9.4.tar.gz.

File metadata

  • Download URL: zen_temple-0.9.4.tar.gz
  • Upload date:
  • Size: 46.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for zen_temple-0.9.4.tar.gz
Algorithm Hash digest
SHA256 34116de39e9320414c69dbc5bb8e95bdecc8718436839fa8b054ded4b0d69ef6
MD5 6d75525bfbeea1b1dae3e8c0550efb5a
BLAKE2b-256 340a452a3a7c07591fa844fa683f1ae01c5af0f8701e3765a17bd22cf1d87a3b

See more details on using hashes here.

Provenance

The following attestation bundles were made for zen_temple-0.9.4.tar.gz:

Publisher: publish-to-pypi.yml on ZEN-universe/ZEN-temple

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file zen_temple-0.9.4-py3-none-any.whl.

File metadata

  • Download URL: zen_temple-0.9.4-py3-none-any.whl
  • Upload date:
  • Size: 46.6 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for zen_temple-0.9.4-py3-none-any.whl
Algorithm Hash digest
SHA256 18a27f0ccf57938306a46f7c18ebcb2c09053a0fc25ad5dd2bb64945cb27434d
MD5 9fa3890890fdde7847eab929d55d531c
BLAKE2b-256 65eceae80ba9700c29b099d5b2b7ede9733e530ce9d2e478c756bbf8bcbf52aa

See more details on using hashes here.

Provenance

The following attestation bundles were made for zen_temple-0.9.4-py3-none-any.whl:

Publisher: publish-to-pypi.yml on ZEN-universe/ZEN-temple

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page