Regarding a JupyterLab transition - redirections etc...
See original GitHub issueGoal
To make links to redirected sensibly while clicking nbgitpuller links from within notebooks…
- without consideration of
jupyter lab
orjupyter notebook
is showing the notebook- UPDATE: The environment variable
NBGITPULLER_APP
can help to control this behavior.
- UPDATE: The environment variable
- without consideration of linking from a jupyterhub hosted notebook or localhost hosted notebook. Also without consideration of the domain name, to avoid hardcoding www.myhub.com in the in-notebook link.
- UPDATE: A bug was fixed where we lost query parameters on redirect, see: https://github.com/jupyterhub/jupyterhub/issues/1769
- UPDATE: A bug where
/
paths made little sense in JupyterLab:- See original issue: https://github.com/jupyterlab/jupyterlab/issues/4341
- See issue discussion extended: https://github.com/jupyterlab/jupyterlab/issues/5211
- See reasonable resolution: https://github.com/jupyterlab/jupyterlab/pull/5814
- UPDATE: Best compromise, you need to be hub/nonhub aware still using:
/hub/user-redirect/git-pull?
.
- without consideration of where the notebook is located in the file system
- UPDATE: Hmm too vague formulated point for me to understand myself a year later.
My use case
I’d like to have a document that is always available on my jupyterhub, referencing sources of content to add.
Analysis 1
- Classic - Opening
index.ipynb
in the root folder (often/home/jovyan
), your URL is updated tomydomain.com/user/username/notebooks/Index.ipynb
, but you can also access this by referring tomydomain.com/user/redirect/tree/Index.ipynb
- Lab - In order to open
index.ipynb
in the root folder (often/home/jovyan
), you should accessmydomain.com/user/username/lab/tree/Index.ipynb
Analysis 2
- The
/hub/user-redirect/git-pull?
is relevant if you have a jupyterhub hosting only, I think…- This currently does not work since the query params seem to be stripped during the user redirect… (SOLVED NOW!)
- The
/git-pull?...
link would work if you have a localhost hosting only, i think…
TODO
- Ask for input - @choldgraf @yuvipanda - What is your take on the situation and how to solve it?
Currently my best known option is…
Currently, the best solution I have is assume a JupyterHub is hosting the notebook, and using a link like this, ending up with a classic view.
Issue Analytics
- State:
- Created 6 years ago
- Comments:14 (12 by maintainers)
Top Results From Across the Web
Jupyter Guide - GitLab
Guidance on setting up JupyterLab. ... Common python DS/ML libraries (pandas, scikit-learn, sci-py, etc.) Natively connected to Snowflake using your dbt ...
Read more >Jupyter Documentation - Read the Docs
The migrating document has additional information about migrating from IPython 3 to Jupyter. JupyterLab. JupyterLab is a next-generation ...
Read more >JupyterLab URLs — JupyterLab 3.6.0b0 documentation
Workspaces contain the state of JupyterLab: the files that are currently open, the layout of the application areas and tabs, etc. When the...
Read more >Everything You Need To Know About Jupyter Notebooks
Breaking down everything about Jupyter Notebooks ranging from the menus, to running ... Its uses include data cleaning and transformation, ...
Read more >python - Jupyterlab: Directory keeps redirecting to where ...
So I have discovered the underlying problem.. Sometimes when you close your code or terminal on VScode (WSL Extension), your jupyter ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Actionplan
urlpath=...
querystringapplication=jupyterlab
querystringI’ll start working on this @yuvipanda !
Archived action items
For my own reference mainly… I made some additional research, and finally concluded I’ll surrender on writing a notebook that contains a
git-pull
link within it. Currently that notebook must hardcode too much assumptions about the environment, such as if the notebook is viewed from jupyterlab/classic, from jupyterhub/localhost, even the specific domain name…/git-pull
to/user/redirect/git-pull
(also without loosing querystring info)./git-pull
points tomyjupyterhub.com/user/erik/files/git-pull
rather thanmyjupyterhub.com/git-pull
as it does if the link is viewed from classic.Recent revelations
/user/redirect
and/hub/user-redirect
both redirect, but hub/user-redirect does not have the querystring truncation issue. See JupyterHub/#1769I think it’d be great to add two options:
How does that sound?
On Thu, Apr 5, 2018 at 8:12 AM, Erik Sundell notifications@github.com wrote:
– Yuvi Panda T http://yuvi.in/blog