Skip to main content

aga grades assignments

Project description

aga

Tests Codecov PyPI Read the Docs

aga (aga grades assignments) is a tool for easily producing autograders for python programming assignments.

Installation

Install from pip:

pip install aga

Quickstart

In square.py (or any python file), write:

from aga import problem, test_case


@test_case(-3)
@test_case(100)
@test_case(2, aga_output=4)
@test_case(-2, aga_output=4)
@problem()
def square(x: int) -> int:
    """Square x."""
    return x * x

Then run aga gen square from the directory with square.py. This will generate a ZIP file suitable for upload to gradescope.

Usage

Aga relies on the notion of a golden solution to a given problem which is known to be correct. The main work of the library is to compare the output of this golden solution on some family of test inputs against the output of a student submission. To that end, aga integrates with frontends: existing classroom software which allow submission of student code. Currently, only gradescope is supported.

To use aga:

  1. Write a golden solution to some programming problem.
  2. Decorate this solution with the problem decorator.
  3. Decorate this problem with any number of test_case decorators, which take arbitrary positional or keyword arguments and pass them verbatim to the golden and submitted functions.
  4. Generate the autograder using the CLI: aga gen <function_name>.

The test_case decorator may optionally take a special keyword argument called aga_output. This allows easy testing of the golden solution: aga will not successfully produce an autograder unless the golden solution's output matches the aga_output. You should use these as sanity checks to ensure your golden solution is implemented correctly.

For complete documentation, including configuring problem and test case metadata, see the API reference.

For CLI documentation, run aga --help, or access the docs online.

Contributing

Bug reports, feature requests, and pull requests are all welcome. For details on our test suite, development environment, and more, see the developer documentation.

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

aga-0.3.2.tar.gz (11.3 kB view details)

Uploaded Source

Built Distribution

aga-0.3.2-py3-none-any.whl (12.3 kB view details)

Uploaded Python 3

File details

Details for the file aga-0.3.2.tar.gz.

File metadata

  • Download URL: aga-0.3.2.tar.gz
  • Upload date:
  • Size: 11.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.10 CPython/3.9.7 Linux/5.8.0-1041-azure

File hashes

Hashes for aga-0.3.2.tar.gz
Algorithm Hash digest
SHA256 bc8be8f8f7d1575d32d9e27903a192e19fa7742f39cd715915dd14f5938a58a1
MD5 635a10b9e437bae00890490231a19a77
BLAKE2b-256 5af735c0fe217a7ac7332050bb38f3d02097867821a6b32de0f370d15e6907d3

See more details on using hashes here.

File details

Details for the file aga-0.3.2-py3-none-any.whl.

File metadata

  • Download URL: aga-0.3.2-py3-none-any.whl
  • Upload date:
  • Size: 12.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.10 CPython/3.9.7 Linux/5.8.0-1041-azure

File hashes

Hashes for aga-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c345e64c29b858ff77f0b4ba8158fe7ebead2d8100e99a4570f9c03638724271
MD5 5ab23f21c1d8f199a30cb795e140fa5b
BLAKE2b-256 30d8f6e9c2b30d59794fc07b45796b6bf074be1ef3dcd2746a230c96631d7f80

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