This command will download the template to a directory called `nova_tutorial`. Copier will prompt you with a series of questions. Please answer the questions as follows:
***What is the name of your project?**
***What is your project name?**
> Enter `Nova Tutorial`
***What is your python package name?**
***What is your Python package name (use Python naming conventions)?**
> Press enter to accept the default.
@@ -65,7 +65,7 @@ This command will download the template to a directory called `nova_tutorial`. C
> Enter `yes`
***Publish to pypi?**
***Publish to PyPI?**
> Enter `no`
@@ -104,7 +104,7 @@ The template creates a basic project structure to help get you started quickly.
*`nova_tutorial/`: The root directory of your project
*`nova_tutorial/src/`: Contains your application code
*`nova_tutorial/src/nova_tutorial/`: The name of your python package
*`nova_tutorial/src/nova_tutorial/`: The name of your Python package
*`nova_tutorial/tests/`: Contains your application\'s unit tests.
You should see `Fractal tool finished successfully.` printed to the console.
::::::::::::::::::::::::::::::::::::::::: callout
By default, trame will open a new tab in the browser and bring it to focus. If this is undesired behavior, it can be prevented by using ```poetry run app --server```.
At times, it may be desirable to execute a tool or workflow without waiting on the result. The class Tool method run has an optional `wait` parameter. The default is true so that the tool is run in a blocking manner. However, by setting the parameter to false, the tool will be run asynchronously in a non-blocking manner.
The **`nova-mvvm`** library greatly simplifies the data synchronization between the componentes of an MVVM applicationm and provides support for user interfaces utilizing the Trame, PyQt, and Panel graphical frameworks. The library provides several predefined classes including TrameBinding, PyQtBinding, and PanelBinding to connect UI components to model variables. Here, we'll focus on the TrameBinding class, but all three function similarly.
The **`nova-mvvm`** library greatly simplifies the data synchronization between the components of an MVVM application and provides support for user interfaces utilizing the Trame, PyQt, and Panel graphical frameworks. The library provides several predefined classes including TrameBinding, PyQtBinding, and PanelBinding to connect UI components to model variables. Here, we'll focus on the TrameBinding class, but all three function similarly.
### How to use TrameBinding
@@ -154,6 +154,7 @@ Let\'s see how to implement the MVVM pattern using `nova-mvvm` and incorporate P
defrun_fractal(self)->None:
self.model.fractal.run_fractal_tool()
self.update_view()
```
**2. Updating our Fractal Class for pydantaic and MVVM (`src/nova_tutorial/app/models/fractal.py**
@@ -261,7 +262,8 @@ from .fractal_tab import FractalTab # Import the FractalTab
We are now going to modify the existing `main.py` file. Change the main method to match the code below.
* **Instantiate and Run**: In the `main()` function, we create an instance of `Fractal` and call the `run_fractal_tool()` method, wrapped in a `try...except` block for basic error handling:
***Instantiate and Run**: In the `main()` function, we no longer need to setup the Fractal tool as it's managed via our MVVM application now.
```python
importsys
from.models.fractalimportFractal
@@ -291,6 +293,11 @@ poetry run app
The application should launch a tab in your web browser. The GUI will have a `FRACTAL` tab and a few sample tabs which were created by the template application. The run button on the `Fractal` tab can be used to launch the `Fractal` NDIP tool. The tool will take a few minutes to complete but when it does, the resulting `Fractal` image will be displayed.
::::::::::::::::::::::::::::::::::::::::: callout
If you don't want Trame to launch a tab by default, you can instead run ```poetry run app --server```.
* In `Fractal` in `src/nova_tutorial/app/models/fractal.py`, modify the `set_fractal_type` function from the previous exercise to use an *invalid* fractal type:
@@ -3,7 +3,7 @@ title: "Development Cycle and Next Steps"
teaching:10
exercises:0
---
# 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 and outline the process for taking an application like the one we\'ve created in this tutorial and deploying it to the NOVA/NDIP platform. While we won\'t actually perform the deployment in this tutorial, we will cover the key steps and resources involved.