Skip to content
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

Feature Request: Ensure Voila Render Copies Notebook to Current Working Directory #69

Closed
RDWimmers opened this issue Sep 18, 2024 · 1 comment · Fixed by #70
Closed

Comments

@RDWimmers
Copy link

Description:
When using the "Open a predefined notebook" option, a copy of the notebook is created in the current working directory (cwd). However, when using the "Open a notebook with Voila" option, no new file is created. Instead, the working directory is changed to the location of the template, which is inconsistent with the behavior of the predefined notebook option.

Desired Behavior:
I would like the behavior of the "Open a notebook with Voila" option to be consistent with the "Open a predefined notebook" option. Specifically, when a user opens a notebook with Voila, a copy of the template should be created in the cwd. The Voila rendering should use this copied notebook, ensuring that the cwd remains unchanged.

Current Behavior:
"Open a predefined notebook" creates a copy of the notebook in the CWD, maintaining the CWD as expected. "Open a notebook with Voila" renders the template without creating a copy and changes the working directory to the location of the template.

This feature would enhance the usability of Voila when used with predefined notebooks and reduce confusion around changing working directories.

Thank you for considering this feature request and thank you for this package - it makes JupyterLab even more accessible to less experienced users.

I'm happy to create a PR and implement this feature if you agree with the request.

@trungleduc
Copy link
Owner

Hi. The notebook-voila option is used to serve the dashboard without exposing the notebooks. Copying notebook files to your CWD defeats this purpose.
In 0.3.0 I added a new option for the notebook launcher (https://jupyter-app-launcher.readthedocs.io/en/latest/usage.html#open-a-predefined-notebook). now you can select the document widget used to open your notebook. The following config will copy the notebook to your CWD and open the notebook using Voila Preview widget

- title: Notebook example
  description: Example of opening a notebook in dashboard mode without Voila
  type: notebook
  source: ../../samples/sample.ipynb
  cwd: ../../samples
  args:
    widget-type: 'Voila Preview'
  catalog: Notebook catalog

appl3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants