Science Score: 23.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
○.zenodo.json file
-
○DOI references
-
○Academic publication links
-
✓Committers with academic emails
1 of 5 committers (20.0%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (15.1%) to scientific vocabulary
Repository
aga grades assignments
Basic Info
Statistics
- Stars: 9
- Watchers: 2
- Forks: 2
- Open Issues: 17
- Releases: 35
Metadata Files
README.md
aga (aga grades assignments) is a tool for easily producing autograders for python programming assignments, originally developed for Reed College's CS1 course.
Motivation
Unlike traditional software testing, where there is likely no a priori known-correct implementation, there is always such an implementation (or one can be easily written by course staff) in homework grading. Therefore, applying traditional software testing frameworks to homework grading is limited. Relying on reference implementations (what aga calls golden solutions) has several benefits:
- Reliability: having a reference solution gives a second layer of confirmation for the correctness of expected outputs. Aga supports golden tests, which function as traditional unit tests of the golden solution.
- Test case generation: many complex test cases can easily be generated via the reference solution, instead of needing to work out the expected output by hand. Aga supports generating test cases from inputs without explcitly referring to an expected output, and supports collecting test cases from python generators.
- Property testing: unit testing libraries like hypothesis allow testing large sets of arbitrary inputs for certain properties, and identifying simple inputs which reproduce violations of those properties. This is traditionally unreliable, because identifying specific properties to test is difficult. In homework grading, the property can simply be "the input matches the golden solution's output." Support for hypothesis is a long-term goal of aga.
Installation
Install from pip:
bash
pip install aga
or with the python dependency manager of your choice (I like poetry), for example:
bash
curl -sSL https://install.python-poetry.org | python3 -
echo "cd into aga repo"
cd aga
poetry install && poetry shell
Example
In square.py (or any python file), write:
```python from aga import problem, testcase, testcases
@testcases(-3, 100) @testcase(2, agaexpect=4) @testcase(-2, aga_expect=4) @problem() def square(x: int) -> int: """Square x.""" return x * x ```
Then run aga gen square.py 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:
- Write a golden solution to some programming problem.
- Decorate this solution with the
problemdecorator. - Decorate this problem with any number of
test_casedecorators, which take arbitrary positional or keyword arguments and pass them verbatim to the golden and submitted functions. - Generate the autograder using the CLI:
aga gen <file_name>.
The test_case decorator may optionally take a special keyword argument called aga_expect. This allows easy testing of the golden solution: aga will not successfully produce an autograder unless the golden solution's output matches the aga_expect. You should use these as sanity checks to ensure your golden solution is implemented correctly.
For more info, see the tutorial.
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.
Owner
- Name: Riley Shahar
- Login: rileyshahar
- Kind: user
- Repositories: 1
- Profile: https://github.com/rileyshahar
GitHub Events
Total
- Watch event: 1
Last Year
- Watch event: 1
Committers
Last synced: almost 3 years ago
Top Committers
| Name | Commits | |
|---|---|---|
| Riley Shahar | r****r@g****m | 110 |
| FlickerSoul | 1****l | 68 |
| Heyuan Zeng | hi@u****r | 42 |
| Sima Nerush | 2****n@g****m | 4 |
| Dylan McNamee | d****e@g****m | 1 |
Committer Domains (Top 20 + Academic)
Dependencies
- myst-parser ==0.15.2
- sphinx ==4.2.0
- sphinx-autodoc-typehints ==1.12.0
- sphinx-click ==3.0.1
- sphinx-rtd-theme ==1.0.0
- black ^22.1.0 develop
- codecov ^2.1.12 develop
- coverage ^5.5 develop
- docker ^5.0.2 develop
- flake8 ^3.9.2 develop
- flake8-black ^0.2.3 develop
- flake8-bugbear ^21.9.1 develop
- mypy ^0.910 develop
- mypy-ls ^0.5.1 develop
- myst-parser ^0.15.2 develop
- nox ^2021.6.12 develop
- nox-poetry ^0.8.6 develop
- pydocstyle ^6.1.1 develop
- pyls-flake8 ^0.4.0 develop
- pyls-isort ^0.2.2 develop
- pytest ^6.2.5 develop
- pytest-cov ^2.12.1 develop
- pytest-lazy-fixture ^0.6.3 develop
- pytest-mock ^3.6.1 develop
- python-lsp-black ^1.0.0 develop
- python-lsp-server ^1.2.2 develop
- sphinx ^4.2.0 develop
- sphinx-autodoc-typehints ^1.12.0 develop
- sphinx-click ^3.0.1 develop
- sphinx-rtd-theme ^1.0.0 develop
- types-backports ^0.1.3 develop
- backports-datetime-fromisoformat ^1.0.0
- dataclasses ^0.8.0
- dataclasses-json ^0.5.6
- dill ^0.3.4
- gradescope-utils ^0.4.0
- importlib-metadata ^4.8.1
- importlib-resources ^5.2.2
- python ^3.6.2
- typer ^0.4.0
- types-dataclasses ^0.1.7
- actions/checkout v2 composite
- actions/setup-python v2 composite
- actions/checkout v2 composite
- actions/setup-python v2 composite
- actions/checkout v2 composite
- actions/setup-python v2 composite
- actions/checkout v2 composite
- actions/setup-python v2 composite
- dacite *
- dataclasses-json *
- dill *
- gradescope-utils *
- toml *
- typer *
- types-toml *