Useful tools for instructors creating Jupyter notebook templates.
Project description
jupyter-instructortools
This adds a menu to the Jupyter menubar that automates some useful tasks an instructor might want to do while building a notebook template for an assignment
Current Features:
- Menu activated by a python command.
- Menu items to protect/unprotect selected cells. Protected cells cannot be editted or deleted by the user. This is a good way to prevent instructions and example code from being damaged by students.
- Menu item for creating a data input table.
- Table column and row labels can be locked once set.
- Number of rows and columns must be chosen on initial creation.
- Table will survive deletion of all cell output data.
- Default setting is to make the code cell that creates the table uneditable and undeletable.
- Table creation code will work without this package installed in the Jupyter kernel. Tables are viewable, but not editable in a plain vanilla Jupyter install.
- This uses the
jupyter-datainputtable
package.
- Menu item to delete instructor tools from a notebook before making the worksheet available.
Installation
Installation using pip into a virtual environment is recommended.
Production
- If not installed, install pipenv:
$ pip3 install --user pipenv
. You may need to add~/.local/bin
to yourPATH
to makepipenv
available in your command shell. More discussion: The Hitchhiker's Guide to Python. - Navigate to the directory where this package will be installed.
- Start a shell in the environment
$ pipenv shell
. - Install using pip.
$ pip install jupyter-instructortools
. This will install Jupyter into the same virtual environment if you do not already have it on your machine. If Jupyter is already installed the virtual environment will use the existing installation. This takes a long time on a Raspberry Pi. It will not run on a 3B+ without at least 1 GB of swap. See: Build Jupyter on a Pi.- Still within the environment shell test this by starting jupyter
$ jupyter notebook
. Jupyter should launch in your browser.- Open a new notebook using the default (Python 3) kernel.
- In the first cell import the InstructorTools module:
from InstructorTools import *
- The
InstructorTools
menu should be added to the Jupyter menu bar.
- Optional You can make this environment available to an alternate Jupyter install as a special kernel when you are the user.
- Make sure you are running in your virtual environment
$ pipenv shell
in the directory for virtual environment will do that. - Issue the command to add this as a kernel to your personal space:
$ python -m ipykernel install --user --name=<name-you-want-for-kernel>
. - More information is available in the Jupyter/Ipython documentation. A simple tutorial from Nikolai Jankiev (Parametric Thoughts) can be found here.
- Make sure you are running in your virtual environment
Development
Simply replace $ pip install jupyter-instructortools
with $ pip install -e jupyter-instructortools
in the Production instructions.
Issues or comments
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for jupyter-instructortools-0.5.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8db3e11ecb2a8b937d7e9e3669190f9a4568eb33a2bffe4b865489f5871bb084 |
|
MD5 | 06636c1e9b631accf9df9d65a266c5b1 |
|
BLAKE2b-256 | 8d7c5b60deea596f17b4f5059d8b573e95ee16dd9a34e0cbb0403ec48dc7b2eb |
Close
Hashes for jupyter_instructortools-0.5.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6729367665c9226438bf86f06f0cbc9723e036ab4f47265ce005a1d6b242c737 |
|
MD5 | a5005aec859d22f2bc93d3a93e64a94e |
|
BLAKE2b-256 | 0b5bcc06d0dd1bf72031e3bba27535ec2f6b15d9a9f8490a737c2ee57456826f |