This repository contains examples of how to build application functionalities in the NOVA framework.
- Creating a form for a Pydantic model
- Using Pydantic to add options to a form field
- Create a JSON editor for a Pydantic model
- Conditionally rendering elements
- Conditionally disabling elements
- Creating a dialog
- Changing Pydantic rules based on user input
- Complex Pydantic rules
- Selecting datafiles from the server
- Downloading files to the user's computer
- Running a Galaxy tool
- Running a Galaxy workflow
- Working with Plotly
- Working with Matplotlib
- Working with VTK
- Synchronizing changes between tabs
We also provide examples that take advantage of ORNL resources:
If you want to run the examples, then you will need to install Pixi. Once done, run the following to run an example.
pixi install
pixi run python -m examples.{example_folder}This repo includes an automated test to ensure that each example runs:
pixi run pytestYou 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.
We use the MVVM framework for NOVA applications. With this in mind, each example is broken down into the following sections:
- view - Sets up a Trame GUI for the example.
- model - Sets up a Pydantic model and any business logic needed by the application.
- view_model - Sets up a view model that binds the model and view.
- main.py - Entrypoint for the Trame GUI.