github-education-resources / classroom

GitHub Classroom automates repository creation and access control, making it easy for teachers to distribute starter code and collect assignments on GitHub.
https://classroom.github.com
1.34k stars 565 forks source link

Question about using Classroom with JupyterHub #2533

Open paulnakroshis opened 4 years ago

paulnakroshis commented 4 years ago

I am new to Github Classroom. Today I had my first class, and I made an assignment available to students in class. The procedure for using Github Classroom with Jupyterhub seems cumbersome, and I am wondering if there is a way around this. Currently: a) I make the assignment link available to students b) they open the link, repo is cloned to their github account c) they download the repo to their laptop, unzip it d) they log onto our server e) they upload the .ipynb file to the server, edit and save it, and then download it as an .ipynb file f) then they upload it to their GitHub account.

This seems needlessly complex. Is there an easier way to do this?

d12 commented 4 years ago

:wave: I'm unfamiliar with JupyterHub, do they have any sort of GitHub or VCS integration? Many tools that our professors use are able to pull directly from GitHub, and push straight back to GitHub when the student is done working. If not, there unfortunately isn't very much we can do on our end to help make that more efficient.

leestott commented 4 years ago

Hi @paulnakroshis have you looked into nbgitpuller https://github.com/jupyterhub/nbgitpuller nbgitpuller lets you distribute content in a git repository to your students by having them click a simple link. :ref:Automatic, opinioned conflict resolution <topic/automatic-merging> ensures that your students are never exposed to git directly. It is primarily used with a JupyterHub, but can also work on students' local computers.

leestott commented 4 years ago

@paulnakroshis here a nice little overview of how to use nbgitpuller http://tljh.jupyter.org/en/latest/howto/content/nbgitpuller.html student then simply upload or push their Notebooks to github classroom after completing any necessary changes. If you use the Jupyter Extension within VSCode you can do all the changes execution and git submits directly within the IDE see https://code.visualstudio.com/docs/python/jupyter-support

paulnakroshis commented 4 years ago

D12, Leestott,

Thanks for your feedback. One annoyance from a student's point of view is that when logged into our jupyterhub server and running a jupyter notebook (not the jupyterlab interface), the process of using GitHub classroom is complicated: a) clone assignment repo from link I provide from GitHub classroom b) download repo to laptop c) upload to jupyterhub d) complete assignment e) download to laptop f) upload to GitHub. From my perspective, GitHub classroom makes things on my end simple, but the above sequence for students is a pain.

I tried using nbgitpuller, but it does not work on a private repository. So, an easier solution--which I am leaning toward at this point--is the following: a) abandon Github Classroom b) make my assignment repos public c) have students use JupyterLab on our server (with jupyterlab-git extension installed) d) provide a nbgitpuller link for students to clone an assignment e) I can then (since I am an admin for our server) navigate to their assignment folder and edit the notebook to give feedback.

The problem with this scheme is step (e); as far as I can figure, I will have to either 1) use the command line as super user to navigate to each student's folder, find the assignment, copy it to my directory, provide feedback and re-upload a marked up copy to the student, or 2) use the jupyterlab-git extension to clone each student's folder edit their submission and then return with my comments to their GitHub site.

Having just written this out, option 2 seems far preferable. Does this seem reasonable? The advantage of this, is that I can see the student's progress in terms of commits, and it is all made easier on their end because of the excellent jupyterlab-git extension.

paulnakroshis commented 4 years ago

I think a third option is probably better: When the students are done they can upload it to a dropbox or Google Drive folder that I share with them.

d12 commented 4 years ago

You can also make a post on the community forum and see if anyone else has build out a workflow for GitHub Classroom + JupyterHub: https://education.github.community/

We'll look into better supporting these tools in the future :)