diff --git a/episodes/01-Introduction.md b/episodes/01-Introduction.md index b3220fe66ae6a228320f5225fb473135fb719618..39eb80e4904f1c09b045e09cdae3de10890058d5 100755 --- a/episodes/01-Introduction.md +++ b/episodes/01-Introduction.md @@ -23,7 +23,7 @@ exercises: 0 :::::::::::::::::::::::::::::::::::::::::::::::::: -# 1. Introduction to NOVA and NDIP +## Introduction to NOVA and NDIP Welcome to the NOVA tutorial! This guide will walk you through the process of creating applications for the analysis and visualization of neutron scattering data using the NOVA framework. You will learn how to create scripts that interact with the existing tools deployed on the Neutrons Data Interpretation Platform (NDIP), and interactive web applications that can be deployed to NDIP to create simple user interfaces or complex visualizations. All these leverage the NOVA libraries to simplify interaction with the Neutron Data Interpretation Platform (NDIP). diff --git a/episodes/02-Copy-Template.md b/episodes/02-Copy-Template.md index 6267abff6af17db7cf3a331c37c396290f3f2d65..f0ab8cbdb6980e1ed2ef8ce9f5094bb5a7e0865e 100755 --- a/episodes/02-Copy-Template.md +++ b/episodes/02-Copy-Template.md @@ -10,6 +10,7 @@ exercises: 3 - Understand the basic project structure created by the template. - Identify key files in the project (e.g., `pyproject.toml`). - Install project dependencies using `poetry`. +- Deploy the template application to NDIP :::::::::::::::::::::::::::::::::::::::::::::::::: @@ -21,7 +22,7 @@ exercises: 3 :::::::::::::::::::::::::::::::::::::::::::::::::: -# 2. Getting Started with a Template Application +## Getting Started with a Template Application As mentioned in the introduction, all code examples in this tutorial are based on a template application. In this episode, we will create this starting point by cloning a template using the `copier` library. This template provides a basic project structure and pre-configured files that will help us get started quickly with our NOVA project, saving us from setting up everything from scratch. @@ -232,7 +233,7 @@ poetry run deploy-tool This script will: 1. Clone the Galaxy tools repository -2. Copy your tool XML file to the correct location (now configured as `tools/neutrons/tutorials/YOUR_USERNAME-nova-tutorial.xml`) +2. Copy your tool XML file to the correct location (for the tutorial this is configured as `tools/neutrons/tutorials/YOUR_USERNAME-nova-tutorial.xml`) 3. Commit the changes 4. Push to the `prototype` branch of the galaxy-tools repository @@ -248,17 +249,17 @@ Let's understand the key components that make your tool work in NDIP: 1. **Repository Structure**: - Your code is hosted at `https://code.ornl.gov/ndip/tool-sources/tutorial/YOUR_USERNAME-nova-tutorial` - - The Docker container is built automatically by CI and stored at `code.ornl.gov:4567/ndip/tool-sources/tutorial/YOUR_USERNAME-nova-tutorial` + - The Docker container is built automatically by CI and stored at `savannah.ornl.gov/ndip/tool-sources/tutorial/YOUR_USERNAME-nova-tutorial` 2. **Tool XML File**: - Defines your tool for Galaxy/NDIP - References your container so NDIP knows which image to run - Configures the command to run your application - - Is stored in the galaxy-tools repository at `tools/neutrons/tutorials/YOUR_USERNAME-nova-tutorial.xml` + - Is stored on the prototype branch in the galaxy-tools repository at [https://code.ornl.gov/ndip/galaxy-tools/-/tree/prototype/tools/neutrons/tutorials](https://code.ornl.gov/ndip/galaxy-tools/-/tree/prototype/tools/neutrons/tutorials). The xml file will have a name in the format of YOUR_USERNAME-nova-tutorial.xml 3. **Deployment Process**: - When you push code to your repository → CI builds a new container - - When you run `push-xml` → The utility checks if your container exists and pushes your tool XML to the galaxy-tools prototype branch + - When you run `deploy-tool` → The utility checks if your container exists and pushes your tool XML to the galaxy-tools prototype branch - After XML is merged → Your tool appears in the NDIP interface ::::::::::::::::::::::::::::::::::::::::: callout diff --git a/episodes/03-Nova-Galaxy.md b/episodes/03-Nova-Galaxy.md index 778e6e617e36540cce23dfb5aa6815316d2ddaa1..516f37727d5d71f618c58e40a91cf6269d9293a9 100755 --- a/episodes/03-Nova-Galaxy.md +++ b/episodes/03-Nova-Galaxy.md @@ -23,7 +23,7 @@ exercises: 3 :::::::::::::::::::::::::::::::::::::::::::::::::: -# 3. Programming with NDIP +## Programming with NDIP In this episode, we will start using the `nova-galaxy` library to interact with the NDIP platform and run a neutron analysis tool. First, ensure you have set your `GALAXY_URL` and `GALAXY_API_KEY` as environment variables, as explained in the Summary and Setup Episode. We also need to add `nova-galaxy` as a project dependency. diff --git a/episodes/04-MVVM-Design-Pattern.md b/episodes/04-MVVM-Design-Pattern.md index 1005f036082efc4b7ba3480a28ade2e53450d2dd..80d3b55020eb2714e5addcd47ce982a2e45335b7 100755 --- a/episodes/04-MVVM-Design-Pattern.md +++ b/episodes/04-MVVM-Design-Pattern.md @@ -25,7 +25,7 @@ exercises: 2 :::::::::::::::::::::::::::::::::::::::::::::::::: -# 4. User Interface Best Practices: The MVVM Design Pattern +## User Interface Best Practices: The MVVM Design Pattern In this section, we will introduce the Model-View-ViewModel (MVVM) design pattern, a powerful architectural approach for structuring applications, particularly those with user interfaces. We\'ll explore the core principles of MVVM, the roles of each component, and how the NOVA framework simplifies its implementation, making your code more organized, testable, and maintainable. @@ -349,6 +349,21 @@ If you don't want Trame to launch a tab by default, you can instead run ```poetr :::::::::::::::::::::::::::::::::::::::::::::::::: +## Pushing the Updated Tool to NDIP + +Now that we have updated our Fractal tool and integrated it into the NOVA application using the MVVM pattern, the next step is to push these changes to NDIP. This step ensures that the tool on NDIP reflects the latest version of the tool and is available for others. + +Here are the steps to push your changes and deploy the tool: + +1. **Bump the version:** Open the `pyproject.toml` file in the root of your project. Increment the `version` number to `0.2.0` in the `[tool.poetry]` section. Save the file. +2. **Stage your changes:** Use `git add .` to stage all changes that have been made to the application. +3. **Commit your changes:** Create a commit with a descriptive message: `git commit -m "Update Fractal tool with MVVM, bump to version 0.2.0"`. +4. **Push to the repository:** Push your committed changes to the remote repository with `git push`. +5. **Wait for CI/CD:** The push will trigger a CI/CD pipeline in gitlab. Wait for the pipeline to complete which includes building the container image for your tool. You can monitor the pipeline status in the Gitlab interface. +6. **Deploy the tool:** Once the pipeline is successful, run the deployment command from your project's root directory: `poetry run deploy-tool`. + +This process ensures that your updated tool is built, containerized, and made available through NDIP. + ::::::::::::::::::::::::::::::::::::::: challenge **Trigger Pydantic Validation Error (Programmatic)** diff --git a/episodes/05-Working-with-Trame.md b/episodes/05-Working-with-Trame.md index 779c93fe357c67a82ac73d53657e5230f767c125..bb7dd68f4caa0829239ab66bf589ebf83ce84827 100755 --- a/episodes/05-Working-with-Trame.md +++ b/episodes/05-Working-with-Trame.md @@ -28,7 +28,7 @@ exercises: 3 :::::::::::::::::::::::::::::::::::::::::::::::::: -# 5. Web-based User Interface Development +## Web-based User Interface Development In this section, we will dive into Trame and the `nova-trame` library to build interactive web-based user interfaces for our NOVA applications. We\'ll explore how `nova-trame` simplifies UI development within the NOVA ecosystem and how to use common layout components. diff --git a/episodes/06-Advanced-Data-Modeling.md b/episodes/06-Advanced-Data-Modeling.md index 89f9e81effc44dcfcc9be83a11e3e3bdbbae0c8c..2c31525e0e0f25b6641e945864f8602ef7f76aa3 100755 --- a/episodes/06-Advanced-Data-Modeling.md +++ b/episodes/06-Advanced-Data-Modeling.md @@ -24,7 +24,7 @@ exercises: 0 :::::::::::::::::::::::::::::::::::::::::::::::::: -# 6. Advanced Data Validation with Pydantic: Ensuring Data Integrity +## Advanced Data Validation with Pydantic: Ensuring Data Integrity In this section, we will explore Pydantic, a powerful Python library for data validation and settings management. We\'ll delve into the benefits of data validation, how Pydantic works, and best practices for using it effectively within the NOVA framework and the MVVM architecture. diff --git a/episodes/07-Advanced-Visualizations.md b/episodes/07-Advanced-Visualizations.md index 32a9e7b66ec4e9b07dc17d8c5270932db06b05a7..3a2f3b2ac28b5a075d6d427a696753e91e845616 100755 --- a/episodes/07-Advanced-Visualizations.md +++ b/episodes/07-Advanced-Visualizations.md @@ -27,7 +27,7 @@ exercises: 1 :::::::::::::::::::::::::::::::::::::::::::::::::: -# 7. Advanced Visualizations +## Advanced Visualizations In this section, we will look at a selection of the libraries that integrate well with Trame for producing more sophisticated visualizations of your data. Specifically, we will look at Plotly for interactive 2D charts, PyVista for interactive 3D visualizations, and VTK for advanced 3D visualizations. diff --git a/episodes/08-Next-Steps.md b/episodes/08-Next-Steps.md index 7999ba8ce6022cf2c8cfec2a14952041a46b16b8..d9b0e1aedd357b45931137b8af382d97c9b2fcc1 100755 --- a/episodes/08-Next-Steps.md +++ b/episodes/08-Next-Steps.md @@ -3,7 +3,7 @@ title: "Development Cycle and Next Steps" teaching: 20 exercises: 0 --- -# 8. Development Cycle and Next Steps +## Development Cycle and Next Steps In this section, we will look at other resources you may want to integrate with your application.