Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 1.0.1
current_version = 1.0.2
commit = True
tag = True

Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/finalize-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,11 @@ jobs:
- **Apple Silicon (M1/M2/M3)**: Download the \`aarch64\` version
- **Intel Macs**: Download the \`x64\` version

Reminder: After download, use the following command in Terminal to unblock the app for macOS
```
xattr -d com.apple.quarantine <your_filename>.dmg
```

## Support

If you encounter any issues:
Expand Down
10 changes: 0 additions & 10 deletions docs/setup/for_app_developers.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,6 @@ conda activate quickview
pip install -e .
```

----
## Additional requirements

Additional requirements for the app are satisfied once the app is launched
for the very first time using Python virtual environments `venv`. An additional
step for the use is to provide the path to ParaView's Python client that is
distributed with the ParaView binaries. The `pvpython` binary is present in the
`bin` directory of ParaView, on macOS the path is something like
`/Applications/ParaView-5.13.0.app/Contents/bin/pvpython`

----
## Launch the app from command line

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "quickview"
version = "1.0.1"
version = "1.0.2"
description = "An application to explore/analyze data for atmosphere component for E3SM"
authors = [
{name = "Kitware Inc."},
Expand Down
2 changes: 1 addition & 1 deletion quickview/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""QuickView: Visual Analysis for E3SM Atmosphere Data."""

__version__ = "1.0.1"
__version__ = "1.0.2"
__author__ = "Kitware Inc."
__license__ = "Apache-2.0"
234 changes: 30 additions & 204 deletions quickview/interface.py

Large diffs are not rendered by default.

447 changes: 447 additions & 0 deletions quickview/ui/grid.py

Large diffs are not rendered by default.

75 changes: 43 additions & 32 deletions quickview/ui/toolbar.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,42 @@
from trame.widgets import html, vuetify2 as v2
from quickview.ui.view_settings import ViewControls

try:
from trame.widgets import tauri
except ImportError:
# Fallback if tauri is not available
tauri = None

import json


@TrameApp()
class Toolbar:
@task
async def select_data_file(self):
with self.state:
response = await self.ctrl.open("Open Data File")
self.state.data_file = response
self.state.pipeline_valid = False
with self.state as state:
if state.tauri_avail:
response = await self.ctrl.open("Open Data File")
self.state.data_file = response
self.state.pipeline_valid = False
else:
print("Tauri unavailable")

def update_colormap(self, index, value):
"""Update the colormap for a variable."""
self.viewmanager.update_colormap(index, value)

def update_log_scale(self, index, value):
"""Update the log scale setting for a variable."""
self.viewmanager.update_log_scale(index, value)

def update_invert_colors(self, index, value):
"""Update the color inversion setting for a variable."""
self.viewmanager.update_invert_colors(index, value)

@task
async def select_connectivity_file(self):
with self.state:
response = await self.ctrl.open("Open Connectivity File")
self.state.conn_file = response
self.state.pipeline_valid = False
with self.state as state:
if state.tauri_avail:
response = await self.ctrl.open("Open Connectivity File")
self.state.conn_file = response
self.state.pipeline_valid = False
else:
print("Tauri unavailable")

@task
async def export_state(self):
Expand All @@ -36,19 +48,25 @@ async def export_state(self):

if self._generate_state is not None:
config = self._generate_state()
with self.state:
response = await self.ctrl.save("Export State")
export_path = response
with open(export_path, "w") as file:
json.dump(config, file, indent=4)
with self.state as state:
if state.tauri_avail:
response = await self.ctrl.save("Export State")
export_path = response
with open(export_path, "w") as file:
json.dump(config, file, indent=4)
else:
print("Tauri unavailable")

@task
async def import_state(self):
with self.state:
response = await self.ctrl.open("Import State", filter=["json"])
import_path = response
if self._load_state is not None:
self._load_state(import_path)
with self.state as state:
if state.tauri_avail:
response = await self.ctrl.open("Import State", filter=["json"])
import_path = response
if self._load_state is not None:
self._load_state(import_path)
else:
print("Tauri unavailable")

@property
def state(self):
Expand Down Expand Up @@ -94,14 +112,7 @@ def __init__(
**kwargs,
):
self.server = server
if tauri:
with tauri.Dialog() as dialog:
self.ctrl.open = dialog.open
self.ctrl.save = dialog.save
else:
# Fallback for non-tauri environments
self.ctrl.open = lambda title: None
self.ctrl.save = lambda title: None

self._generate_state = generate_state
self._load_state = load_state
self._update_available_color_maps = update_available_color_maps
Expand Down
Loading
Loading