This command will download the template to a directory called `pydantic_mvvm`. Copier will prompt you with a series of questions. Please answer the questions as follows:
@@ -91,7 +91,7 @@ The pandas install is only necessary for loading example data from Plotly, which
Now, we can create a view that displays a Plotly figure.
**1. `PlotlyView` View Class (`src/viz_examples/views/plotly.py`) (Create):**
**1. `PlotlyView` View Class (`src/viz_examples/app/views/plotly.py`) (Create):**
***Imports**: Pay special attention to the plotly import. This module contains a Trame widget that will allow us to quickly add a Plotly chart to our view.
@@ -218,7 +218,7 @@ class PlotlyConfig(BaseModel):
First, let's add replace the sample tabs from the template with the following:
**7. `PyVistaConfig` Model Class (`src/viz_examples/models/pyvista.py`):**
**7. `PyVistaConfig` Model Class (`src/viz_examples/app/models/pyvista.py`):**
***Imports:**`download_knee_full` yields a 3D dataset that is suitable for volume rendering. You can find more datasets in PyVista\'s [Dataset Gallery](https://docs.pyvista.org/api/examples/dataset_gallery).
@@ -403,7 +403,7 @@ PyVista\'s volume rendering engine isn\'t currently suitable for large data. If
@@ -483,7 +483,7 @@ PyVista isn't compatible with VTK 9.4, yet. If you are not using PyVista, there
Once more, let's setup a view and model.
**11. `VTKView` View Class (`src/viz_examples/views/vtk.py`):**
**11. `VTKView` View Class (`src/viz_examples/app/views/vtk.py`):**
***Imports:** The `vtkRenderingVolumeOpenGL2` import is necessary despite being unreferenced.
@@ -544,7 +544,7 @@ class VTKView:
self.render_window.Render()
```
**12. `VTKConfig` Model Class (`src/viz_examples/models/vtk.py`):**
**12. `VTKConfig` Model Class (`src/viz_examples/app/models/vtk.py`):**
***Imports:** We are only using PyVista to get an example dataset. There are two references to it as we use `KNEE_DATA` to compute min/max bounds for the data and `KNEE_DATAFILE` to pass the data file into a VTK reader. The FixedPointVolumeRayCastMapper is CPU-based, but other mappers are available if you need GPU support.
@@ -676,7 +676,7 @@ class VTKConfig:
This is very similar to the Plotly and PyVista setup.