Metadata-Version: 2.5
Name: pyaota
Version: 0.6.1
Summary: Python app for generating and grading exams.
Author: Cameron F. Abrams
License: MIT License
        
        Copyright (c) 2025 Cameron F. Abrams
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Requires-Python: >=3.10
Requires-Dist: numpy
Requires-Dist: opencv-python-headless
Requires-Dist: pandas
Requires-Dist: pdf2image
Requires-Dist: pillow
Requires-Dist: pint
Requires-Dist: pypdf2
Requires-Dist: python-docx
Requires-Dist: pyyaml
Requires-Dist: qrcode[pil]
Requires-Dist: scipy
Provides-Extra: dev
Requires-Dist: black; extra == 'dev'
Requires-Dist: pytest; extra == 'dev'
Requires-Dist: pytest-cov; extra == 'dev'
Requires-Dist: ruff; extra == 'dev'
Provides-Extra: docs
Requires-Dist: furo; extra == 'docs'
Requires-Dist: myst-parser; extra == 'docs'
Requires-Dist: sphinx; extra == 'docs'
Requires-Dist: sphinx-autodoc-typehints; extra == 'docs'
Requires-Dist: sphinx-copybutton; extra == 'docs'
Provides-Extra: interactive
Requires-Dist: matplotlib; extra == 'interactive'
Provides-Extra: test
Requires-Dist: pytest; extra == 'test'
Description-Content-Type: text/markdown

# pyaota

> Multiple choice exam question manager, exam generator, and exam grader

[![Tests](https://github.com/cameronabrams/pyaota/actions/workflows/tests.yaml/badge.svg)](https://github.com/cameronabrams/pyaota/actions/workflows/tests.yaml)
[![PyPI](https://img.shields.io/pypi/v/pyaota)](https://pypi.org/project/pyaota/)
[![Docs](https://readthedocs.org/projects/pyaota/badge/?version=latest)](https://pyaota.readthedocs.io/en/latest/)

pyaota builds randomized multiple-choice and true/false exams from YAML question
banks, typesets them with a machine-readable answer sheet (bubble field, student-ID
bubbles and a QR code identifying the version), and grades the scanned sheets back
into your gradebook CSV.

- Many versions from one bank, with questions and choices shuffled per version
- Optional encryption of each version's answers in its QR code, so grading needs no key file
- Per-page graded overlays, a failed-pages report, and interactive recovery for unreadable pages
- Utilities to convert ZyBooks question exports (QTI XML or Word), bundle PDFs for printing, and email graded sheets (Windows/Outlook)

## Install

```bash
pip install pyaota
```

You also need **xelatex** (TeX Live or MiKTeX) to build exams and **Poppler**
(`apt install poppler-utils`, `brew install poppler`, or `conda install -c conda-forge poppler`)
to grade them. Optional extras: `pyaota[interactive]` for `grade --interactive`.

## Quick start

```bash
# build two shuffled 20-question versions with answers encrypted in the QR codes
pyaota build -q examples/question_banks/simple_math.yaml \
  -n 2 -nq 20 -nc 4 -sc -sq --encode-answers-in-qr \
  --institution "Example University" --course "MATH 101" --term "Spring 2026" \
  -en "Quiz 1" -od build

# after the exam: grade the scanned answer sheets
pyaota grade -i scans.pdf -alj build/answersheet_layout.json -od graded
```

Keep `answersheet_layout.json` away from students: it holds the key that decrypts
the answers in the QR codes.

## Documentation

Full documentation — question bank schema, every subcommand, the grading
workflow and worked examples — is at <https://pyaota.readthedocs.io>.

## Development

```bash
git clone https://github.com/cameronabrams/pyaota.git
cd pyaota
pip install -e '.[test]'
pytest
```

Changes are recorded in [CHANGELOG.md](CHANGELOG.md).
