What method do you use to share files with your students?

150 views
Skip to first unread message

James Slack

unread,
Oct 18, 2018, 10:25:05 AM10/18/18
to Teaching with Jupyter Notebooks
I wanted to throw this question at the community here as well as looking around within the University of Edinburgh.

What methods do all of you use to get any course files uploaded to student directories?

Do you let students manually upload the files individually? Do you get them to upload and then unzip a folder? Do you use a Git clone or do you have your own fancy method?

In this case I am particularly interested in anyone doing this with Jupyterhub.

Thanks in advance!

Doug Blank

unread,
Oct 18, 2018, 10:34:08 AM10/18/18
to slack....@gmail.com, Teaching with Jupyter Notebooks
I have used three methods:

1. Use nbgrader! It is a very nice way to distribute (and collect) materials other than just assignments.

2. We built in a nbviewer-like service into out jupyterhub, called public_handler: 


That should be updated to use nbconvert directly as this version has limitations.

3. We wrote a nice and easy magic called %download that can download zip files as a URL:


I have a more advanced version that will also unzip the files as well:


Hope that helps,

-Doug
 

Thanks in advance!

--
You received this message because you are subscribed to the Google Groups "Teaching with Jupyter Notebooks" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jupyter-educat...@googlegroups.com.
To post to this group, send email to jupyter-...@googlegroups.com.
Visit this group at https://groups.google.com/group/jupyter-education.
To view this discussion on the web visit https://groups.google.com/d/msgid/jupyter-education/b6159bd4-595b-4bfd-b4c3-dec18157a471%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Chris Holdgraf

unread,
Oct 18, 2018, 11:04:01 AM10/18/18
to doug....@gmail.com, slack....@gmail.com, jupyter-...@googlegroups.com
At Berkeley we use a tool called `nbgitpuller`. It's a little Jupyter server extension that lets you create links that point to content online (e.g. a notebook within a github repository).

When students click the link, it takes them to their JupyterHub session and pulls in / displays this content. If the content has *already* been pulled in before, it updates the content unless the student has already made changes. We also use it for bootcamps and such as well. Quite useful!


Doug Blank

unread,
Oct 18, 2018, 11:12:25 AM10/18/18
to chol...@gmail.com, slack....@gmail.com, Teaching with Jupyter Notebooks
On Thu, Oct 18, 2018 at 11:04 AM Chris Holdgraf <chol...@gmail.com> wrote:
At Berkeley we use a tool called `nbgitpuller`. It's a little Jupyter server extension that lets you create links that point to content online (e.g. a notebook within a github repository).

When students click the link, it takes them to their JupyterHub session and pulls in / displays this content. If the content has *already* been pulled in before, it updates the content unless the student has already made changes. We also use it for bootcamps and such as well. Quite useful!

That does sound useful! One of the downsides of using nbgrader (and the other suggestions I gave) was that the downloaded materials can't be updated once the students get them. This would help with that, at least until the student changes the materials.

-Doug

Josh Greenhalgh

unread,
Oct 18, 2018, 11:13:52 AM10/18/18
to Chris Holdgraf, doug....@gmail.com, slack....@gmail.com, jupyter-...@googlegroups.com
I really think it's a mistake to not use this as an introduction to using git. Just get them to clone the repo. Make some changes as you spot mistakes and show them how to pull down the changes. 

James Slack

unread,
Oct 18, 2018, 11:17:50 AM10/18/18
to Teaching with Jupyter Notebooks
Yes I think the ability to push more changes is certainly useful. I do like the nbgrader function to push files to students but it seems somewhat hacky (or at least not optimised to be used in that way) and it can cause issues if the students make changes

Doug Blank

unread,
Oct 18, 2018, 11:27:17 AM10/18/18
to slack....@gmail.com, Teaching with Jupyter Notebooks
On Thu, Oct 18, 2018 at 11:17 AM James Slack <slack....@gmail.com> wrote:
Yes I think the ability to push more changes is certainly useful. I do like the nbgrader function to push files to students but it seems somewhat hacky (or at least not optimised to be used in that way) and it can cause issues if the students make changes

nbgrader won't overwrite the downloaded folder once it has been downloaded, so it isn't hacky at all. (Students have to delete folder to get it again). You just have to be really sure that the assignment is done when you release it. Just like email :)

Regarding using git: I would not assume that that would be a good choice in many situations. You really don't want to weed out your class on the first day of class! Sure, at some point in a student's career you might want to introduce git. But I never did that in class. I introduced that in one-on-one projects in the lab.

-Doug
 

Chris Holdgraf

unread,
Oct 18, 2018, 11:35:13 AM10/18/18
to doug....@gmail.com, slack....@gmail.com, jupyter-...@googlegroups.com
To reiterate what Doug just said: we use nbgitpuller because it lets the instructor *choose* when to teach git, instead of making it a pre-requisite for interacting with the course from Day 1 (which ends up losing like 30% of the course in the git forest)

Josh Greenhalgh

unread,
Oct 18, 2018, 11:38:30 AM10/18/18
to Chris Holdgraf, doug....@gmail.com, slack....@gmail.com, jupyter-...@googlegroups.com
I'm in no way suggesting to go all the way into the git forest. Just that it's a good place to dip a toe in. Stick to using it for getting the resources to them and point out that there's a lot more to it if they're interested... 

Chris Holdgraf

unread,
Oct 18, 2018, 11:40:02 AM10/18/18
to joshuadougl...@gmail.com, doug....@gmail.com, slack....@gmail.com, jupyter-...@googlegroups.com
I like the idea of "ok you clicked this button and some magic happened, let's talk a bit about what just happened with git" :-) 

William Stein

unread,
Oct 18, 2018, 12:17:03 PM10/18/18
to slack....@gmail.com, Teaching with Jupyter Notebooks
Here's how sharing Jupyter notebooks works for instructors using CoCalc:

https://tutorial.cocalc.com/course_management/course_management.html
> --
> You received this message because you are subscribed to the Google Groups "Teaching with Jupyter Notebooks" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to jupyter-educat...@googlegroups.com.
> To post to this group, send email to jupyter-...@googlegroups.com.
> Visit this group at https://groups.google.com/group/jupyter-education.
> To view this discussion on the web visit https://groups.google.com/d/msgid/jupyter-education/b6159bd4-595b-4bfd-b4c3-dec18157a471%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



--
William (http://wstein.org)

kirby urner

unread,
Oct 18, 2018, 4:08:07 PM10/18/18
to jupyter-...@googlegroups.com

I do agree that toe-dipping in Github by showing cloning is highly worth while, but where and when is the question.  I'm all for sharing such skills at the secondary school level where feasible.  So many doors open when you know how to clone a repo.  Just that.  No pushing, no branching, no pull requests -- not right then.

I devoted a portion of a summer school course in Portland, Oregon this year, to introducing middle schoolers to this specific skill, having them clone the Martian Math Jupyter Notebooks repeatedly, as an exercise. 


This was in a computer lab at Reed College with git already installed on all computers.  So was Anaconda i.e. Jupyter Notebooks client.

When a course is BYOD (bring your own device), that's another can of worms. 

I wasn't doing any grading and have yet to use nbgrader, so you can see where multiple approaches make sense.  Everything depends on the specific curriculum, which is precisely what we don't all have in common (I'm the only Martian Math teach I know :-D).

Kirby

Nicolas M. Thiery

unread,
Oct 18, 2018, 4:54:03 PM10/18/18
to William Stein, slack....@gmail.com, Teaching with Jupyter Notebooks
Hi,

Thanks for sharing your practices! My turn ...

For our 400 students introductory programming class for freshmen [1],
our students learn some terminal basics on week one (one hour). And
then we have a wrapper script that we use for a bunch of things:

info-111 jupyter notebook
info-111 fetch Week1
info-111 submit Week1
info-111 g++ ...
...

The script first switches to the appropriate conda environment.
`submit` actually calls `nbgrader` with appropriate configuration
options; `fetch` currently calls wget + unzip from a web page (the
archive comes with a git repo); I am thinking of using `nbgitpuller`
or `nbgrader fetch` instead. `g++` and `jupyter` call the eponymous
commands with some additional configuration options.

This does not seem to put off the students (but they are in maths,
physics or computer science major; your mileage may vary). I actually
find it much more robust to tell students what commands to type in a
terminal than where to click. Sort of «student reproducibility through
automation».

The inconvenient is that this deviates from standard commands; so what
they learn is less reusable in other contexts. We try to mitigate that
by not deviating too much and making sure to write in bold the actual
commands behind the scene.

The advantage is that this abstracts away the specific choices of
options. So at any point we can add more, or simply switch the
underlying implementation.

The students work either locally on the computer lab machines, or on a
JupyterHub which share the same conda environment and script (albeit
not yet the same user directories, which is a pain).

Cheers,
Nicolas

[1] sorry in French ...
http://nicolas.thiery.name/Enseignement/Info111/
https://gitlab.u-psud.fr/Info111/Info111
https://github.com/nthiery/Info111-notebooks

--
Nicolas M. Thiéry "Isil" <nth...@users.sf.net>
http://Nicolas.Thiery.name/

David Race

unread,
Oct 23, 2018, 6:23:55 PM10/23/18
to Nicolas M. Thiery, William Stein, slack....@gmail.com, Teaching with Jupyter Notebooks
Our courses are a little different because we are not teaching coding, but getting students excited about the combination of Math, CS, and Science via online courses.  We don't get any support from the school, so I settled on Colaboratory (Jupyter on Google) and I share the codes directly out of my Google Drive.  Normally the students run these in the sandbox, so there isn't an issue of changing the files.  There are three levels of labs:

1) Labs where they are doing homework (some of the larger homework problems that students don't want to do on a calculator).  They enter the inputs, execute the code cells and copy the output to the homework system.  I usually introduce a bug in one of the later labs so they have to debug it to get the correct answer.  
2)  Labs that are much larger than they want to do with a calculator (say 500 x 500 matrices).  These they run, study the graphs and later have to contribute to course Discussion Boards.  They are graded on the quality of their discussion content.  It is a little tedious to grade, but some of them like the interactions in the online course.  It is interesting to see them "correct" each other for not contributing a good comment.
3)  Challenge Labs are designed so they have to solve a specific problem based upon an example.  The input is from my github.  The problems are a little different than the example, so there is some work to do to solve the problem.  The python is easy enough to grasp that I don't spend any time on the programming concepts. (Too bad, but it is what it is.)

We use this approach in Cal, Linear Algebra and DiffE.  

It isn't perfect, but since we don't have any support it works well.

David  Race

--
You received this message because you are subscribed to the Google Groups "Teaching with Jupyter Notebooks" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jupyter-educat...@googlegroups.com.
To post to this group, send email to jupyter-...@googlegroups.com.
Visit this group at https://groups.google.com/group/jupyter-education.
Reply all
Reply to author
Forward
0 new messages