widgetti / ipypopout Goto Github PK
View Code? Open in Web Editor NEWDisplay parts of your ipywidgets or solara app in separate browser windows
License: MIT License
Display parts of your ipywidgets or solara app in separate browser windows
License: MIT License
The popout feature in Jdaviz works when voila is deployed to localhost, e.g. "http://localhost:8000". The data-base-url
is set to /
and the Jdaviz loads fine. However for our production deployments of Jdaviz embedded, the Jdaviz popout feature fails to render properly.
For our deploys, voila is deployed to urls like "http://masttest.stsci.edu/voila". Our base url is /voila
. Without the trailing slash, the popout url is https://masttest.stsci.edu/voilavoila/templates/ipypopout/static/popout.html?kernelid=81e1412a-72a2-4cc7-ba8b-2113e611d7d1&modelid=2614b11e26884e799e102313ceb8bad6&baseurl=/voila
, which returns a 404 error.
When I ensure a trailing slash such that the base url is /voila/
the popout url is https://masttest.stsci.edu/voila/templates/ipypopout/static/popout.html?kernelid=81e1412a-72a2-4cc7-ba8b-2113e611d7d1&modelid=2614b11e26884e799e102313ceb8bad6&baseurl=/
. which fails to find the correct resource and renders internally a 403 or 404 error. The base url is getting stripped back to /
, seemingly here https://github.com/mariobuikhuizen/ipypopout/blob/e1603515cf641e42f3781b327ddf9d8206736bf6/ipypopout/popout_button.vue#L43
I can manually edit the popout url to the following, which both render Jdaviz successfully. Either https://masttest.stsci.edu/voila/templates/ipypopout/static/popout.html?kernelid=81e1412a-72a2-4cc7-ba8b-2113e611d7d1&modelid=2614b11e26884e799e102313ceb8bad6&baseurl=/voila/
or
https://masttest.stsci.edu/voila/voila/templates/ipypopout/static/popout.html?kernelid=81e1412a-72a2-4cc7-ba8b-2113e611d7d1&modelid=2614b11e26884e799e102313ceb8bad6&baseurl=/voila/
work ok.
This could be an edge case just for us, but I think there should be some sort of a catch so servers deployed to /voila/
still work correctly . Or is there a manual hack we could do to get this working for us?
How did you make https://pypi.org/project/ipypopout/ releases without tags in this repo?
Motivation: Jdaviz is unable to easily query the installed version of ipypopout via ipypopout.__version__
call as it can with all its other dependencies.
I can launch a lab or notebook and display example.ipynb
. The IntSlider and the Button are rendered as expected.
(Note, that I had to comment the import ipypopout.sync_patch
statement of the first cell : no module ipypopout.sync_patch
could be found)
When I click the button, a new browser window appears, but with a 404 error message. This URL could not been resolved : localhost:8888/voila/templates/ipypopout/static/popout.html?kernelid=65140b14-6a46-4586-a700-d30a5033462e&modelid=3bc5eb88a37a417c8843f4fad63fe923&baseurl=/
I thought I should run voila
before -> voila example.ipynb
returns a jinja2.exceptions.TemplateNotFound: browser-open.html
error :(
Using a lab or a notebook, gives the same result.
Any idea please ?
About my setup :
pip install .
jupyter-lab
or jupyter notebook
When using solara, the URL opened by ipypopout is currently given by:
ipypopout/ipypopout/popout_button.vue
Lines 45 to 46 in 44dc4a6
with baseUrl
given by
ipypopout/ipypopout/popout_button.vue
Lines 33 to 40 in 44dc4a6
which in solara goes to {{root_path}}/
and this.popoutPageUrl = solara.rootPath (= root_path)
.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.