QuizGenerator 0.1.0__py3-none-any.whl

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.
Files changed (44) hide show
  1. QuizGenerator/README.md +5 -0
  2. QuizGenerator/__init__.py +27 -0
  3. QuizGenerator/__main__.py +7 -0
  4. QuizGenerator/canvas/__init__.py +13 -0
  5. QuizGenerator/canvas/canvas_interface.py +622 -0
  6. QuizGenerator/canvas/classes.py +235 -0
  7. QuizGenerator/constants.py +149 -0
  8. QuizGenerator/contentast.py +1809 -0
  9. QuizGenerator/generate.py +362 -0
  10. QuizGenerator/logging.yaml +55 -0
  11. QuizGenerator/misc.py +480 -0
  12. QuizGenerator/mixins.py +539 -0
  13. QuizGenerator/performance.py +202 -0
  14. QuizGenerator/premade_questions/__init__.py +0 -0
  15. QuizGenerator/premade_questions/basic.py +103 -0
  16. QuizGenerator/premade_questions/cst334/__init__.py +1 -0
  17. QuizGenerator/premade_questions/cst334/languages.py +395 -0
  18. QuizGenerator/premade_questions/cst334/math_questions.py +297 -0
  19. QuizGenerator/premade_questions/cst334/memory_questions.py +1398 -0
  20. QuizGenerator/premade_questions/cst334/ostep13_vsfs.py +572 -0
  21. QuizGenerator/premade_questions/cst334/persistence_questions.py +396 -0
  22. QuizGenerator/premade_questions/cst334/process.py +649 -0
  23. QuizGenerator/premade_questions/cst463/__init__.py +0 -0
  24. QuizGenerator/premade_questions/cst463/gradient_descent/__init__.py +3 -0
  25. QuizGenerator/premade_questions/cst463/gradient_descent/gradient_calculation.py +369 -0
  26. QuizGenerator/premade_questions/cst463/gradient_descent/gradient_descent_questions.py +305 -0
  27. QuizGenerator/premade_questions/cst463/gradient_descent/loss_calculations.py +650 -0
  28. QuizGenerator/premade_questions/cst463/gradient_descent/misc.py +73 -0
  29. QuizGenerator/premade_questions/cst463/math_and_data/__init__.py +2 -0
  30. QuizGenerator/premade_questions/cst463/math_and_data/matrix_questions.py +631 -0
  31. QuizGenerator/premade_questions/cst463/math_and_data/vector_questions.py +534 -0
  32. QuizGenerator/premade_questions/cst463/neural-network-basics/__init__.py +6 -0
  33. QuizGenerator/premade_questions/cst463/neural-network-basics/neural_network_questions.py +1264 -0
  34. QuizGenerator/premade_questions/cst463/tensorflow-intro/__init__.py +6 -0
  35. QuizGenerator/premade_questions/cst463/tensorflow-intro/tensorflow_questions.py +936 -0
  36. QuizGenerator/qrcode_generator.py +293 -0
  37. QuizGenerator/question.py +657 -0
  38. QuizGenerator/quiz.py +468 -0
  39. QuizGenerator/typst_utils.py +113 -0
  40. quizgenerator-0.1.0.dist-info/METADATA +263 -0
  41. quizgenerator-0.1.0.dist-info/RECORD +44 -0
  42. quizgenerator-0.1.0.dist-info/WHEEL +4 -0
  43. quizgenerator-0.1.0.dist-info/entry_points.txt +2 -0
  44. quizgenerator-0.1.0.dist-info/licenses/LICENSE +674 -0
