Skip to content

Commit

Permalink
Merge branch 'beta' into assign-summary
Browse files Browse the repository at this point in the history
  • Loading branch information
chrispyles committed Jul 16, 2023
2 parents 2ebfb5c + 4b7165d commit 9fae880
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
* Allow Markdown cells to be used instead of raw cells for Otter Assign per [#592](https://github.com/ucbds-infra/otter-grader/issues/592)
* Use Otter Grade CLI flags to update `otter_config.json` values in the grading container per [#395](https://github.com/ucbds-infra/otter-grader/issues/395)
* Removed `linux/amd64` platform specification for Docker images in Otter Grade
* Updated Otter Assign to normalize notebooks before writing them with `nbformat.validator.normalize` per [#658](https://github.com/ucbds-infra/otter-grader/issues/658)
* Added summary of assignment questions to Otter Assign logging per [#564](https://github.com/ucbds-infra/otter-grader/issues/564)

**v4.4.0:**
Expand Down
6 changes: 6 additions & 0 deletions otter/assign/notebook_transformer.py
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,12 @@ def write_transformed_nb(self, output_path, sanitize):
if self.nb_transformer.assignment.is_rmd:
rmarkdown_converter.write_as_rmd(nb, str(output_path), not sanitize)
else:
try:
from nbformat.validator import normalize
except ImportError:
normalize = lambda nb: (0, nb)

_, nb = normalize(nb)
nbformat.write(nb, str(output_path))

def write_tests(self, tests_dir, include_hidden, force_files):
Expand Down

0 comments on commit 9fae880

Please sign in to comment.