QuizGenerator 0.8.1__py3-none-any.whl → 0.10.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.
- QuizGenerator/README.md +5 -0
- QuizGenerator/canvas/canvas_interface.py +6 -2
- QuizGenerator/contentast.py +33 -11
- QuizGenerator/generate.py +51 -10
- QuizGenerator/logging.yaml +55 -0
- QuizGenerator/mixins.py +6 -2
- QuizGenerator/premade_questions/basic.py +49 -7
- QuizGenerator/premade_questions/cst463/gradient_descent/gradient_calculation.py +92 -82
- QuizGenerator/premade_questions/cst463/gradient_descent/gradient_descent_questions.py +68 -45
- QuizGenerator/premade_questions/cst463/gradient_descent/loss_calculations.py +238 -162
- QuizGenerator/premade_questions/cst463/models/attention.py +0 -1
- QuizGenerator/premade_questions/cst463/models/cnns.py +0 -1
- QuizGenerator/premade_questions/cst463/models/rnns.py +0 -1
- QuizGenerator/premade_questions/cst463/models/text.py +0 -1
- QuizGenerator/premade_questions/cst463/models/weight_counting.py +20 -1
- QuizGenerator/premade_questions/cst463/neural-network-basics/neural_network_questions.py +51 -45
- QuizGenerator/premade_questions/cst463/tensorflow-intro/tensorflow_questions.py +212 -215
- QuizGenerator/qrcode_generator.py +116 -54
- QuizGenerator/question.py +168 -23
- QuizGenerator/regenerate.py +23 -9
- {quizgenerator-0.8.1.dist-info → quizgenerator-0.10.0.dist-info}/METADATA +34 -22
- {quizgenerator-0.8.1.dist-info → quizgenerator-0.10.0.dist-info}/RECORD +25 -23
- {quizgenerator-0.8.1.dist-info → quizgenerator-0.10.0.dist-info}/WHEEL +0 -0
- {quizgenerator-0.8.1.dist-info → quizgenerator-0.10.0.dist-info}/entry_points.txt +0 -0
- {quizgenerator-0.8.1.dist-info → quizgenerator-0.10.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: QuizGenerator
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.10.0
|
|
4
4
|
Summary: Generate randomized quiz questions for Canvas LMS and PDF exams
|
|
5
5
|
Project-URL: Homepage, https://github.com/OtterDen-Lab/QuizGenerator
|
|
6
6
|
Project-URL: Documentation, https://github.com/OtterDen-Lab/QuizGenerator/tree/main/documentation
|
|
@@ -19,9 +19,7 @@ Classifier: Topic :: Education :: Testing
|
|
|
19
19
|
Requires-Python: >=3.12
|
|
20
20
|
Requires-Dist: canvasapi==3.2.0
|
|
21
21
|
Requires-Dist: cryptography>=41.0.0
|
|
22
|
-
Requires-Dist: graphviz>=0.21
|
|
23
22
|
Requires-Dist: jinja2==3.1.3
|
|
24
|
-
Requires-Dist: keras>=3.12.0
|
|
25
23
|
Requires-Dist: markdown>=3.9
|
|
26
24
|
Requires-Dist: matplotlib
|
|
27
25
|
Requires-Dist: pylatex>=1.4.2
|
|
@@ -32,7 +30,10 @@ Requires-Dist: pyyaml==6.0.1
|
|
|
32
30
|
Requires-Dist: requests==2.32.2
|
|
33
31
|
Requires-Dist: segno>=1.6.0
|
|
34
32
|
Requires-Dist: sympy>=1.14.0
|
|
35
|
-
|
|
33
|
+
Provides-Extra: cst463
|
|
34
|
+
Requires-Dist: graphviz>=0.21; extra == 'cst463'
|
|
35
|
+
Requires-Dist: keras>=3.12.0; extra == 'cst463'
|
|
36
|
+
Requires-Dist: tensorflow>=2.20.0; extra == 'cst463'
|
|
36
37
|
Provides-Extra: grading
|
|
37
38
|
Requires-Dist: pillow>=10.0.0; extra == 'grading'
|
|
38
39
|
Requires-Dist: pyzbar>=0.1.9; extra == 'grading'
|
|
@@ -60,18 +61,24 @@ pip install QuizGenerator
|
|
|
60
61
|
### System Requirements
|
|
61
62
|
|
|
62
63
|
- Python 3.12+
|
|
63
|
-
-
|
|
64
|
-
- Optional:
|
|
64
|
+
- [Typst](https://typst.app/) (default PDF renderer)
|
|
65
|
+
- Optional: LaTeX distribution with `latexmk` (if using `--latex`)
|
|
66
|
+
- Recommended: [Pandoc](https://pandoc.org/) (for markdown conversion)
|
|
65
67
|
|
|
66
68
|
### Optional Dependencies
|
|
67
69
|
|
|
68
70
|
```bash
|
|
69
71
|
# For QR code grading support
|
|
70
72
|
pip install QuizGenerator[grading]
|
|
73
|
+
|
|
74
|
+
# For CST463 machine learning questions
|
|
75
|
+
pip install QuizGenerator[cst463]
|
|
71
76
|
```
|
|
72
77
|
|
|
73
78
|
## Quick Start
|
|
74
79
|
|
|
80
|
+
Need a 2‑minute setup? See `documentation/quickstart.md`.
|
|
81
|
+
|
|
75
82
|
### 1. Create a quiz configuration (YAML)
|
|
76
83
|
|
|
77
84
|
```yaml
|
|
@@ -94,7 +101,7 @@ questions:
|
|
|
94
101
|
### 2. Generate PDFs
|
|
95
102
|
|
|
96
103
|
```bash
|
|
97
|
-
|
|
104
|
+
quizgen --yaml my_quiz.yaml --num_pdfs 3
|
|
98
105
|
```
|
|
99
106
|
|
|
100
107
|
PDFs will be created in the `out/` directory.
|
|
@@ -106,8 +113,8 @@ PDFs will be created in the `out/` directory.
|
|
|
106
113
|
# CANVAS_API_URL=https://canvas.instructure.com
|
|
107
114
|
# CANVAS_API_KEY=your_api_key_here
|
|
108
115
|
|
|
109
|
-
|
|
110
|
-
--
|
|
116
|
+
quizgen \
|
|
117
|
+
--yaml my_quiz.yaml \
|
|
111
118
|
--num_canvas 5 \
|
|
112
119
|
--course_id 12345
|
|
113
120
|
```
|
|
@@ -150,26 +157,29 @@ All questions follow the same three‑method flow:
|
|
|
150
157
|
|
|
151
158
|
```python
|
|
152
159
|
class MyQuestion(Question):
|
|
153
|
-
|
|
160
|
+
@classmethod
|
|
161
|
+
def _build_context(cls, *, rng_seed=None, **kwargs):
|
|
154
162
|
context = super()._build_context(rng_seed=rng_seed, **kwargs)
|
|
155
|
-
rng = context
|
|
163
|
+
rng = context.rng
|
|
156
164
|
context["value"] = rng.randint(1, 10)
|
|
157
165
|
return context
|
|
158
166
|
|
|
159
|
-
|
|
167
|
+
@classmethod
|
|
168
|
+
def _build_body(cls, context):
|
|
160
169
|
body = ca.Section()
|
|
161
170
|
body.add_element(ca.Paragraph([f"Value: {context['value']}"]))
|
|
162
171
|
body.add_element(ca.AnswerTypes.Int(context["value"], label="Value"))
|
|
163
172
|
return body
|
|
164
173
|
|
|
165
|
-
|
|
174
|
+
@classmethod
|
|
175
|
+
def _build_explanation(cls, context):
|
|
166
176
|
explanation = ca.Section()
|
|
167
177
|
explanation.add_element(ca.Paragraph([f"Answer: {context['value']}"]))
|
|
168
178
|
return explanation
|
|
169
179
|
```
|
|
170
180
|
|
|
171
181
|
Notes:
|
|
172
|
-
- Always use `context["rng"]` for deterministic randomness.
|
|
182
|
+
- Always use `context.rng` (or `context["rng"]`) for deterministic randomness.
|
|
173
183
|
- Avoid `refresh()`; it is no longer part of the API.
|
|
174
184
|
|
|
175
185
|
## Built-in Question Types
|
|
@@ -191,10 +201,9 @@ Notes:
|
|
|
191
201
|
|
|
192
202
|
## Documentation
|
|
193
203
|
|
|
194
|
-
- [Getting Started Guide](documentation/getting_started.md)
|
|
204
|
+
- [Getting Started Guide](documentation/getting_started.md)
|
|
195
205
|
- [Custom Questions Guide](documentation/custom_questions.md)
|
|
196
|
-
- [YAML Configuration Reference](documentation/yaml_config_guide.md)
|
|
197
|
-
- [PyPI Release Plan](documentation/pypi_release_plan.md)
|
|
206
|
+
- [YAML Configuration Reference](documentation/yaml_config_guide.md)
|
|
198
207
|
|
|
199
208
|
## Canvas Setup
|
|
200
209
|
|
|
@@ -213,25 +222,28 @@ CANVAS_API_KEY_prod=your_prod_api_key
|
|
|
213
222
|
2. Use `--prod` flag for production Canvas instance:
|
|
214
223
|
|
|
215
224
|
```bash
|
|
216
|
-
|
|
225
|
+
quizgen --prod --num_canvas 5 --course_id 12345
|
|
217
226
|
```
|
|
218
227
|
|
|
219
228
|
## Advanced Features
|
|
220
229
|
|
|
221
230
|
### Typst Support
|
|
222
231
|
|
|
223
|
-
|
|
232
|
+
Typst is the default for faster compilation. Use `--latex` to force LaTeX:
|
|
224
233
|
|
|
225
234
|
```bash
|
|
226
|
-
|
|
235
|
+
quizgen --latex --num_pdfs 3
|
|
227
236
|
```
|
|
228
237
|
|
|
238
|
+
Experimental: `--typst_measurement` uses Typst to measure question height for tighter layout.
|
|
239
|
+
It can change pagination and ordering, so use with care on finalized exams.
|
|
240
|
+
|
|
229
241
|
### Deterministic Generation
|
|
230
242
|
|
|
231
243
|
Use seeds for reproducible quizzes:
|
|
232
244
|
|
|
233
245
|
```bash
|
|
234
|
-
|
|
246
|
+
quizgen --seed 42 --num_pdfs 3
|
|
235
247
|
```
|
|
236
248
|
|
|
237
249
|
### QR Code Regeneration
|
|
@@ -255,7 +267,7 @@ QuizGenerator/
|
|
|
255
267
|
│ └── canvas/ # Canvas LMS integration
|
|
256
268
|
├── example_files/ # Example quiz configurations
|
|
257
269
|
├── documentation/ # User guides
|
|
258
|
-
└──
|
|
270
|
+
└── quizgen # CLI entry point
|
|
259
271
|
```
|
|
260
272
|
|
|
261
273
|
## Contributing
|
|
@@ -1,21 +1,23 @@
|
|
|
1
|
+
QuizGenerator/README.md,sha256=4n16gKyhIAKRBX4VKlpfcK0pyUYJ6Ht08MUsnwgxrZo,145
|
|
1
2
|
QuizGenerator/__init__.py,sha256=8EV-k90A3PNC8Cm2-ZquwNyVyvnwW1gs6u-nGictyhs,840
|
|
2
3
|
QuizGenerator/__main__.py,sha256=Dd9w4R0Unm3RiXztvR4Y_g9-lkWp6FHg-4VN50JbKxU,151
|
|
3
4
|
QuizGenerator/constants.py,sha256=AO-UWwsWPLb1k2JW6KP8rl9fxTcdT0rW-6XC6zfnDOs,4386
|
|
4
|
-
QuizGenerator/contentast.py,sha256=
|
|
5
|
-
QuizGenerator/generate.py,sha256=
|
|
5
|
+
QuizGenerator/contentast.py,sha256=NY6Y9gWbdinXaVGdgwN61UBF2nz_L2urqr-IPfR6tV0,88475
|
|
6
|
+
QuizGenerator/generate.py,sha256=qKYT-7HLUS1WSViDDSuJOIb5RwsTT3BuoUUZkoqSSus,17363
|
|
7
|
+
QuizGenerator/logging.yaml,sha256=VJCdh26D8e_PNUs4McvvP1ojz9EVjQNifJzfhEk1Mbo,1114
|
|
6
8
|
QuizGenerator/misc.py,sha256=MXrguUhhdrWSV4Hqdl4G21ktowODu1AcKy6-5mvy3aI,454
|
|
7
|
-
QuizGenerator/mixins.py,sha256=
|
|
9
|
+
QuizGenerator/mixins.py,sha256=zXj2U94qNbIEusbwTnzRM1Z_zSybpvozWhveq-t5q2Q,15771
|
|
8
10
|
QuizGenerator/performance.py,sha256=CM3zLarJXN5Hfrl4-6JRBqD03j4BU1B2QW699HAr1Ds,7002
|
|
9
|
-
QuizGenerator/qrcode_generator.py,sha256=
|
|
10
|
-
QuizGenerator/question.py,sha256=
|
|
11
|
+
QuizGenerator/qrcode_generator.py,sha256=VMbAXFxJ_3KryqrgynCUPR5myeiu5CoroBfwwBsinCc,13386
|
|
12
|
+
QuizGenerator/question.py,sha256=BSopEaosCkJZ76etMv3Ue1zjzJpho-WnqS_8cQlZeac,38199
|
|
11
13
|
QuizGenerator/quiz.py,sha256=CEWy7FB7BZiK33s_wYs6MqGKDetc6htUaqvP3--2HzI,21621
|
|
12
|
-
QuizGenerator/regenerate.py,sha256=
|
|
14
|
+
QuizGenerator/regenerate.py,sha256=cDYZ9LwOSkX9P7W72O0c6RI8ORzS-DFnYhAdC5-7UrI,20375
|
|
13
15
|
QuizGenerator/typst_utils.py,sha256=JGQn_u5bEHd8HAtjAHuZoVJwLkx-Rd4ZCBWffwFZa3o,3136
|
|
14
16
|
QuizGenerator/canvas/__init__.py,sha256=TwFP_zgxPIlWtkvIqQ6mcvBNTL9swIH_rJl7DGKcvkQ,286
|
|
15
|
-
QuizGenerator/canvas/canvas_interface.py,sha256=
|
|
17
|
+
QuizGenerator/canvas/canvas_interface.py,sha256=5PS7sZeIwRuOGK9gXmfgP4eUYtgCqZ1JKD-S4mNvsbk,24798
|
|
16
18
|
QuizGenerator/canvas/classes.py,sha256=v_tQ8t_JJplU9sv2p4YctX45Fwed1nQ2HC1oC9BnDNw,7594
|
|
17
19
|
QuizGenerator/premade_questions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
18
|
-
QuizGenerator/premade_questions/basic.py,sha256=
|
|
20
|
+
QuizGenerator/premade_questions/basic.py,sha256=u6Viv__5HYWjLOknYt_jsBJTej5-cPd9FM1xsuwUQcQ,4613
|
|
19
21
|
QuizGenerator/premade_questions/cst334/__init__.py,sha256=BTz-Os1XbwIRKqAilf2UIva2NlY0DbA_XbSIggO2Tdk,36
|
|
20
22
|
QuizGenerator/premade_questions/cst334/languages.py,sha256=ctemEAMkI8C6ASMIf59EHAW1ndFWi7hXzdEt-zOByUE,14114
|
|
21
23
|
QuizGenerator/premade_questions/cst334/math_questions.py,sha256=aUYbQxneL5MXE7Xo3tZX9-xcg71CXwvG3rrxcoh0l7A,8638
|
|
@@ -25,26 +27,26 @@ QuizGenerator/premade_questions/cst334/persistence_questions.py,sha256=9mgsX-3oW
|
|
|
25
27
|
QuizGenerator/premade_questions/cst334/process.py,sha256=0SqXkvdxaEJZXJA8fBqheh7F0PL8I6xgO5a8u2s2po4,37238
|
|
26
28
|
QuizGenerator/premade_questions/cst463/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
27
29
|
QuizGenerator/premade_questions/cst463/gradient_descent/__init__.py,sha256=sH2CUV6zK9FT3jWTn453ys6_JTrUKRtZnU8hK6RmImU,240
|
|
28
|
-
QuizGenerator/premade_questions/cst463/gradient_descent/gradient_calculation.py,sha256=
|
|
29
|
-
QuizGenerator/premade_questions/cst463/gradient_descent/gradient_descent_questions.py,sha256=
|
|
30
|
-
QuizGenerator/premade_questions/cst463/gradient_descent/loss_calculations.py,sha256=
|
|
30
|
+
QuizGenerator/premade_questions/cst463/gradient_descent/gradient_calculation.py,sha256=y_R26wUt7AIZVUoe3e_qpzkPdwMyo3mZjxLI504-YQw,13840
|
|
31
|
+
QuizGenerator/premade_questions/cst463/gradient_descent/gradient_descent_questions.py,sha256=OssybIkHx4l8ryHGT9rqHUecta9qpItK4QYVHuuQLeo,11525
|
|
32
|
+
QuizGenerator/premade_questions/cst463/gradient_descent/loss_calculations.py,sha256=PMuEAUJmN12t4ffHF0FoSbQNCLDfW5BKozWNHvoC6GU,24276
|
|
31
33
|
QuizGenerator/premade_questions/cst463/gradient_descent/misc.py,sha256=0R-nFeD3zsqJyde5CXWrF6Npjmpx6_HbzfCbThLi3os,2657
|
|
32
34
|
QuizGenerator/premade_questions/cst463/math_and_data/__init__.py,sha256=EbIaUrx7_aK9j3Gd8Mk08h9GocTq_0OoNu2trfNwaU8,202
|
|
33
35
|
QuizGenerator/premade_questions/cst463/math_and_data/matrix_questions.py,sha256=4DLdo_8XDS_xtPA8R-wH4K0cKnMn4r5727Vszz8keTc,15565
|
|
34
36
|
QuizGenerator/premade_questions/cst463/math_and_data/vector_questions.py,sha256=VXQCLQEeNKxRDPn_fGW5nAPX-0betrZ8mURh0ElbNz0,12668
|
|
35
37
|
QuizGenerator/premade_questions/cst463/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
36
|
-
QuizGenerator/premade_questions/cst463/models/attention.py,sha256=
|
|
37
|
-
QuizGenerator/premade_questions/cst463/models/cnns.py,sha256=
|
|
38
|
+
QuizGenerator/premade_questions/cst463/models/attention.py,sha256=hb0sLVddxSKr4-bsIpAUyxITfcNaAGT-FppwwXXu52I,5430
|
|
39
|
+
QuizGenerator/premade_questions/cst463/models/cnns.py,sha256=p3hvQEsTsI2urPrZ-MZ63eIq0Dm6aarrLATVIiECc2A,6017
|
|
38
40
|
QuizGenerator/premade_questions/cst463/models/matrices.py,sha256=21eNXUcIjFNZTGH18oH-x3MbCa4buNGQGer3a5yL85c,1938
|
|
39
|
-
QuizGenerator/premade_questions/cst463/models/rnns.py,sha256=
|
|
40
|
-
QuizGenerator/premade_questions/cst463/models/text.py,sha256=
|
|
41
|
-
QuizGenerator/premade_questions/cst463/models/weight_counting.py,sha256=
|
|
41
|
+
QuizGenerator/premade_questions/cst463/models/rnns.py,sha256=9pPzkrNviKD479NVgVvkoMhXtaLX0m17IIGpYKXXAwk,6660
|
|
42
|
+
QuizGenerator/premade_questions/cst463/models/text.py,sha256=j6ClSF4AztgFWyvuhjBCW5mKvQL1AdizfhpF3iCjtt4,6592
|
|
43
|
+
QuizGenerator/premade_questions/cst463/models/weight_counting.py,sha256=NriO0cukIw3HKYkm62p4PPm1qdH9wmDepEfoBzrmxR4,7402
|
|
42
44
|
QuizGenerator/premade_questions/cst463/neural-network-basics/__init__.py,sha256=pmyCezO-20AFEQC6MR7KnAsaU9TcgZYsGQOMVkRZ-U8,149
|
|
43
|
-
QuizGenerator/premade_questions/cst463/neural-network-basics/neural_network_questions.py,sha256=
|
|
45
|
+
QuizGenerator/premade_questions/cst463/neural-network-basics/neural_network_questions.py,sha256=j2f5LFmme-2rSgJzcb8nZJ1_hnZaL-S4lXSnIbpoH_E,43010
|
|
44
46
|
QuizGenerator/premade_questions/cst463/tensorflow-intro/__init__.py,sha256=G1gEHtG4KakYgi8ZXSYYhX6bQRtnm2tZVGx36d63Nmo,173
|
|
45
|
-
QuizGenerator/premade_questions/cst463/tensorflow-intro/tensorflow_questions.py,sha256=
|
|
46
|
-
quizgenerator-0.
|
|
47
|
-
quizgenerator-0.
|
|
48
|
-
quizgenerator-0.
|
|
49
|
-
quizgenerator-0.
|
|
50
|
-
quizgenerator-0.
|
|
47
|
+
QuizGenerator/premade_questions/cst463/tensorflow-intro/tensorflow_questions.py,sha256=t0ghv6o8AsZaIwVHFu07Ozebwuv6Rf18D3g_-Jz4O74,31309
|
|
48
|
+
quizgenerator-0.10.0.dist-info/METADATA,sha256=zxcZ0akBMSH9jjA-sdpO55tZUlN4pfeSpIqFs9m864M,8483
|
|
49
|
+
quizgenerator-0.10.0.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
50
|
+
quizgenerator-0.10.0.dist-info/entry_points.txt,sha256=aOIdRdw26xY8HkxOoKHBnUPe2mwGv5Ti3U1zojb6zxQ,98
|
|
51
|
+
quizgenerator-0.10.0.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
|
52
|
+
quizgenerator-0.10.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|