@@ -0,0 +1,263 @@
1
+ Metadata-Version: 2.4
2
+ Name: QuizGenerator
3
+ Version: 0.1.0
4
+ Summary: Generate randomized quiz questions for Canvas LMS and PDF exams
5
+ Project-URL: Homepage, https://github.com/OtterDen-Lab/QuizGenerator
6
+ Project-URL: Documentation, https://github.com/OtterDen-Lab/QuizGenerator/tree/main/documentation
7
+ Project-URL: Repository, https://github.com/OtterDen-Lab/QuizGenerator
8
+ Project-URL: Bug Tracker, https://github.com/OtterDen-Lab/QuizGenerator/issues
9
+ Author-email: Sam Ogden <samuel.s.ogden@gmail.com>
10
+ License: GPL-3.0-or-later
11
+ License-File: LICENSE
12
+ Keywords: assessment,canvas,education,exam,lms,quiz,teaching,testing
13
+ Classifier: Development Status :: 4 - Beta
14
+ Classifier: Intended Audience :: Education
15
+ Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Topic :: Education :: Testing
19
+ Requires-Python: >=3.12
20
+ Requires-Dist: canvasapi==3.2.0
21
+ Requires-Dist: cryptography>=41.0.0
22
+ Requires-Dist: graphviz>=0.21
23
+ Requires-Dist: jinja2==3.1.3
24
+ Requires-Dist: markdown>=3.9
25
+ Requires-Dist: matplotlib
26
+ Requires-Dist: pylatex>=1.4.2
27
+ Requires-Dist: pypandoc~=1.6.3
28
+ Requires-Dist: pytablewriter~=1.2.0
29
+ Requires-Dist: python-dotenv==1.0.1
30
+ Requires-Dist: pyyaml==6.0.1
31
+ Requires-Dist: requests==2.32.2
32
+ Requires-Dist: segno>=1.6.0
33
+ Requires-Dist: sympy>=1.14.0
34
+ Provides-Extra: grading
35
+ Requires-Dist: pillow>=10.0.0; extra == 'grading'
36
+ Requires-Dist: pyzbar>=0.1.9; extra == 'grading'
37
+ Description-Content-Type: text/markdown
38
+
39
+ # QuizGenerator
40
+
41
+ Generate randomized quiz questions for Canvas LMS and PDF exams with support for multiple question types, automatic variation generation, and QR code-based answer keys.
42
+
43
+ ## Features
44
+
45
+ - **Multiple Output Formats**: Generate PDFs (LaTeX or Typst) and Canvas LMS quizzes
46
+ - **Automatic Variations**: Create unique versions for each student
47
+ - **Extensible**: Plugin system for custom question types
48
+ - **Built-in Question Library**: Memory management, process scheduling, calculus, linear algebra, and more
49
+ - **QR Code Answer Keys**: Regenerate exact exam versions from QR codes
50
+ - **Canvas Integration**: Direct upload to Canvas with variation support
51
+
52
+ ## Installation
53
+
54
+ ```bash
55
+ pip install QuizGenerator
56
+ ```
57
+
58
+ ### System Requirements
59
+
60
+ - Python 3.12+
61
+ - LaTeX distribution with `latexmk` (for PDF generation)
62
+ - Optional: [Typst](https://typst.app/) (alternative to LaTeX)
63
+
64
+ ### Optional Dependencies
65
+
66
+ ```bash
67
+ # For QR code grading support
68
+ pip install QuizGenerator[grading]
69
+ ```
70
+
71
+ ## Quick Start
72
+
73
+ ### 1. Create a quiz configuration (YAML)
74
+
75
+ ```yaml
76
+ # my_quiz.yaml
77
+ name: "Midterm Exam"
78
+
79
+ questions:
80
+ 10: # 10-point questions
81
+ "Process Scheduling":
82
+ class: FIFOScheduling
83
+
84
+ 5: # 5-point questions
85
+ "Memory Paging":
86
+ class: PagingQuestion
87
+
88
+ "Vector Math":
89
+ class: VectorAddition
90
+ ```
91
+
92
+ ### 2. Generate PDFs
93
+
94
+ ```bash
95
+ python -m generate_quiz --quiz_yaml my_quiz.yaml --num_pdfs 3
96
+ ```
97
+
98
+ PDFs will be created in the `out/` directory.
99
+
100
+ ### 3. Upload to Canvas
101
+
102
+ ```bash
103
+ # Set up Canvas credentials in ~/.env first:
104
+ # CANVAS_API_URL=https://canvas.instructure.com
105
+ # CANVAS_API_KEY=your_api_key_here
106
+
107
+ python -m generate_quiz \
108
+ --quiz_yaml my_quiz.yaml \
109
+ --num_canvas 5 \
110
+ --course_id 12345
111
+ ```
112
+
113
+ ## Creating Custom Questions
114
+
115
+ QuizGenerator supports two approaches for adding custom question types:
116
+
117
+ ### Option 1: Entry Points (Recommended for Distribution)
118
+
119
+ Create a pip-installable package:
120
+
121
+ ```toml
122
+ # pyproject.toml
123
+ [project.entry-points."quizgenerator.questions"]
124
+ my_question = "my_package.questions:MyCustomQuestion"
125
+ ```
126
+
127
+ After `pip install`, your questions are automatically available!
128
+
129
+ ### Option 2: Direct Import (Quick & Easy)
130
+
131
+ Add to your quiz YAML:
132
+
133
+ ```yaml
134
+ custom_modules:
135
+ - my_questions # Import my_questions.py
136
+
137
+ questions:
138
+ 10:
139
+ "My Question":
140
+ class: MyCustomQuestion
141
+ ```
142
+
143
+ See [documentation/custom_questions.md](documentation/custom_questions.md) for complete guide.
144
+
145
+ ## Built-in Question Types
146
+
147
+ ### Operating Systems (CST334)
148
+ - `FIFOScheduling`, `SJFScheduling`, `RoundRobinScheduling`
149
+ - `PagingQuestion`, `TLBQuestion`
150
+ - `SemaphoreQuestion`, `MutexQuestion`
151
+
152
+ ### Machine Learning / Math (CST463)
153
+ - `VectorAddition`, `VectorDotProduct`, `VectorMagnitude`
154
+ - `MatrixAddition`, `MatrixMultiplication`, `MatrixTranspose`
155
+ - `DerivativeBasic`, `DerivativeChain`
156
+ - `GradientDescentStep`
157
+
158
+ ### General
159
+ - `FromText` - Custom text questions
160
+ - `FromGenerator` - Programmatically generated questions
161
+
162
+ ## Documentation
163
+
164
+ - [Getting Started Guide](documentation/getting_started.md) (coming soon)
165
+ - [Custom Questions Guide](documentation/custom_questions.md)
166
+ - [YAML Configuration Reference](documentation/yaml_config_guide.md) (coming soon)
167
+ - [PyPI Release Plan](documentation/pypi_release_plan.md)
168
+
169
+ ## Canvas Setup
170
+
171
+ 1. Create a `~/.env` file with your Canvas credentials:
172
+
173
+ ```bash
174
+ # For testing/development
175
+ CANVAS_API_URL=https://canvas.test.instructure.com
176
+ CANVAS_API_KEY=your_test_api_key
177
+
178
+ # For production
179
+ CANVAS_API_URL_prod=https://canvas.instructure.com
180
+ CANVAS_API_KEY_prod=your_prod_api_key
181
+ ```
182
+
183
+ 2. Use `--prod` flag for production Canvas instance:
184
+
185
+ ```bash
186
+ python -m generate_quiz --prod --num_canvas 5 --course_id 12345
187
+ ```
188
+
189
+ ## Advanced Features
190
+
191
+ ### Typst Support
192
+
193
+ Use Typst instead of LaTeX for faster compilation:
194
+
195
+ ```bash
196
+ python -m generate_quiz --typst --num_pdfs 3
197
+ ```
198
+
199
+ ### Deterministic Generation
200
+
201
+ Use seeds for reproducible quizzes:
202
+
203
+ ```bash
204
+ python -m generate_quiz --seed 42 --num_pdfs 3
205
+ ```
206
+
207
+ ### QR Code Regeneration
208
+
209
+ Each generated exam includes a QR code that stores:
210
+ - Question types and parameters
211
+ - Random seed
212
+ - Version information
213
+
214
+ Use the grading tools to scan QR codes and regenerate exact exam versions.
215
+
216
+ ## Project Structure
217
+
218
+ ```
219
+ QuizGenerator/
220
+ ├── QuizGenerator/ # Main package
221
+ │ ├── question.py # Question base classes and registry
222
+ │ ├── quiz.py # Quiz generation logic
223
+ │ ├── contentast.py # Content AST for cross-format rendering
224
+ │ ├── premade_questions/ # Built-in question library
225
+ │ └── canvas/ # Canvas LMS integration
226
+ ├── example_files/ # Example quiz configurations
227
+ ├── documentation/ # User guides
228
+ └── generate_quiz.py # CLI entry point
229
+ ```
230
+
231
+ ## Contributing
232
+
233
+ Contributions welcome! Areas of interest:
234
+ - New question types
235
+ - Additional LMS integrations
236
+ - Documentation improvements
237
+ - Bug fixes
238
+
239
+ ## License
240
+
241
+ GNU General Public License v3.0 or later (GPLv3+) - see LICENSE file for details
242
+
243
+ ## Citation
244
+
245
+ If you use QuizGenerator in academic work, please cite:
246
+
247
+ ```
248
+ @software{quizgenerator,
249
+ author = {Ogden, Sam},
250
+ title = {QuizGenerator: Automated Quiz Generation for Education},
251
+ year = {2024},
252
+ url = {https://github.com/OtterDen-Lab/QuizGenerator}
253
+ }
254
+ ```
255
+
256
+ ## Support
257
+
258
+ - Issues: https://github.com/OtterDen-Lab/QuizGenerator/issues
259
+ - Documentation: https://github.com/OtterDen-Lab/QuizGenerator/tree/main/documentation
260
+
261
+ ---
262
+
263
+ **Note**: This tool is designed for educational use. Ensure compliance with your institution's academic integrity policies when using automated quiz generation.
@@ -0,0 +1,44 @@
1
+ QuizGenerator/README.md,sha256=4n16gKyhIAKRBX4VKlpfcK0pyUYJ6Ht08MUsnwgxrZo,145
2
+ QuizGenerator/__init__.py,sha256=8EV-k90A3PNC8Cm2-ZquwNyVyvnwW1gs6u-nGictyhs,840
3
+ QuizGenerator/__main__.py,sha256=Dd9w4R0Unm3RiXztvR4Y_g9-lkWp6FHg-4VN50JbKxU,151
4
+ QuizGenerator/constants.py,sha256=AO-UWwsWPLb1k2JW6KP8rl9fxTcdT0rW-6XC6zfnDOs,4386
5
+ QuizGenerator/contentast.py,sha256=bHC1D_OBrDCnTuXcTiI37Muk20mBxD1gjDArUBrGv9c,63657
6
+ QuizGenerator/generate.py,sha256=q5higZqQ4Q-OEC39cFWTyY89kWUtM9NMpxdD3_P4n9Q,11990
7
+ QuizGenerator/logging.yaml,sha256=VJCdh26D8e_PNUs4McvvP1ojz9EVjQNifJzfhEk1Mbo,1114
8
+ QuizGenerator/misc.py,sha256=uIc1revyGZK8LL-1sJfhsoJ_MlYn75LPap6FRAiJWRQ,15635
9
+ QuizGenerator/mixins.py,sha256=RjV76C1tkTLSvhSoMys67W7UmR6y6wAAcBM2Msxdpd0,18186
10
+ QuizGenerator/performance.py,sha256=CM3zLarJXN5Hfrl4-6JRBqD03j4BU1B2QW699HAr1Ds,7002
11
+ QuizGenerator/qrcode_generator.py,sha256=S3mzZDk2UiHiw6ipSCpWPMhbKvSRR1P5ordZJUTo6ug,10776
12
+ QuizGenerator/question.py,sha256=ZA-Yl28mtBXV3GgUipqogL9pKEBiLYzHq_io9wLXcKo,25390
13
+ QuizGenerator/quiz.py,sha256=wOuj_mDfdnUNHlAEAcLUZoH-JX57RovLoYW4mA0GgPc,18762
14
+ QuizGenerator/typst_utils.py,sha256=XtMEO1e4_Tg0G1zR9D1fmrYKlUfHenBPdGoCKR0DhZg,3154
15
+ QuizGenerator/canvas/__init__.py,sha256=qsgHE4cz_WBXYZ3DZ_fEqLXUKbm-fH6oLkNUAnX96HY,286
16
+ QuizGenerator/canvas/canvas_interface.py,sha256=vbfLX9BBKIOwkVyiXzrwIsjdRbl6jYTnxznt-ymARrM,24407
17
+ QuizGenerator/canvas/classes.py,sha256=v_tQ8t_JJplU9sv2p4YctX45Fwed1nQ2HC1oC9BnDNw,7594
18
+ QuizGenerator/premade_questions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
19
+ QuizGenerator/premade_questions/basic.py,sha256=wAvVZED6a7VToIvSCdAx6SrExmR0xVRo5dL40kycdXI,3402
20
+ QuizGenerator/premade_questions/cst334/__init__.py,sha256=BTz-Os1XbwIRKqAilf2UIva2NlY0DbA_XbSIggO2Tdk,36
21
+ QuizGenerator/premade_questions/cst334/languages.py,sha256=N5vcmZi-AFM_BZypnvNogHD7s--28-j-8tykYg6CBzs,14388
22
+ QuizGenerator/premade_questions/cst334/math_questions.py,sha256=za8lNqhM0RB8qefmPP-Ww0WB_SQn0iRcBKOrZgyHCQQ,9290
23
+ QuizGenerator/premade_questions/cst334/memory_questions.py,sha256=s887hyUyOBcUa53zhPxwdOV2YbJChSywZNpTtAqeljs,51561
24
+ QuizGenerator/premade_questions/cst334/ostep13_vsfs.py,sha256=d9jjrynEw44vupAH_wKl57UoHooCNEJXaC5DoNYualk,16163
25
+ QuizGenerator/premade_questions/cst334/persistence_questions.py,sha256=em-HzFRnaroDmHl5uA771HyFMI7dMvG-gxTgsB3ecaY,14458
26
+ QuizGenerator/premade_questions/cst334/process.py,sha256=C7-FzOGW7EzQHXZNKden7eHo1NoG0UQbci0ZrUtybzs,23732
27
+ QuizGenerator/premade_questions/cst463/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
28
+ QuizGenerator/premade_questions/cst463/gradient_descent/__init__.py,sha256=sH2CUV6zK9FT3jWTn453ys6_JTrUKRtZnU8hK6RmImU,240
29
+ QuizGenerator/premade_questions/cst463/gradient_descent/gradient_calculation.py,sha256=ssj6Xkpw6vDiL4qwVOiHUhly3TX50oX4KJtouj7qN6g,12809
30
+ QuizGenerator/premade_questions/cst463/gradient_descent/gradient_descent_questions.py,sha256=VjmNDpV3YgeYKqyYp4wQXZIViZVvC1GcnjVUl7valhU,9724
31
+ QuizGenerator/premade_questions/cst463/gradient_descent/loss_calculations.py,sha256=TnhcD9OBsYgVDdSY5qPrSovnYB6r90wiGcg934czIrY,21500
32
+ QuizGenerator/premade_questions/cst463/gradient_descent/misc.py,sha256=iB3obG6-uXr_yrLVT7L_9j1H54f7oe5Rk9w45yW-lnw,2654
33
+ QuizGenerator/premade_questions/cst463/math_and_data/__init__.py,sha256=EbIaUrx7_aK9j3Gd8Mk08h9GocTq_0OoNu2trfNwaU8,202
34
+ QuizGenerator/premade_questions/cst463/math_and_data/matrix_questions.py,sha256=sq27xv7X9aa0axFxomusZRwM-ICj9grbhD_Bv3n3gJg,28947
35
+ QuizGenerator/premade_questions/cst463/math_and_data/vector_questions.py,sha256=tNxfR6J1cZHsHG9GfwVyl6lxxN_TEnhKDmMq4aVLwow,20793
36
+ QuizGenerator/premade_questions/cst463/neural-network-basics/__init__.py,sha256=pmyCezO-20AFEQC6MR7KnAsaU9TcgZYsGQOMVkRZ-U8,149
37
+ QuizGenerator/premade_questions/cst463/neural-network-basics/neural_network_questions.py,sha256=7ZtCQ2fXhIPSd99TstQfOKCN13GJE_56UfBQKdmzmMI,42398
38
+ QuizGenerator/premade_questions/cst463/tensorflow-intro/__init__.py,sha256=G1gEHtG4KakYgi8ZXSYYhX6bQRtnm2tZVGx36d63Nmo,173
39
+ QuizGenerator/premade_questions/cst463/tensorflow-intro/tensorflow_questions.py,sha256=dPn8Sj0yk4m02np62esMKZ7CvcljhYq3Tq51nY9aJnA,29781
40
+ quizgenerator-0.1.0.dist-info/METADATA,sha256=p4Ahyc6-chI3WWQTlmVKIPA5i5UQ-UVTZDvzDXfsJEA,7149
41
+ quizgenerator-0.1.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
42
+ quizgenerator-0.1.0.dist-info/entry_points.txt,sha256=iViWMzswXGe88WKoue_Ib-ODUSiT_j_6f1us28w9pkc,56
43
+ quizgenerator-0.1.0.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
44
+ quizgenerator-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.27.0
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ quizgen = QuizGenerator.generate:main