mc2-center / minidream-r-env

Resources for setting up and managing an RStudio environment for interactive mini-DREAM activities
Apache License 2.0
3 stars 1 forks source link

Determine whether/how to use Jupyter Notebooks instead of RStudio #21

Closed lopierra closed 2 years ago

lopierra commented 2 years ago

From Milen's email:

It'd be great to have Jupyter notebooks in mini-DREAM, however depending on how we'd approach it, it may require a rework of at least two parts of existing infrastructure:

  • how students login in their own notebooks
  • how submissions to Synapse challenges work

Currently we are using RStudio's authentication and we have a submission interface that assumes certain R functions store yaml files containing answers. The latter should be relatively straightforward to do w/in Jupyter notebooks. But we'd have to see how authentication could work. Unless you or Bruno are aware already of a solution, we may need to do some googling on best practices for auth in Jupyter. If we are re-working authentication we might as well check if we can use an OAuth layer, so that students can use their Synapse account to use the notebooks; this is something we've wanted to do for 4 years and never got around to.

BrunoGrandePhD commented 2 years ago

It looks like JupyterHub might be what we're looking for. They claim to be:

A multi-user version of the notebook designed for companies, classrooms and research labs

Based on a quick skim of their OAuth documentation, it might be possible to use the OAuth access token given by Synapse when the user logs in (assuming Synapse is configured as the OAuth provider). You seem to be able to configure post-auth hooks, which we could use to remember the Synapse credentials.

It might be a non-trivial amount of work to get this working, but it could be something that we could reuse across multiple hackathons/workshops.

lopierra commented 2 years ago

On the other hand, if students are learning R, shouldn't they also learn to use RStudio? 🤷‍♀️

lopierra commented 2 years ago

Per email with Diana, we will stick with RStudio this year and look into Jupyter (and tidyverse) for next summer. Plan to start earlier next time?