Conversation
…this seemed to pick displayed data not all data so the update would end up showing blank zone due to first level being for example 218 -> 180 with data in that range...
scottwittenburg
left a comment
There was a problem hiding this comment.
I've added a few comments here and there where I could grasp what was going on. In general, I'm not sure I understand the motivation for this change. Is it all so that you can have sliders on an ipywidget in the jupyter lab notebooks?
Regardless of me understanding the motivation, I didn't see any obvious problems. So if it's passing all the tests, I guess it should be fine. I noticed you added a file under uvcdat-testdata though, you might want to remove that before merging this.
|
|
||
| class TestVCSBoxfillPickFrame(basevcstest.VCSBaseTest): | ||
| def testBoxfillPickFrame(self): | ||
| f = cdms2.open(os.path.join(cdat_info.get_sampledata_path(), "ta_ncep_87-6-88-4.nc")) |
There was a problem hiding this comment.
Should the class and method name be changed to match the filename (i.e. something with isofill)?
There was a problem hiding this comment.
yep... you got me copy/pasting :) Will fix
There was a problem hiding this comment.
Actually these files are no longer need i created a more general test, will remove it.
|
|
||
| try: | ||
| import IPython.display | ||
| import ipywidgets |
There was a problem hiding this comment.
My naive thought would be you set some variable here which you can later use to determine whether you have widgets or not. Otherwise, do you just assume the import worked later on?
| if debug: | ||
| IPython.display.display(self._parent._display_target.out) | ||
| IPython.display.display(*widgets) | ||
| IPython.display.display(IPythonDisplay(st)) |
There was a problem hiding this comment.
Does this mean vcs now depends on IPython? Or maybe it always did, and I just didn't realize it?
There was a problem hiding this comment.
it's inside a try that starts with import IPython. So no it does not depend on it but takes advantage of it if present.
There was a problem hiding this comment.
No you're right it's been moved to its own section but only called from inside the try. I'll still use the variable way you suggested to prevent accidental use.
| debug = False | ||
| try: | ||
| import IPython.display | ||
| # import cdat_notebook |
There was a problem hiding this comment.
I guess there was already a dependency on IPython...
|
Looking back at my review, the mention of adding a baseline image in the Don't forget to remove that 😄 |
|
@sterlingbaldwin @downiec please try it in your envs. If it works for you, let's merge in. |
|
Works for me! |
in a notebook, after plotting, a slider appears for any extra dimensions plotted, moving the slider around update the picture.
Needed to fix a few things in VTK's backend:
update wouldn't work for vectors, isofill where using wrong contours, etc...
I think this is ready to go. Please ignore zillions of
if debug:for now, I need them until we are sure it works.