Releases: gradescope/gradescope-utils
v0.5.0
What's Changed
- Add MIT License by @ibrahima in #26
- Convert the value passed to
@number
to a string by @trombonehero in #20 - Hide error messages by @peterstory in #25
- Use "status" prop and other misc improvements by @isaacl in #27
- Make test failure prefix msg configurable by @isaacl in #29
New Contributors
- @trombonehero made their first contribution in #20
- @peterstory made their first contribution in #25
- @isaacl made their first contribution in #27
Full Changelog: v0.4.0...v0.5.0
Add post_processor callback to JSONTestRunner
Adds a callback function to JSONTestRunner which can be used to modify the autograder results at the end of the test suite but before they are written to disk.
Usage Example:
def post_process(results):
results["score"] = 9001
if __name__ == '__main__':
suite = unittest.defaultTestLoader.discover('tests')
JSONTestRunner(visibility='visible', post_processor=post_process).run(suite)
Add `@number` decorator
The @number
decorator allows setting the "number" field on tests, which is used to sort the tests when displayed on Gradescope. See the format specification for more information.
Allow tests to give partial credit
Adds a new decorator, @partial_credit
, which allows setting the final score directly for cases where you want to give partial credit.
When using it, you don't need to use the @weight
decorator (you pass in the test weight to @partial_credit
).
Allow check_submitted_files to take in base directory
Visibility options for JSONTestRunner
JSONTestRunner now accepts options for setting the top-level visibility
and stdout_visibility
fields (see the docs for more details).
check_submitted_files helper function
Adds a utility function that checks for the existence of specified files within the submission.
v0.2.2: Leaderboards!
Finalized leaderboard decorator. Leaderboard functionality is now available on Gradescope.
Leaderboards!
Adds a decorator for leaderboards (not yet available on Gradescope).
v0.1.7: Merge branch 'cawka-master'
Add visibility decorator