Skip to content

Commit 718824d

Browse files
committed
refactor(name): rename compareview to quickcompare
1 parent 2a3fa2e commit 718824d

10 files changed

Lines changed: 279 additions & 17 deletions

File tree

pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,11 @@ packages = [
6262

6363
[project.scripts]
6464
compareview = "e3sm_compareview.app:main"
65+
quickcompare = "e3sm_compareview.app:main"
6566

6667
[project.entry-points."jupyter_serverproxy_servers"]
6768
compareview = "e3sm_compareview.jupyter:setup_compareview"
69+
quickcompare = "e3sm_compareview.jupyter:setup_quickcompare"
6870

6971
[tool.ruff.lint.per-file-ignores]
7072
"e3sm_compareview/pipeline.py" = ["F821"] # Plugin classes loaded dynamically

src-tauri/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "app"
33
version = "1.2.1"
4-
description = "CompareView: Visual Analysis for E3SM Atmosphere Data"
4+
description = "QuickCompare: Visual Analysis for E3SM Atmosphere Data"
55
authors = ["Kitware"]
66
license = ""
77
repository = ""

src-tauri/sidecar/trame-x86_64-unknown-linux-gnu

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
#!/bin/bash
22
basedir=$(cd "$(dirname "$0")/../lib" && pwd)
33

4-
if [ -d "$basedir/compareview" ]; then
4+
if [ -d "$basedir/quickcompare" ]; then
5+
rootdir="$basedir/quickcompare"
6+
elif [ -d "$basedir/compareview" ]; then
57
rootdir="$basedir/compareview"
8+
elif [ -d "$basedir/quick-compare" ]; then
9+
rootdir="$basedir/quick-compare"
610
elif [ -d "$basedir/compare-view" ]; then
711
rootdir="$basedir/compare-view"
812
else
9-
echo "Error: Could not find compareview or compare-view directory in $basedir" >&2
13+
echo "Error: Could not find quickcompare, quick-compare, compareview, or compare-view directory in $basedir" >&2
1014
exit 1
1115
fi
1216

src-tauri/tauri.conf.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"distDir": "./www"
77
},
88
"package": {
9-
"productName": "CompareView",
9+
"productName": "QuickCompare",
1010
"version": "1.2.1"
1111
},
1212
"tauri": {
@@ -69,7 +69,7 @@
6969
"fullscreen": false,
7070
"height": 600,
7171
"resizable": true,
72-
"title": "CompareView",
72+
"title": "QuickCompare",
7373
"width": 800,
7474
"visible": false,
7575
"additionalBrowserArgs": "--force-device-scale-factor=1"

src/e3sm_compareview/app.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
from trame.widgets import vuetify3 as v3
1313

1414
from e3sm_compareview.assets import ASSETS
15-
from e3sm_compareview.components import drawers, file_browser, toolbars
15+
from e3sm_compareview.components import doc, drawers, file_browser, toolbars
1616
from e3sm_compareview.pipeline import EAMVisSource
1717
from e3sm_compareview.view_manager import ViewManager
18-
from e3sm_quickview.components import css, dialogs, doc
18+
from e3sm_quickview.components import css, dialogs
1919
from e3sm_quickview import module as qv_module
2020
from e3sm_quickview.utils import cli, compute
2121

@@ -36,7 +36,7 @@ def __init__(self, server=None):
3636
# Initial UI state
3737
self.state.update(
3838
{
39-
"trame__title": "CompareView",
39+
"trame__title": "QuickCompare",
4040
"trame__favicon": ASSETS.icon,
4141
"is_tauri": False,
4242
"animation_play": False,
Lines changed: 251 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,251 @@
1+
from trame.widgets import html
2+
from trame.widgets import vuetify3 as v3
3+
4+
from e3sm_compareview.assets import ASSETS
5+
from e3sm_quickview.components.doc import (
6+
Bold,
7+
Link,
8+
Paragraph,
9+
Title,
10+
ToolAnimation,
11+
ToolCropping,
12+
ToolDataSelection,
13+
ToolFieldSelection,
14+
ToolFileLoading,
15+
ToolLayoutManagement,
16+
ToolMapProjection,
17+
ToolResetCamera,
18+
ToolStateImportExport,
19+
)
20+
21+
22+
class LandingPage(v3.VContainer):
23+
def __init__(self):
24+
super().__init__(classes="pa-6 pa-md-12")
25+
26+
with self:
27+
html.P(
28+
"QuickCompare",
29+
classes="mt-2 text-h5 font-weight-bold text-sm-h4 text-medium-emphasis",
30+
)
31+
32+
Paragraph(
33+
f"""
34+
{Bold("EAM QuickCompare")} is an open-source, interactive visualization
35+
tool designed for scientists working with the atmospheric component
36+
of the {Link("Energy Exascale Earth System Model (E3SM)", "https://e3sm.org/")},
37+
known as the E3SM Atmosphere Model (EAM).
38+
Its Python- and {Link("Trame", "https://www.kitware.com/trame/")}-based
39+
Graphical User Interface (GUI) provides intuitive access to {Link("ParaView's", "https://www.paraview.org/")} powerful analysis
40+
and visualization capabilities, without the steep learning curve.
41+
"""
42+
)
43+
44+
Paragraph(
45+
f"""
46+
{Bold("QuickCompare")} is an offshoot of {Link("QuickView", "https://github.com/Kitware/QuickView")}.
47+
Its focus is comparison between two or more simulations that use
48+
the same connectivity file.
49+
"""
50+
)
51+
52+
v3.VImg(classes="rounded-lg", src=ASSETS.banner)
53+
54+
Title("Getting started")
55+
56+
with v3.VRow():
57+
with v3.VCol(cols=6):
58+
ToolFileLoading()
59+
ToolFieldSelection()
60+
ToolMapProjection()
61+
ToolResetCamera()
62+
63+
with v3.VCol(cols=6):
64+
ToolLayoutManagement()
65+
ToolCropping()
66+
ToolDataSelection()
67+
ToolAnimation()
68+
ToolStateImportExport()
69+
70+
Title("Keyboard shortcuts")
71+
72+
with v3.VRow():
73+
with v3.VCol(cols=6):
74+
with v3.VRow(classes="ma-0 pb-4"):
75+
v3.VLabel("Toggle help")
76+
v3.VSpacer()
77+
v3.VHotkey(keys="h", variant="contained", inline=True)
78+
79+
with v3.VRow(classes="ma-0 pb-4"):
80+
v3.VLabel("Auto zoom")
81+
v3.VSpacer()
82+
v3.VHotkey(keys="z", variant="contained", inline=True)
83+
84+
with v3.VRow(classes="ma-0 pb-4"):
85+
v3.VLabel("Toggle view interaction lock")
86+
v3.VSpacer()
87+
v3.VHotkey(keys="space", variant="contained", inline=True)
88+
89+
v3.VDivider(classes="mb-4")
90+
91+
with v3.VRow(classes="ma-0 pb-4"):
92+
v3.VLabel("File Open")
93+
v3.VSpacer(classes="mt-2")
94+
v3.VHotkey(keys="f", variant="contained", inline=True)
95+
96+
with v3.VRow(classes="ma-0 pb-4"):
97+
v3.VLabel("Download state")
98+
v3.VSpacer(classes="mt-2")
99+
v3.VHotkey(keys="d", variant="contained", inline=True)
100+
101+
with v3.VRow(classes="ma-0 pb-4"):
102+
v3.VLabel("Upload state")
103+
v3.VSpacer(classes="mt-2")
104+
v3.VHotkey(keys="u", variant="contained", inline=True)
105+
106+
v3.VDivider(classes="mb-4")
107+
108+
with v3.VRow(classes="ma-0 pb-4"):
109+
v3.VLabel("Toggle viewport layout toolbar")
110+
v3.VSpacer(classes="mt-2")
111+
v3.VHotkey(keys="p", variant="contained", inline=True)
112+
with v3.VRow(classes="ma-0 pb-4"):
113+
v3.VLabel("Toggle Lat/Long cropping toolbar")
114+
v3.VSpacer()
115+
v3.VHotkey(keys="l", variant="contained", inline=True)
116+
with v3.VRow(classes="ma-0 pb-4"):
117+
v3.VLabel("Toggle Slice selection toolbar")
118+
v3.VSpacer()
119+
v3.VHotkey(keys="s", variant="contained", inline=True)
120+
with v3.VRow(classes="ma-0 pb-4"):
121+
v3.VLabel("Toggle Animation controls toolbar")
122+
v3.VSpacer()
123+
v3.VHotkey(keys="a", variant="contained", inline=True)
124+
125+
v3.VDivider(classes="mb-4")
126+
127+
with v3.VRow(classes="ma-0 pb-4"):
128+
v3.VLabel("Toggle group layout")
129+
v3.VSpacer()
130+
v3.VHotkey(keys="g", variant="contained", inline=True)
131+
132+
with v3.VRow(classes="ma-0 pb-4"):
133+
v3.VLabel("Toggle variable selection drawer")
134+
v3.VSpacer()
135+
v3.VHotkey(keys="v", variant="contained", inline=True)
136+
137+
v3.VDivider(classes="mb-4")
138+
139+
with v3.VRow(classes="ma-0 pb-4"):
140+
v3.VLabel("Disable all toolbars and drawers")
141+
v3.VSpacer()
142+
v3.VHotkey(keys="esc", variant="contained", inline=True)
143+
144+
with v3.VCol(cols=6):
145+
with v3.VRow(classes="ma-0 pb-2"):
146+
v3.VLabel("Projections")
147+
148+
with v3.VList(density="compact", classes="pa-0 ma-0"):
149+
with v3.VListItem(subtitle="Cylindrical Equidistant"):
150+
with v3.Template(v_slot_append="True"):
151+
v3.VHotkey(keys="c", variant="contained", inline=True)
152+
with v3.VListItem(subtitle="Robinson"):
153+
with v3.Template(v_slot_append="True"):
154+
v3.VHotkey(keys="r", variant="contained", inline=True)
155+
with v3.VListItem(subtitle="Mollweide"):
156+
with v3.Template(v_slot_append="True"):
157+
v3.VHotkey(keys="m", variant="contained", inline=True)
158+
159+
v3.VDivider(classes="my-4")
160+
161+
with v3.VRow(classes="ma-0 pb-2"):
162+
v3.VLabel("Apply size")
163+
164+
with v3.VList(density="compact", classes="pa-0 ma-0"):
165+
with v3.VListItem(subtitle="Auto flow"):
166+
with v3.Template(v_slot_append="True"):
167+
v3.VHotkey(keys="=", variant="contained", inline=True)
168+
with v3.VListItem(subtitle="Auto"):
169+
with v3.Template(v_slot_append="True"):
170+
v3.VHotkey(keys="0", variant="contained", inline=True)
171+
with v3.VListItem(subtitle="1 column"):
172+
with v3.Template(v_slot_append="True"):
173+
v3.VHotkey(keys="1", variant="contained", inline=True)
174+
with v3.VListItem(subtitle="2 columns"):
175+
with v3.Template(v_slot_append="True"):
176+
v3.VHotkey(keys="2", variant="contained", inline=True)
177+
with v3.VListItem(subtitle="3 columns"):
178+
with v3.Template(v_slot_append="True"):
179+
v3.VHotkey(keys="3", variant="contained", inline=True)
180+
with v3.VListItem(subtitle="4 columns"):
181+
with v3.Template(v_slot_append="True"):
182+
v3.VHotkey(keys="4", variant="contained", inline=True)
183+
with v3.VListItem(subtitle="6 columns"):
184+
with v3.Template(v_slot_append="True"):
185+
v3.VHotkey(keys="6", variant="contained", inline=True)
186+
187+
Title("Simulation Files")
188+
189+
Paragraph(
190+
"""
191+
QuickCompare has been developed using EAM's history output on
192+
the physics grids (pg2 grids) written by EAMv2, v3, and an
193+
intermediate version towards v4 (EAMxx).
194+
Those sample output files can be found on Zenodo.
195+
"""
196+
)
197+
Paragraph(
198+
"""
199+
Developers and users of EAM often use tools like NCO and CDO
200+
or write their own scripts to calculate time averages and/or
201+
select a subset of variables from the original model output.
202+
For those use cases, we clarify below the features of the data
203+
format that QuickCompare expects in order to properly read and
204+
visualize the simulation data.
205+
"""
206+
)
207+
208+
Title("Connectivity Files")
209+
210+
Paragraph(
211+
"""
212+
The horizontal grids used by EAM are cubed spheres.
213+
Since these are unstructed grids, QuickCompare needs
214+
to know how to map data to the globe. Therefore,
215+
for each simulation data file, a "connectivity file"
216+
needs to be provided.
217+
"""
218+
)
219+
220+
Paragraph(
221+
"""
222+
In EAMv2, v3, and v4, most of the variables
223+
(physical quantities) are written out on a
224+
"physics grid" (also referred to as "physgrid",
225+
"FV grid", or "control volume mesh") described
226+
in Hannah et al. (2021). The naming convention
227+
for such grids is ne*pg2, with * being a number,
228+
e.g., 4, 30, 120, 256. Further details about EAM's
229+
cubed-sphere grids can be found in EAM's documention,
230+
for example in this overview and this description.
231+
"""
232+
)
233+
Paragraph(
234+
"""
235+
Future versions of QuickCompare will also support the
236+
cubed-sphere meshes used by EAM's dynamical core,
237+
i.e., the ne*np4 grids (also referred to as
238+
"native grids" or "GLL grids").
239+
"""
240+
)
241+
242+
Title("Project Background")
243+
244+
Paragraph(
245+
"""
246+
The lead developer of EAM QuickCompare is Abhishek Yenpure (abhi.yenpure@kitware.com)
247+
at Kitware, Inc.. Other key contributors at Kitware, Inc. include Berk Geveci and
248+
Sebastien Jourdain. Key contributors on the atmospheric science side are Hui Wan
249+
and Kai Zhang at Pacific Northwest National Laboratory.
250+
"""
251+
)

src/e3sm_compareview/components/drawers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
class AppLogo(v3.VTooltip):
1212
def __init__(self, compact="compact_drawer"):
1313
super().__init__(
14-
text=f"CompareView {app_version}",
14+
text=f"QuickCompare {app_version}",
1515
disabled=(f"!{compact}",),
1616
)
1717
with self:

src/e3sm_compareview/components/file_browser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ def ui(self):
433433
density="compact",
434434
variant="outlined",
435435
disabled=True,
436-
messages="The horizontal grids used by EAM are cubed spheres. Since these are unstructured grids, CompareView needs to know how to map data to the globe. Therefore, for each simulation data file, a connectivity file needs to be provided.",
436+
messages="The horizontal grids used by EAM are cubed spheres. Since these are unstructured grids, QuickCompare needs to know how to map data to the globe. Therefore, for each simulation data file, a connectivity file needs to be provided.",
437437
)
438438

439439
v3.VDivider()
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
"""Jupyter integration for CompareView via jupyter-server-proxy."""
1+
"""Jupyter integration for QuickCompare via jupyter-server-proxy."""
22

3-
from .proxy import setup_compareview
3+
from .proxy import setup_compareview, setup_quickcompare
44

55
# Backward compatibility alias.
66
setup_quickview = setup_compareview
77

8-
__all__ = ["setup_compareview", "setup_quickview"]
8+
__all__ = ["setup_compareview", "setup_quickcompare", "setup_quickview"]

src/e3sm_compareview/jupyter/proxy.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
1-
"""Server proxy configuration for CompareView in JupyterLab."""
1+
"""Server proxy configuration for QuickCompare in JupyterLab."""
22

33
import os
44

55

66
def setup_compareview():
7-
"""Configure jupyter-server-proxy for CompareView."""
7+
"""Configure jupyter-server-proxy for QuickCompare."""
8+
return setup_quickcompare()
9+
10+
11+
def setup_quickcompare():
12+
"""Configure jupyter-server-proxy for QuickCompare."""
813
icon_path = os.path.join(
914
os.path.dirname(os.path.abspath(__file__)),
1015
"icons",
@@ -13,7 +18,7 @@ def setup_compareview():
1318

1419
return {
1520
"command": [
16-
"compareview",
21+
"quickcompare",
1722
"--server",
1823
"--port",
1924
"{port}",
@@ -23,7 +28,7 @@ def setup_compareview():
2328
"timeout": 30,
2429
"launcher_entry": {
2530
"enabled": True,
26-
"title": "CompareView",
31+
"title": "QuickCompare",
2732
"icon_path": icon_path,
2833
"category": "Other",
2934
},

0 commit comments

Comments
 (0)