-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Analytics explorer #162
base: main
Are you sure you want to change the base?
Analytics explorer #162
Conversation
The `esgf` color maps are no longer kept in pan3d
pan3d/explorers/analytics.py
Outdated
"""Create a Trame GUI for a Pan3D XArray Viewer""" | ||
|
||
def __init__(self, xarray=None, server=None, local_rendering=None): | ||
"""Create an instance of the XArrayViewer class. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wrong class name in comment
self.ctrl.on_server_reload.add(self._build_ui) | ||
|
||
# cli | ||
self.server.cli.add_argument( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we've never done that in the previous apps, but it might be good for the CLI to create a group for those add-on args so they don't get bundled with the rest of the trame/wslink ones. The idea, will be that when we run with --help
we can clearly identify the ones that are for that explorer/app.
self._setup_vtk() | ||
self._build_ui() | ||
print("forcing update figure", self.state.color_by) | ||
self.plotting.on_change_active_plot() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should automatically be called right before on_server_ready as there is a @state.change attached to it. You should not need to make that call here.
def ctrl(self): | ||
"""Returns the Controller for the trame server.""" | ||
return self.server.controller | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We may want to add to that list of "trame" methods those ones.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could create a pan3d abstract class for an "app". That way we can get the boiler plate code done for all.
This could even include the vtk_setup for the render window (but no more)
pan3d/explorers/analytics.py
Outdated
def _build_ui(self, **kwargs): | ||
print("Control : ", self.state.control_expended) | ||
|
||
self.state.trame__title = "XArray Viewer" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you want to use your own name?
pan3d/ui/analytics.py
Outdated
from trame.widgets import vuetify3 as v3, plotly, html | ||
|
||
import hashlib | ||
import xcdat # noqa |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you need xcdat
here?
@@ -22,6 +22,16 @@ html { | |||
z-index: 2; | |||
} | |||
|
|||
.controllerbr { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is controllerbr
a good name?
pan3d/ui/vtk_view.py
Outdated
@@ -233,6 +233,9 @@ def _on_view_type_change(self, view_3d, **_): | |||
self.ctrl.view_reset_camera() | |||
|
|||
|
|||
print(type(Pan3DView)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove debug?
This issue addresses |
A work in progress PR for the analytics explorer
ToDo:
xcdat
not available