From 01e2f696afdb363fc098ab377c5914427b6dfabb Mon Sep 17 00:00:00 2001 From: "Ayres, Andrew" Date: Fri, 28 Mar 2025 09:37:02 -0500 Subject: [PATCH 1/7] Minor fixes --- episodes/02-Copy-Template.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/episodes/02-Copy-Template.md b/episodes/02-Copy-Template.md index 6267abff..f9be8ab1 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 :::::::::::::::::::::::::::::::::::::::::::::::::: @@ -248,7 +249,7 @@ 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 @@ -258,7 +259,7 @@ Let's understand the key components that make your tool work in NDIP: 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 -- GitLab From 3ae36be702ea6aebec23afbb77dfc149e8e66ec1 Mon Sep 17 00:00:00 2001 From: "Ayres, Andrew" Date: Fri, 28 Mar 2025 09:40:35 -0500 Subject: [PATCH 2/7] testing key links fix --- episodes/01-Introduction.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/episodes/01-Introduction.md b/episodes/01-Introduction.md index b3220fe6..06e9e2f7 100755 --- a/episodes/01-Introduction.md +++ b/episodes/01-Introduction.md @@ -23,7 +23,7 @@ exercises: 0 :::::::::::::::::::::::::::::::::::::::::::::::::: -# 1. Introduction to NOVA and NDIP +## 1. 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). -- GitLab From 6ebd19edaf3bf94c0278d4f10e5a2381b31022fb Mon Sep 17 00:00:00 2001 From: "Ayres, Andrew" Date: Fri, 28 Mar 2025 09:44:45 -0500 Subject: [PATCH 3/7] fix key links --- episodes/02-Copy-Template.md | 2 +- episodes/03-Nova-Galaxy.md | 2 +- episodes/04-MVVM-Design-Pattern.md | 2 +- episodes/05-Working-with-Trame.md | 2 +- episodes/06-Advanced-Data-Modeling.md | 2 +- episodes/07-Advanced-Visualizations.md | 2 +- episodes/08-Next-Steps.md | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/episodes/02-Copy-Template.md b/episodes/02-Copy-Template.md index f9be8ab1..6244d4ac 100755 --- a/episodes/02-Copy-Template.md +++ b/episodes/02-Copy-Template.md @@ -22,7 +22,7 @@ exercises: 3 :::::::::::::::::::::::::::::::::::::::::::::::::: -# 2. Getting Started with a Template Application +## 2. 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. diff --git a/episodes/03-Nova-Galaxy.md b/episodes/03-Nova-Galaxy.md index 778e6e61..09d416ce 100755 --- a/episodes/03-Nova-Galaxy.md +++ b/episodes/03-Nova-Galaxy.md @@ -23,7 +23,7 @@ exercises: 3 :::::::::::::::::::::::::::::::::::::::::::::::::: -# 3. Programming with NDIP +## 3. 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 1005f036..6ff76c96 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 +## 4. 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. diff --git a/episodes/05-Working-with-Trame.md b/episodes/05-Working-with-Trame.md index 779c93fe..b5ffe358 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 +## 5. 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 89f9e81e..4788f27c 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 +## 6. 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 32a9e7b6..e49bd5fe 100755 --- a/episodes/07-Advanced-Visualizations.md +++ b/episodes/07-Advanced-Visualizations.md @@ -27,7 +27,7 @@ exercises: 1 :::::::::::::::::::::::::::::::::::::::::::::::::: -# 7. Advanced Visualizations +## 7. 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 7999ba8c..d0f3bdf9 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 +## 8. Development Cycle and Next Steps In this section, we will look at other resources you may want to integrate with your application. -- GitLab From a9afa3560db5084d3da90acfa9b84e3e44232aa1 Mon Sep 17 00:00:00 2001 From: "Ayres, Andrew" Date: Fri, 28 Mar 2025 09:53:19 -0500 Subject: [PATCH 4/7] remove numbers from first section --- episodes/01-Introduction.md | 2 +- episodes/02-Copy-Template.md | 2 +- episodes/03-Nova-Galaxy.md | 2 +- episodes/04-MVVM-Design-Pattern.md | 2 +- episodes/05-Working-with-Trame.md | 2 +- episodes/06-Advanced-Data-Modeling.md | 2 +- episodes/07-Advanced-Visualizations.md | 2 +- episodes/08-Next-Steps.md | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/episodes/01-Introduction.md b/episodes/01-Introduction.md index 06e9e2f7..39eb80e4 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 6244d4ac..da9edf94 100755 --- a/episodes/02-Copy-Template.md +++ b/episodes/02-Copy-Template.md @@ -22,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. diff --git a/episodes/03-Nova-Galaxy.md b/episodes/03-Nova-Galaxy.md index 09d416ce..516f3772 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 6ff76c96..552e8c00 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. diff --git a/episodes/05-Working-with-Trame.md b/episodes/05-Working-with-Trame.md index b5ffe358..bb7dd68f 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 4788f27c..2c31525e 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 e49bd5fe..3a2f3b2a 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 d0f3bdf9..d9b0e1ae 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. -- GitLab From aef0d89eba8d575436b7efa0da8268074fabe7e5 Mon Sep 17 00:00:00 2001 From: "Ayres, Andrew" Date: Fri, 28 Mar 2025 10:08:40 -0500 Subject: [PATCH 5/7] add full path for xml file --- episodes/02-Copy-Template.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/episodes/02-Copy-Template.md b/episodes/02-Copy-Template.md index da9edf94..f0ab8cbd 100755 --- a/episodes/02-Copy-Template.md +++ b/episodes/02-Copy-Template.md @@ -233,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 @@ -255,7 +255,7 @@ Let's understand the key components that make your tool work in NDIP: - 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 -- GitLab From c0e47459f24658e0512ef2a7d8bff426d89391e7 Mon Sep 17 00:00:00 2001 From: "Ayres, Andrew" Date: Fri, 28 Mar 2025 10:25:03 -0500 Subject: [PATCH 6/7] Add push tool section --- episodes/04-MVVM-Design-Pattern.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/episodes/04-MVVM-Design-Pattern.md b/episodes/04-MVVM-Design-Pattern.md index 552e8c00..24040231 100755 --- a/episodes/04-MVVM-Design-Pattern.md +++ b/episodes/04-MVVM-Design-Pattern.md @@ -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 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)** -- GitLab From e8db42e85594d7055510186900b61404359f9c2f Mon Sep 17 00:00:00 2001 From: "Ayres, Andrew" Date: Fri, 28 Mar 2025 10:31:57 -0500 Subject: [PATCH 7/7] fix typo --- episodes/04-MVVM-Design-Pattern.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/episodes/04-MVVM-Design-Pattern.md b/episodes/04-MVVM-Design-Pattern.md index 24040231..80d3b550 100755 --- a/episodes/04-MVVM-Design-Pattern.md +++ b/episodes/04-MVVM-Design-Pattern.md @@ -356,7 +356,7 @@ Now that we have updated our Fractal tool and integrated it into the NOVA applic 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 made to the application. +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. -- GitLab