Skip to content

nova-sdk/nova-examples

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
  2. Using Pydantic to add options to a form field
  3. Create a JSON editor for a Pydantic model
  4. Conditionally rendering elements
  5. Conditionally disabling elements
  6. Creating a dialog
  7. Changing Pydantic rules based on user input
  8. Complex Pydantic rules
  9. Selecting datafiles from the server
  10. Downloading files to the user's computer
  11. Running a Galaxy tool
  12. Running a Galaxy workflow
  13. Working with Plotly
  14. Working with Matplotlib
  15. Working with VTK
  16. 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 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

Watchers

Forks

Releases

No releases published

Packages

No packages published