Skip to main content

A common library for the grading scripts.

Project description

cs3560-grading-lib

A common library for the grading scripts.

Install

$ python -m pip install cs3560-grading-lib

Features

Collecting the tests of problems into .github/classroom/autograding.json.

python -m cs3560_grading_lib.tools.collect_autograding_tests

The cs3560_grading_lib.BaseTestCase that provides assertFileExists and assertCommandSuccessful. The later takes the result from cs3560_grading_lib.run_executable or cs3560_grading_lib.run_targets.

Problem Folder Structure

problem-name/                    - Root of the problem folder.
problem-name/README.md           - Contain instructions for the problem.
problem-name/scripts/grade.py    - Contains the grading script to be run by `grading.yml` workflow.
problem-name/scripts/generate.py - Contains the script o be run during generation phase.
problem-name/problem.toml        - A metadata file of the problem. See its own section for detail.

problem.toml Reference

A metadata file about the problem.

[problem] section

name specifies the name of the problem. It must match the folder name of the problem. This name will be use in the prefix for the [problem.tests.<id>.run]'s value to change the current working directory to the problem's folder.

difficulty is an integer specifies the difficulty level of the problem. Currently these values are defined.

  • 1 - basic/easy problem.
  • 2 - intermediate problem.
  • 3 - advance/hard problem.

objective is a string that describe the objective of this problem. It is here mainly to help instructor/TA decide on which problem to use in the assignment.

[problem.tests.<id>] section

The keys in this section are the same keys found in .github/classroom/autograding.json for education/autograding action.

We store them here instead so that we can add or remove problem as we please. The cs3560_grading_lib.tools.collect_autograding_tests that is run as part of the step of the grading.yml workflow will automatically collect these tests and create .github/classroom/autograding.json for you. It will also modify the [problem.tests.<id>.run] command so that it is prefixed with change directory command (cd)

[problem.grading-script-tests.<id>] section

These sections specify the test cases for the grading script itself. These does not contribute to the student points. They exist so that we can ensure that the grading script behave correctly.

is-encrypted is a flag use to indicate if the content is encrypted or not.

expected-result is used to tell if the grading script behave correctly or not.

path is a path to the file that its content will be overriden with value in the content key.

content can be a plain text or encrypted text. When in plain text, it can be used to override the content of file at path. Then the grading script can be run against this new content to verify if the script behave as designed or not.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cs3560-grading-lib-0.0.4.tar.gz (11.5 kB view details)

Uploaded Source

Built Distribution

cs3560_grading_lib-0.0.4-py3-none-any.whl (10.2 kB view details)

Uploaded Python 3

File details

Details for the file cs3560-grading-lib-0.0.4.tar.gz.

File metadata

  • Download URL: cs3560-grading-lib-0.0.4.tar.gz
  • Upload date:
  • Size: 11.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.1

File hashes

Hashes for cs3560-grading-lib-0.0.4.tar.gz
Algorithm Hash digest
SHA256 9509fe3260ed32b2c7e9850b3d739ea578d8851b9f8945ad79adc1abf48a50d3
MD5 4d2409ff4d0ee72a3d23d998d6a7b583
BLAKE2b-256 f03bf9a55fe1f677e712da1f12e5e6dd262f4623b820d93812f3e174024a01bf

See more details on using hashes here.

File details

Details for the file cs3560_grading_lib-0.0.4-py3-none-any.whl.

File metadata

File hashes

Hashes for cs3560_grading_lib-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 0fb56443ab9b452a4f1b567c5225ef6ca0dcd05bd26e350cd95cd7e658eb4c26
MD5 a29a520831af2dd53ff5fff73e5f2451
BLAKE2b-256 2a2e7477756c66f9397c58dbc8f6e1f55a3cba2886e591ebb486160faf5016c1

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page