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

Contents root_dir #236

Open
davidbrochart opened this issue Sep 22, 2022 · 5 comments
Open

Contents root_dir #236

davidbrochart opened this issue Sep 22, 2022 · 5 comments
Labels
enhancement New feature or request

Comments

@davidbrochart
Copy link
Collaborator

Problem

Jupyverse currently serves contents relatively to the directory it was launched in. We should have a notion of root directory, which gives access to the file system in this directory and below.

Proposed Solution

Add root_dir to the contents plugin configuration.

@davidbrochart davidbrochart added the enhancement New feature or request label Sep 22, 2022
@specter119
Copy link
Contributor

Two behaviors of jupyverse are not performed as the previous.

  • the os.getcwd() always returns the working folder where jupyverse started, previously it will be parent folder of the editing ipynb.
  • sys.path contains the '.' (previously) and then some functions can be directed import from the py files located in the same folder.

Then if I want to directly import functions from py files located in the same folder of ipynb, the os.getcwd() should be changed following the file editing actively.

@davidbrochart
Copy link
Collaborator Author

Thanks for pointing that out @specter119, we should indeed have the same behavior as jupyter-server.
I'm not sure it is related to the root directory though, but maybe to how we create kernel clients.

@davidbrochart
Copy link
Collaborator Author

davidbrochart commented Nov 9, 2022

We should probably pass a path to launch a kernel in, as it is done in jupyter-server.
Currently we don't.

@davidbrochart
Copy link
Collaborator Author

I opened #245 for the kernel cwd issue.

@specter119
Copy link
Contributor

@davidbrochart Thx

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

No branches or pull requests

2 participants