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

The working directory of notebook sessions should always be the notebook's parent directory #2648

Closed
seeM opened this issue Apr 4, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@seeM
Copy link
Contributor

seeM commented Apr 4, 2024

Positron Version:

Positron Version: 2024.04.0 (Universal) build 29

Steps to reproduce the issue:

  1. Open a Python notebook in a workspace with (or without) a folder opened.
  2. Run !pwd to check the working directory.
  3. The working directory will be the workspace directory, or the user's home directory if there are no workspace folders opened.

What did you expect to happen?

The working directory should be the notebook's parent directory.

Users write notebooks assuming that this is true e.g. when determining the paths to their datasets as in https://github.com/posit-dev/positron-beta/discussions/57 where this was originally posted.

This is the case in both Jupyter Lab and VSCode regardless of where you start Jupyter Lab or whether any workspace folders are opened.

Were there any error messages in the output or Developer Tools console?

No.

@seeM seeM added the bug Something isn't working label Apr 4, 2024
@seeM seeM added this to the Public Beta 2024 Q2 milestone Apr 4, 2024
@jmcphers jmcphers self-assigned this Apr 26, 2024
@juliasilge
Copy link
Contributor

In Positron 2024.04.0 (Universal) build 1576, the working directory for a notebook session is right where the .ipynb is (even when different from the workspace directory):

Image

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants