Repo for lessons, homework, and course dev materials
This repository uses jupyterbook to render Jupyter Notebooks and other Markdown content as HTML, hosted on the repository's GitHub Pages site.
Notebooks can be launched in JupyterHub or downloaded for running locally.
Each lesson in the JupyterBook format has a launch button (rocket icon) in the upper right menu that provides an option to open the notebook in JupyterHub.
-md
to the name of the notebook in the download URL. For instance, to download the simple Markdown version of this notebook, the URL would be https://gwu-libraries.github.io/python-camp/_sources/notebooks/homework/HW_1_from_code_to_data-md.ipynb
.GitHub Classroom supports autograding of assignments submitted by students from a roster.
course-utils
folder, the autograder.py
script from the course-utils
folder in the main Python Camp repo.course-utils/autograder.py
against the committed file. To manage development in these separate assignment repos, I am experimenting with the following workflow:
homework-modules
folder of the main repo.git clone --recurse-submodules
on the main repo.publish.sh
script, changes made to the homework notebooks will be copied into the appropriate submodule directory within homework-modules
, and changes pushed to the corresponding linked repo on GitHub.git submodule update --remote --merge
(or git submodule update --remote --rebase
).textbook
directory of this repo.notebooks/lessons
or notebooks/homework
and are labeled according to their sequence. textbook/_toc.yml
file defines the Table of Contents for the JupyterBook; it contains the names and filenames (without extensions) of all pages for inclusion in the book.textbook/parsons-yaml
directory, giving it a name that includes its lesson and sequence number. (homework-1-1.yml
refers to the first Parsons Problem in the notebook called HW_1
.)python_code
and problem
are required, python_setup
is optional.
problem
key.python_code
key.python_setup
will be executed but not included in the Parsons Problem itself. This code can be used, for instance, to define a global variable to which the code in python_code
should refer.https://gwu-libraries.github.io/python-camp/parsons-problems/html/homework-1-1.html
../publish.sh
script. This script does the following:
textbook/parsons-yml
. jupyter-book publish
command). This script converts the .ipynb
files to .html
.{term}
directives are replaced with hard-coded links to glossary terms.hide-cell
tag are coded for hidden in the Jupyterlab/Notebook 7 interface.remove-cell
tag are deleted, and outputs from all code cells are cleared.-md
suffix) are created, replacing MyST directives with regular Markdown or HTML code.HW-1-GR
, HW-2-GR
, etc.) from the textbook/notebooks/homework
directory to the appropriate subdirectory (these should be labeled as follows: python-camp-hw-1-gr
, python-camp-hw-2-gr
, etc.) in the homework-modules
directory. These subdirectories are manages as git submodules; upon copying the files over, the publish.sh
script will commit and push any changes (to the associated repos).python-camp
repo, create a new commit and push to origin main
(to update the reference to the submodule commits).docker-compose.yml
file will build and launch a Jupyterlab/notebook server within a Docker container with the necessary extensions. The nginx-proxy
container can be used to make the Jupyter server available on an open port (e.g., from an AWS server). Note that this setup does provide the full functionality of JupyterHub; the Docker image is used in production as part of a Kubernetes implementation of JupyterHub; this image provides only the Jupyter server component.