/nbcollate

Collate Jupyter assignment notebooks

Primary LanguageJupyter NotebookMIT LicenseMIT

nbcollate

Latest PyPI Version Documentation Status Build Status Updates License

This package provides an API, and a command-line interface, to combine a set of Jupyter notebooks into a single notebook.

The provided functions combine a Jupyter notebook that contains a set of prompts, and copies of this notebook that answer the prompts, into a single notebook that lists all the answers after each prompt.

This is intended for use in a classroom setting, to collect assignment submissions into a notebook that can be quickly reviewed. The notebook can include student names, or it can be anonymous for use in classroom review. In the latter case, functionality exists to remove duplicate answers, and to sort answers by length.

Installation

pip install nbcollate

Command-Line Usage

nbcollate assignment.ipynb student-*.ipynb

Creates the file assignment-collated.ipynb from the student-* files in test/files.

nbcollate assignment.ipynb student-*.ipynb --label

Same as above, but labels each student with a name derived from the notebook file name.

nbcollate --help

Contributing

Set Up

Install pipenv <https://docs.pipenv.org/>. Then:

pipenv install
pipenv shell

Test

pytest

Release

tox
bumpversion release
flit publish
git push --tags

Related Projects

classroom-tools contains scripts related to using GitHub and Jupyter in education It includes a command-line interface to an older version of this code. That script will eventually be modified to use this package.

A web application with similar functionality is at olin-computing/assignment-dashboard. That application caches the state of GitHub in a local database, and provides a web interface for inspect completion status by student or by question, and for browsing the original and collated notebooks.

Acknowledgements

This package is inspired by original work paulruvolo/SoftDesSp16Prep by Paul Ruvolo at Olin College, extended at osteele/assignment-tools.

License

MIT