autograder .cli .grading .grade
Grade an assignment (specified by an assignment JSON file) with the given submission. Non-Python assignments can be graded, but they require an "invocation" field' in the assignment config, and the running machine must be configured to run them' (e.g. have all the required software installed).
usage: python3 -m autograder.cli.grading.grade [-h] [--version]
[--testing-mode]
[-a ASSIGNMENT] -s SUBMISSION
[-o OUT_PATH]
[-t TEST_SUBMISSION_PATH]
Grade an assignment (specified by an assignment JSON file) with the given submission.
Non-Python assignments can be graded, but they require an "invocation" field'
in the assignment config, and the running machine must be configured to run them'
(e.g. have all the required software installed).
options:
-h, --help show this help message and exit
--version show program's version number and exit
-a ASSIGNMENT, --assignment ASSIGNMENT
The path to a JSON file describing an assignment
(default: assignment.json).
-s SUBMISSION, --submission SUBMISSION
The path to a submission to use for grading.
-o OUT_PATH, --out-path OUT_PATH
The path to a output the JSON result.
-t TEST_SUBMISSION_PATH, --test-submission-path TEST_SUBMISSION_PATH
Create a test submission file at the specified path.
If an existing dir is provided, a 'test-
submission.json' file will be created inside that dir.
testing options:
--testing-mode Run as if a test is being run (default: False).
1""" 2Grade an assignment (specified by an assignment JSON file) with the given submission. 3Non-Python assignments can be graded, but they require an "invocation" field' 4in the assignment config, and the running machine must be configured to run them' 5(e.g. have all the required software installed). 6""" 7 8import argparse 9import sys 10 11import autograder.cmd.gradeassignment 12 13def run_cli(args: argparse.Namespace) -> int: 14 """ Run the CLI. """ 15 16 return autograder.cmd.gradeassignment.run(args) 17 18def main() -> int: 19 """ Get a parser, parse the args, and call run. """ 20 21 args, _ = _get_parser().parse_known_args() 22 return run_cli(args) 23 24def _get_parser() -> argparse.ArgumentParser: 25 """ Get a parser for this operation. """ 26 27 return autograder.cmd.gradeassignment._get_parser() 28 29if (__name__ == '__main__'): 30 sys.exit(main())
def
run_cli(args: argparse.Namespace) -> int:
14def run_cli(args: argparse.Namespace) -> int: 15 """ Run the CLI. """ 16 17 return autograder.cmd.gradeassignment.run(args)
Run the CLI.
def
main() -> int:
19def main() -> int: 20 """ Get a parser, parse the args, and call run. """ 21 22 args, _ = _get_parser().parse_known_args() 23 return run_cli(args)
Get a parser, parse the args, and call run.