Skip to content

Commit

Permalink
skip PDFs in debug mode
Browse files Browse the repository at this point in the history
  • Loading branch information
chrispyles committed Feb 4, 2024
1 parent 755dc37 commit b1823fa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

**v5.4.0 (unreleased):**

* Update submission runners to export and submit the PDF and then remove all copies of the API token before executing the submission to ensure that student code can't gain access to the token
* Updated submission runners to export and submit the PDF and then remove all copies of the API token before executing the submission to ensure that student code can't gain access to the token
* Updated Otter Run to skip PDF export and upload in debug mode

**v5.3.0:**

Expand Down
4 changes: 4 additions & 0 deletions otter/run/run_autograder/runners/abstract_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,10 @@ def write_and_maybe_submit_pdf(self, submission_path):
``Exception | None``: an error thrown while trying to write or submit the PDF, if any;
a return value of ``None`` indicates a successful export and upload
"""
# Don't export or submit a PDF in debug mode.
if self.ag_config.debug:
return None

Check warning on line 107 in otter/run/run_autograder/runners/abstract_runner.py

View check run for this annotation

Codecov / codecov/patch

otter/run/run_autograder/runners/abstract_runner.py#L107

Added line #L107 was not covered by tests

try:
subm_pdfs = glob("*.pdf")
if self.ag_config.use_submission_pdf and subm_pdfs:
Expand Down

0 comments on commit b1823fa

Please sign in to comment.