CDAT / jupyter-vcdat

A Jupyter Lab extension based on vCDAT.
BSD 3-Clause "New" or "Revised" License
6 stars 5 forks source link

Check file existence #108

Closed William-Hill closed 5 years ago

William-Hill commented 5 years ago

Used sendSimpleKernelRequest() to check for the existence of the exported plot file.

William-Hill commented 5 years ago

@downiec I added some of the fixes we discussed yesterday. I added a slight delay but the file still takes a moment to show up in the Jupyter Lab UI. I'll look at the Jupyter Lab Filebrowser code to try to use that to detect the new file instead of sending Python code to the kernel. But I'll create a separate PR for that as it may take more time.

doutriaux1 commented 5 years ago

Thx @William-Hill !

downiec commented 5 years ago

@William-Hill Hey so I tested this branch and it looks like the delay between the file showing up in the browser is caused because jupyterlab wasn't refreshing the browser (which means you had to wait for the next auto-refresh interval). I worked on and added a fix that commands JupyterLab to refresh the file browser soon as the 'Exported plot.png' modal pops up. It looks like the export modal is working better now because there's practically no delay between clicking the export button, and seeing the new export in the filebrowser. Test it out and let me know what you think.