Record Scores#

record_scores.py#

usage: record_scores.py [-h] [--pr-author PR_AUTHOR] [--pr-number PR_NUMBER]
                        [--pr-closed-at PR_CLOSED_DATETIME]
                        [--merge-commit MERGE_COMMIT]
                        [--submission-main SUBMISSION_MAIN]
                        [--overall-scores-path OVERALL_SCORES_PATH]
                        [--database-path DATABASE_PATH]
                        [--broken-if-invalid | --no-broken-if-invalid]
                        [--save-database | --no-save-database]
-h, --help#

show this help message and exit

--pr-author <pr_author>#

GitHub username of the pull request author.

--pr-number <pr_number>#

GitHub pull request number.

--pr-closed-at <pr_closed_datetime>#

Datetime when the GitHub pull request closed.

--merge-commit <merge_commit>#

The commit created when the pull request was merged.

--submission-main <submission_main>#

The SUBMISSION_MAIN of the submission’s pr_config.json

--overall-scores-path <overall_scores_path>#

Path to the CSV of overall scores.

--database-path <database_path>#

Path to the JSON scores database.

--broken-if-invalid, --no-broken-if-invalid#

Mark submission broken instead of raising an exception. (default: False)

--save-database, --no-save-database#

Save updates to the database. (default: True)

load_overall_scores(filename)

Buildings a dictionary from test set filenames (excluding file extensions) to strings representing scores by reading from a CSV file with these columns: test_set, and score.

validate_overall_scores(overall_scores)

Given a dictionary of overall scores (see load_overall_scores()), the following are validated:

write_overall_scores_to_database(database, ...)

Writes an entry in the JSON scores database.