Skip to content

Latest commit

 

History

History
54 lines (39 loc) · 2.14 KB

File metadata and controls

54 lines (39 loc) · 2.14 KB

NOVA Examples Repository

This repository contains examples of how to build application functionalities in the NOVA framework.

List of Examples

  1. Creating a form for a Pydantic model
  2. Create a JSON editor for a Pydantic model
  3. Conditionally rendering elements
  4. Conditionally disabling elements
  5. Creating a dialog
  6. Changing Pydantic rules based on user input
  7. Complex Pydantic rules
  8. Selecting datafiles from the server
  9. Running a Galaxy tool
  10. Running a Galaxy workflow
  11. Working with Plotly
  12. Working with Matplotlib
  13. Working with VTK
  14. Synchronizing changes between tabs

We also provide examples that take advantage of ORNL resources:

  1. Selecting datafiles from the Analysis Cluster
  2. Selecting datafiles from ONCat

Running Examples

If you want to run the examples, then you will need to install Poetry. Once done, run the following to run an example.

poetry install
poetry run python examples/{example_folder}/main.py

Running Tests

This repo includes an automated test to ensure that each example runs:

poetry install
poetry run pytest

You can set the environment variable INCLUDE_ORNL_TESTS=1 if you want to test the examples that rely on specific ORNL resources. Note that you will need to run them from a location that has access to these resources.

Example Structure

We use the MVVM framework for NOVA applications. With this in mind, each example is broken down into the following sections:

  1. view - Sets up a Trame GUI for the example.
  2. model - Sets up a Pydantic model and any business logic needed by the application.
  3. view_model - Sets up a view model that binds the model and view.
  4. main.py - Entrypoint for the Trame GUI.