Skip to content

Checksum warning when autograding fresh generated release version #1961

@artureisele

Description

@artureisele

Operating system

Ubuntu 20.04.02

nbgrader --version

0.8.5/0.9.5 (warning arises with both versions)

jupyter-lab --version

3.6.8

I create a notebook in the source/task_01 folder with one single grading cell which contains:

# Used for grading. Do not change.
### BEGIN HIDDEN TESTS
assert 0==0
### END HIDDEN TESTS

I run the command: nbgrader generate_assignment task_01
I copy the release version to submitted/test/task_01
I run the command nbgrader autograde task_01

Expected behavior:

Everything runs clear without any warnings or failures

Actual behavior

Everything works correctly but i get the following warning:
[AutogradeApp | WARNING] Attribute 'checksum' for cell cell-e06105f46f78bcd4 has changed! (should be: a78c17a12e10745850cd76fe6b4dc84d, got: 6dc294a55fb4619dbfdb75bdb9c01273)

I digged into your source code and found that when the assignment is generated, the checksum stored in the db file is a different from that stored in the metadata of the release file.

Image
You can see here that the checksum for db is evaluated before the hidden tests are cleared.

And you can see that your code is handling this case by replacing the submitted hidden test with the stored in the db file.

Image

However, this behavior seems not to be intended or did I do something wrong?

I would really like that this warning is only coming if students manipulated the hidden tests.

Thank you very much for any help!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions