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

Home is different in JupyterLab versus RStudio #2

Open
eeholmes opened this issue Dec 20, 2023 · 1 comment
Open

Home is different in JupyterLab versus RStudio #2

eeholmes opened this issue Dec 20, 2023 · 1 comment

Comments

@eeholmes
Copy link

Case:

  • You use the Openscapes R image.
  • You open a terminal in \lab versus \rstudio

In rstudio, ~ is \home\jovyan

In jupyterlab, ~ is \home\rstudio

This is weird and annoying with earth data access because you .netrc file created in one is not appearing in the other. We are starting to do workflows where we have both the lab and rstudio tabs open to do Python and R work, and people keep running into this.

Personnaly I think we should stick with \home\jovyan since we are on a JupyterHub. It's annoying to explain to students to write different file paths if they writing Python in rstudio vs lab on the JupyterHub. I know know students should not use hard paths but despite our admonitions they do. I am constantly debugging the \home\rsdudio versus \home\jovyan "feature". But I think Yuvi disagrees. @cboettig ?

@cboettig
Copy link

I think there's lots to be said here in the details but overall I agree we should present users with a consistent home experience. Specifically, I think a given user should ideally not experience different expansions of ~ when working in the different environments, the ~ expansion in a terminal should always match $HOME and also match /home/$USER and $USER should match whoami in the same terminal.

I would like to better understand the examples where this creates trouble though.

with respect to .netrc, I think software should be taking care of netrc login and that software should not be making assumptions about ~ expansion, $HOME, etc. earthdatalogin uses an explicit path for the netrc file following the XDG Spec for where installed software should store configuration and data files relative to each operating system, (as required by CRAN -- we're not allowed to write configs to ~/). However, older versions of gdal don't understand alternative .netrc paths, so in that case we have to symlink to ~/.netrc - - https://github.com/boettiger-lab/earthdatalogin/blob/main/R/edl_netrc.R#L112 (and it looks like arguably I should be wrapping that with path.expand() ... )

Does this problem appear in other settings? (Like python versions? I think there's a separate issue there where we also want to better align PATH between the two environments...)

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

No branches or pull requests

2 participants