Skip to content

fix: rough edges in build errors, warnings and names - #56

Merged
wiseodd merged 17 commits into
mainfrom
fix/rough-edges
Nov 26, 2026
Merged

wiseodd merged 17 commits into
mainfrom
fix/rough-edges

Conversation

@wiseodd

@wiseodd wiseodd commented Nov 26, 2026

Copy link
Copy Markdown
Owner

Closes #30. One commit per item.

  • # HIDDEN after code in a cell: build warning that it hides the whole cell.
  • A misnamed test such as test_row_count reports "no question row" and the test_<qid>_<name> rule, not "tests of different questions share a cell".
  • The free-points warning skips 0-point questions.
  • A failed build removes dist/student/ and dist/autograder/.
  • mogs grade and the grader ignore .py files in tests/ when looking for the notebook, and the error no longer calls other .py files notebooks.
  • The export names its files after the assignment: HW2_submission.zip, HW2.pdf. The grader looks for HW2_answers.md.
  • question6, Q6 and question_6 get the title "Question 6", like q6.
  • In the source notebook, the grade cell says "3/3 tests passed" (hidden ones included), and a written question's panel no longer mentions the export button.
  • The PDF drops a prompt's first heading when the title already has all its words (### Derive the slope under "Question 4: Derive the slope").
  • The build report says "1 pt".
  • import pytest without pytest in dependencies fails the build.
  • pytest notebook.py skips a cell that has other code next to its tests, since marimo collects only cells that hold nothing but tests. The build now warns about it, and the docs say to put data in its own hidden cell.

Discovered tests in the source include the hidden ones, so the panel says
"tests passed", and a written question's panel no longer points to an
export button the source doesn't have.
With name="HW2" the export is now HW2_submission.zip with HW2.pdf, like the
HW2 zip and folder. The grader looks for the Markdown fallback under that
name too.
marimo collects only cells that hold nothing but tests, so a hidden cell
with data next to its tests runs on Gradescope but not under
`pytest notebook.py`.
@greptile-apps

greptile-apps Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

Confidence Score: 5/5 · The PR appears safe to merge; the reported notebook-selection failure is fixed.RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; the reported notebook-selection failure is fixed.

Summary

This PR improves build messages, export names, question titles, and notebook selection.

  • Builds flag notebook patterns that can hide or skip tests.
  • Failed builds remove old student and autograder outputs.
  • Free-point warnings skip questions that are worth zero points.
  • Submission files use the assignment name from export through grading.
  • Notebook panels and PDFs show clearer question text.

Reviews (3) · Last reviewed commit: "fix(grade): skip tests/ files only when ..." · Reviewed by Greptile

Comment thread src/mogs/grader/results.py Resolved
Comment thread src/mogs/source.py Resolved
Comment thread src/mogs/pdf.py Resolved
Comment thread src/mogs/grader/results.py Resolved
@wiseodd
wiseodd merged commit 99108d7 into main Nov 26, 2026
8 checks passed
@wiseodd
wiseodd deleted the fix/rough-edges branch November 26, 2026 21:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rough edges in build errors, warnings and names

1 participant