Skip to content

Repository files navigation

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
    • Validation
  2. Using Pydantic to add options to a form field
    • Computed Fields
  3. Create a JSON editor for a Pydantic model
    • Monaco Editor Validation
  4. Conditionally rendering elements
    • Conditions
  5. Conditionally disabling elements
    • Conditions
  6. Disabling an element when the user interface has errors
    • Conditions Validation
  7. Creating a dialog
    • Modals
  8. Creating a navigation drawer
    • Modals
  9. Changing Pydantic rules based on user input
    • Validation
  10. Complex Pydantic rules
    • Computed Fields Validation
  11. Selecting datafiles from the server
    • Remote Data
  12. Downloading files to the user's computer
    • Remote Data
  13. Running a Galaxy tool
    • Galaxy Asynchronous
  14. Running a Galaxy workflow
    • Galaxy Asynchronous
  15. Working with Plotly
    • Visualization Plotting
  16. Working with Matplotlib
    • Visualization Plotting
  17. Working with VTK
    • Visualization Advanced Graphics
  18. Synchronizing changes between tabs
    • Events

We also provide examples that take advantage of ORNL resources:

  1. Selecting datafiles from the Analysis Cluster
    • Remote Data
  2. Selecting datafiles from ONCat
    • Remote Data ONCat

Running Examples

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}

Running Tests

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

pixi 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.

About

A set of examples for developing with the NOVA framework

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages