Skip to content

Commit

Permalink
clarify that cell outputs must be included in otter assign notebooks
Browse files Browse the repository at this point in the history
  • Loading branch information
chrispyles committed Jan 27, 2025
1 parent 939d0f3 commit c5a823f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
8 changes: 7 additions & 1 deletion docs/otter_assign/notebook_format.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Notebook Format
===============

Otter's notebook format groups prompts, solutions, and tests together into questions. Autograder tests
are specified as cells in the notebook and their output is used as the expected output of the
are specified as cells in the notebook and each cell's output is used as the expected output of the
autograder when generating tests. Each question has metadata, expressed in raw YAML config cell
when the question is declared.

Expand Down Expand Up @@ -489,6 +489,12 @@ cell; Otter Assign will parse the output of the cell to write a doctest for the
be used for the test case. **Make sure that only the last line of the cell produces any output,
otherwise the test will fail.**

.. important::
Because Otter Assign parses the output of the cell, you must save the notebook without
clearing the cell outputs. If you run Otter Assign on a notebook with the outputs cleared, every
test case will be parsed in such a way that it expects no output to be printed at all, which will
likely result in failing test cases for correct answers.


Exception-Based Test Cells
??????????????????????????
Expand Down
6 changes: 6 additions & 0 deletions docs/tutorial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,12 @@ Otter Assign on this notebook, run
otter assign demo.ipynb dist
.. important::
If you have viewed/edited the ``demo.ipynb`` notebook, make sure that you run all of the
cells and save the notebook with the cell outputs included, otherwise Otter Assign will generate
incorrect test cases.

Otter Assign should create a ``dist`` directory which contains two further subdirectories:
``autograder`` and ``student``. The ``autograder`` directory contains the Gradescope autograder,
solutions PDF, and the notebook with solutions. The ``student`` directory contains just the
Expand Down

0 comments on commit c5a823f

Please sign in to comment.