QuizGenerator 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- quizgenerator-0.1.0/.envrc +3 -0
- quizgenerator-0.1.0/.github/pull_request_template.md +36 -0
- quizgenerator-0.1.0/.gitignore +12 -0
- quizgenerator-0.1.0/.gitmodules +0 -0
- quizgenerator-0.1.0/CLAUDE.md +80 -0
- quizgenerator-0.1.0/CODEOWNERS +1 -0
- quizgenerator-0.1.0/LICENSE +674 -0
- quizgenerator-0.1.0/PKG-INFO +263 -0
- quizgenerator-0.1.0/QuizGenerator/README.md +5 -0
- quizgenerator-0.1.0/QuizGenerator/__init__.py +27 -0
- quizgenerator-0.1.0/QuizGenerator/__main__.py +7 -0
- quizgenerator-0.1.0/QuizGenerator/canvas/__init__.py +13 -0
- quizgenerator-0.1.0/QuizGenerator/canvas/canvas_interface.py +622 -0
- quizgenerator-0.1.0/QuizGenerator/canvas/classes.py +235 -0
- quizgenerator-0.1.0/QuizGenerator/constants.py +149 -0
- quizgenerator-0.1.0/QuizGenerator/contentast.py +1809 -0
- quizgenerator-0.1.0/QuizGenerator/generate.py +362 -0
- quizgenerator-0.1.0/QuizGenerator/logging.yaml +55 -0
- quizgenerator-0.1.0/QuizGenerator/misc.py +480 -0
- quizgenerator-0.1.0/QuizGenerator/mixins.py +539 -0
- quizgenerator-0.1.0/QuizGenerator/performance.py +202 -0
- quizgenerator-0.1.0/QuizGenerator/premade_questions/__init__.py +0 -0
- quizgenerator-0.1.0/QuizGenerator/premade_questions/basic.py +103 -0
- quizgenerator-0.1.0/QuizGenerator/premade_questions/cst334/__init__.py +1 -0
- quizgenerator-0.1.0/QuizGenerator/premade_questions/cst334/languages.py +395 -0
- quizgenerator-0.1.0/QuizGenerator/premade_questions/cst334/math_questions.py +297 -0
- quizgenerator-0.1.0/QuizGenerator/premade_questions/cst334/memory_questions.py +1398 -0
- quizgenerator-0.1.0/QuizGenerator/premade_questions/cst334/ostep13_vsfs.py +572 -0
- quizgenerator-0.1.0/QuizGenerator/premade_questions/cst334/persistence_questions.py +396 -0
- quizgenerator-0.1.0/QuizGenerator/premade_questions/cst334/process.py +649 -0
- quizgenerator-0.1.0/QuizGenerator/premade_questions/cst463/__init__.py +0 -0
- quizgenerator-0.1.0/QuizGenerator/premade_questions/cst463/gradient_descent/__init__.py +3 -0
- quizgenerator-0.1.0/QuizGenerator/premade_questions/cst463/gradient_descent/gradient_calculation.py +369 -0
- quizgenerator-0.1.0/QuizGenerator/premade_questions/cst463/gradient_descent/gradient_descent_questions.py +305 -0
- quizgenerator-0.1.0/QuizGenerator/premade_questions/cst463/gradient_descent/loss_calculations.py +650 -0
- quizgenerator-0.1.0/QuizGenerator/premade_questions/cst463/gradient_descent/misc.py +73 -0
- quizgenerator-0.1.0/QuizGenerator/premade_questions/cst463/math_and_data/__init__.py +2 -0
- quizgenerator-0.1.0/QuizGenerator/premade_questions/cst463/math_and_data/matrix_questions.py +631 -0
- quizgenerator-0.1.0/QuizGenerator/premade_questions/cst463/math_and_data/vector_questions.py +534 -0
- quizgenerator-0.1.0/QuizGenerator/premade_questions/cst463/neural-network-basics/__init__.py +6 -0
- quizgenerator-0.1.0/QuizGenerator/premade_questions/cst463/neural-network-basics/neural_network_questions.py +1264 -0
- quizgenerator-0.1.0/QuizGenerator/premade_questions/cst463/tensorflow-intro/__init__.py +6 -0
- quizgenerator-0.1.0/QuizGenerator/premade_questions/cst463/tensorflow-intro/tensorflow_questions.py +936 -0
- quizgenerator-0.1.0/QuizGenerator/qrcode_generator.py +293 -0
- quizgenerator-0.1.0/QuizGenerator/question.py +657 -0
- quizgenerator-0.1.0/QuizGenerator/quiz.py +468 -0
- quizgenerator-0.1.0/QuizGenerator/typst_utils.py +113 -0
- quizgenerator-0.1.0/README.md +225 -0
- quizgenerator-0.1.0/documentation/GRADING_GUIDE.md +284 -0
- quizgenerator-0.1.0/documentation/LESSONS_LEARNED-adding_questions.md +707 -0
- quizgenerator-0.1.0/documentation/PARAMETER_STANDARDS.md +111 -0
- quizgenerator-0.1.0/documentation/README.md +158 -0
- quizgenerator-0.1.0/documentation/WEB_UI_INTEGRATION.md +446 -0
- quizgenerator-0.1.0/documentation/claude_todo.md +253 -0
- quizgenerator-0.1.0/documentation/custom_questions.md +408 -0
- quizgenerator-0.1.0/documentation/pypi_release_plan.md +306 -0
- quizgenerator-0.1.0/documentation/typst_integration_strategy.md +237 -0
- quizgenerator-0.1.0/example_files/all_classes.yaml +184 -0
- quizgenerator-0.1.0/example_files/cst334.yaml +173 -0
- quizgenerator-0.1.0/example_files/cst463.yaml +199 -0
- quizgenerator-0.1.0/example_files/exam_generation.yaml +41 -0
- quizgenerator-0.1.0/example_files/scratch.yaml +72 -0
- quizgenerator-0.1.0/example_files/specific_generators/cst334.caching.yaml +32 -0
- quizgenerator-0.1.0/example_files/specific_generators/cst334.lab-address_translation.yaml +19 -0
- quizgenerator-0.1.0/examples/README.md +55 -0
- quizgenerator-0.1.0/examples/web_ui_integration_example.py +207 -0
- quizgenerator-0.1.0/grade_from_qr.py +472 -0
- quizgenerator-0.1.0/performance_test.py +51 -0
- quizgenerator-0.1.0/pyproject.toml +73 -0
- quizgenerator-0.1.0/scripts/README.md +61 -0
- quizgenerator-0.1.0/scripts/generate_practice_yaml.sh +17 -0
- quizgenerator-0.1.0/scripts/print.sh +24 -0
- quizgenerator-0.1.0/scripts/vendor_lms_interface.py +334 -0
- quizgenerator-0.1.0/uv.lock +1113 -0
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# Pull Request
|
|
2
|
+
|
|
3
|
+
## Description
|
|
4
|
+
<!-- Provide a brief description of what this PR accomplishes -->
|
|
5
|
+
|
|
6
|
+
## Changes Made
|
|
7
|
+
<!-- List the key changes made in this PR -->
|
|
8
|
+
-
|
|
9
|
+
-
|
|
10
|
+
-
|
|
11
|
+
|
|
12
|
+
## Type of Change
|
|
13
|
+
<!-- Mark the appropriate option with an [x] -->
|
|
14
|
+
- [ ] Bug fix (non-breaking change that fixes an issue)
|
|
15
|
+
- [ ] New feature (non-breaking change that adds functionality)
|
|
16
|
+
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
|
|
17
|
+
- [ ] Documentation update
|
|
18
|
+
- [ ] Refactoring (no functional changes)
|
|
19
|
+
|
|
20
|
+
## Testing Done
|
|
21
|
+
<!-- Describe the testing you've done to verify your changes -->
|
|
22
|
+
|
|
23
|
+
## Checklist
|
|
24
|
+
<!-- Mark the appropriate options with an [x] -->
|
|
25
|
+
- [ ] My code follows the style guidelines of this project
|
|
26
|
+
- [ ] I have performed a self-review of my own code
|
|
27
|
+
- [ ] I have commented my code, particularly in hard-to-understand areas
|
|
28
|
+
- [ ] I have updated the documentation accordingly
|
|
29
|
+
- [ ] My changes generate no new warnings
|
|
30
|
+
- [ ] Any dependent changes have been merged and published
|
|
31
|
+
|
|
32
|
+
## Screenshots (if applicable)
|
|
33
|
+
<!-- Add screenshots here if they help explain your changes -->
|
|
34
|
+
|
|
35
|
+
## Notes
|
|
36
|
+
<!-- Any additional notes or context about the PR -->
|
|
File without changes
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# CLAUDE.md
|
|
2
|
+
|
|
3
|
+
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
|
|
4
|
+
|
|
5
|
+
## Project Overview
|
|
6
|
+
|
|
7
|
+
This is a Python-based teaching tools project focused on quiz generation and Canvas LMS integration. The main entry point is `generate_quiz.py`, which generates quizzes in both PDF format and Canvas variations based on YAML configuration files.
|
|
8
|
+
|
|
9
|
+
## Architecture
|
|
10
|
+
|
|
11
|
+
### Core Modules
|
|
12
|
+
- **QuizGenerator/**: Main quiz generation engine
|
|
13
|
+
- `quiz.py`: Core Quiz class that loads from YAML and generates output
|
|
14
|
+
- `question.py`: Question classes and registry system for different question types
|
|
15
|
+
- `premade_questions/`: Collection of specialized question generators (memory, processes, persistence, etc.)
|
|
16
|
+
- `misc.py`: Utilities for output formats and content handling
|
|
17
|
+
|
|
18
|
+
- **lms_interface/**: Canvas LMS integration (submodule)
|
|
19
|
+
- `canvas_interface.py`: CanvasInterface and CanvasCourse classes for API interaction
|
|
20
|
+
- `classes.py`: Data models for LMS objects
|
|
21
|
+
|
|
22
|
+
### Question System
|
|
23
|
+
The project uses a plugin-based question system where question types are defined as classes in `premade_questions/` and registered dynamically. Questions are defined in YAML files that specify the class name and parameters.
|
|
24
|
+
|
|
25
|
+
### Configuration Files
|
|
26
|
+
Quiz configurations are stored in `example_files/` as YAML files. The default configuration is `exam_generation.yaml`, which defines question types, point values, and organization.
|
|
27
|
+
|
|
28
|
+
## Development Commands
|
|
29
|
+
|
|
30
|
+
### Environment Setup
|
|
31
|
+
```bash
|
|
32
|
+
# The project uses uv for dependency management
|
|
33
|
+
uv sync
|
|
34
|
+
source .venv/bin/activate
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### Running the Main Script
|
|
38
|
+
```bash
|
|
39
|
+
# Generate PDFs only
|
|
40
|
+
python generate_quiz.py --num_pdfs 3
|
|
41
|
+
|
|
42
|
+
# Generate Canvas quizzes (requires course_id)
|
|
43
|
+
python generate_quiz.py --num_canvas 5 --course_id 12345
|
|
44
|
+
|
|
45
|
+
# Use production Canvas instance
|
|
46
|
+
python generate_quiz.py --prod --num_canvas 2 --course_id 12345
|
|
47
|
+
|
|
48
|
+
# Custom quiz configuration
|
|
49
|
+
python generate_quiz.py --quiz_yaml example_files/custom_quiz.yaml --num_pdfs 2
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### Quality Tools
|
|
53
|
+
The project includes development dependencies for code quality:
|
|
54
|
+
```bash
|
|
55
|
+
# Code formatting
|
|
56
|
+
black .
|
|
57
|
+
|
|
58
|
+
# Linting
|
|
59
|
+
flake8
|
|
60
|
+
|
|
61
|
+
# Type checking
|
|
62
|
+
mypy QuizGenerator/
|
|
63
|
+
|
|
64
|
+
# Testing
|
|
65
|
+
pytest
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### LaTeX Dependencies
|
|
69
|
+
PDF generation requires LaTeX with `latexmk`. Generated PDFs are output to the `out/` directory.
|
|
70
|
+
|
|
71
|
+
## Key Files and Patterns
|
|
72
|
+
|
|
73
|
+
- Quiz configurations follow the pattern in `example_files/exam_generation.yaml`
|
|
74
|
+
- New question types should extend base classes in `question.py` and be placed in `premade_questions/`
|
|
75
|
+
- The project uses logging extensively - check `teachingtools.log` for detailed output
|
|
76
|
+
- Canvas integration requires environment variables for API keys (see `.env` symlink)
|
|
77
|
+
|
|
78
|
+
## Testing Notes
|
|
79
|
+
|
|
80
|
+
The project includes a test mode accessible via `python generate_quiz.py TEST`.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
* @samogden
|