CLI Reference¶
otter¶
Command-line utility for Otter-Grader, a Python-based autograder for Jupyter Notebooks, RMarkdown files, and Python and R scripts. For more information, see https://otter-grader.readthedocs.io/.
otter [OPTIONS] COMMAND [ARGS]...
Options
- --version¶
Show the version and exit
assign¶
Create distribution versions of the Otter Assign formatted notebook MASTER and write the results to the directory RESULT, which will be created if it does not already exist.
otter assign [OPTIONS] MASTER RESULT
Options
- -v, --verbose¶
Verbosity of the logged output
- --no-run-tests¶
Do not run the tests against the autograder notebook
- --no-pdfs¶
Do not generate PDFs; overrides assignment config
- --username <username>¶
Gradescope username for generating a token
- --password <password>¶
Gradescope password for generating a token
- --debug¶
Do not ignore errors in running tests for debugging
- --v0¶
Use Otter Assign format v0 instead of v1
Arguments
- MASTER¶
Required argument
- RESULT¶
Required argument
check¶
Check the Python script or Jupyter Notebook FILE against tests.
otter check [OPTIONS] FILE
Options
- -v, --verbose¶
Verbosity of the logged output
- -q, --question <question>¶
A specific quetsion to grade
- -t, --tests-path <tests_path>¶
Path to the direcotry of test files
- --seed <seed>¶
A random seed to be executed before each cell
Arguments
- FILE¶
Required argument
export¶
Export a Jupyter Notebook SRC as a PDF at DEST with optional filtering.
If unspecified, DEST is assumed to be the basename of SRC with a .pdf extension.
otter export [OPTIONS] SRC [DEST]
Options
- -v, --verbose¶
Verbosity of the logged output
- --filtering¶
Whether the PDF should be filtered
- --pagebreaks¶
Whether the PDF should have pagebreaks between questions
- -s, --save¶
Save intermediate file(s) as well
- -e, --exporter <exporter>¶
Type of PDF exporter to use
- Options
latex | html
- --no-xecjk¶
Force-disable xeCJK in Otter’s LaTeX template
Arguments
- SRC¶
Required argument
- DEST¶
Optional argument
generate¶
Generate a zip file to configure an Otter autograder, including FILES as support files.
otter generate [OPTIONS] [FILES]...
Options
- -v, --verbose¶
Verbosity of the logged output
- -t, --tests-dir <tests_dir>¶
Path to test files
- -o, --output-path <output_path>¶
Path at which to write autograder zip file
- -c, --config <config>¶
Path to otter configuration file; ./otter_config.json automatically checked
- --no-config¶
Disable auto-inclusion of unspecified Otter config file at ./otter_config.json
- -r, --requirements <requirements>¶
Path to requirements.txt file; ./requirements.txt automatically checked
- --no-requirements¶
Disable auto-inclusion of unespecified requirements file at ./requirements.txt
- --overwrite-requirements¶
Overwrite (rather than append to) default requirements for Gradescope; ignored if no REQUIREMENTS argument
- -e, --environment <environment>¶
Path to environment.yml file; ./environment.yml automatically checked (overwrite)
- --no-environment¶
Disable auto-inclusion of unespecified environment file at ./environment.yml
- -l, --lang <lang>¶
Assignment programming language; defaults to Python
- --username <username>¶
Gradescope username for generating a token
- --password <password>¶
Gradescope password for generating a token
- --token <token>¶
Gradescope token for uploading PDFs
- --python-version <python_version>¶
Python version to use in the grading image
Arguments
- FILES¶
Optional argument(s)
grade¶
Grade assignments locally using Docker containers.
otter grade [OPTIONS]
Options
- -v, --verbose¶
Verbosity of the logged output
- -p, --path <path>¶
Path to directory of submissions
- -a, --autograder <autograder>¶
Path to autograder zip file
- -o, --output-dir <output_dir>¶
Directory to which to write output
- -z, --zips¶
Whether submissions are zip files from Notebook.export
- --ext <ext>¶
The extension to glob for submissions
- Options
ipynb | py | Rmd | R | r
- --pdfs¶
Whether to copy notebook PDFs out of containers
- --containers <containers>¶
Specify number of containers to run in parallel
- --image <image>¶
Custom docker image to run on
- --timeout <timeout>¶
Submission execution timeout in seconds
- --no-network¶
Disable networking in the containers
- --no-kill¶
Do not kill containers after grading
- --prune¶
Prune all of Otter’s grading images
- -f, --force¶
Force action (don’t ask for confirmation)
run¶
Run non-containerized Otter on a single submission.
otter run [OPTIONS] SUBMISSION
Options
- -v, --verbose¶
Verbosity of the logged output
- -a, --autograder <autograder>¶
Path to autograder zip file
- -o, --output-dir <output_dir>¶
Directory to which to write output
- --no-logo¶
Suppress Otter logo in stdout
- --debug¶
Do not ignore errors when running submission
Arguments
- SUBMISSION¶
Required argument