dlai-grader 1.21.1__py3-none-any.whl → 1.21.2__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.
Potentially problematic release.
This version of dlai-grader might be problematic. Click here for more details.
- dlai_grader/__init__.py +1 -1
- dlai_grader/compiler.py +9 -6
- dlai_grader/templates.py +2 -3
- {dlai_grader-1.21.1.dist-info → dlai_grader-1.21.2.dist-info}/METADATA +1 -1
- {dlai_grader-1.21.1.dist-info → dlai_grader-1.21.2.dist-info}/RECORD +9 -9
- {dlai_grader-1.21.1.dist-info → dlai_grader-1.21.2.dist-info}/LICENSE +0 -0
- {dlai_grader-1.21.1.dist-info → dlai_grader-1.21.2.dist-info}/WHEEL +0 -0
- {dlai_grader-1.21.1.dist-info → dlai_grader-1.21.2.dist-info}/entry_points.txt +0 -0
- {dlai_grader-1.21.1.dist-info → dlai_grader-1.21.2.dist-info}/top_level.txt +0 -0
dlai_grader/__init__.py
CHANGED
dlai_grader/compiler.py
CHANGED
|
@@ -41,6 +41,7 @@ def compile_partial_module(
|
|
|
41
41
|
module_name: str,
|
|
42
42
|
verbose: bool = True,
|
|
43
43
|
exit_on_error: bool = False,
|
|
44
|
+
debug_mode: bool = False,
|
|
44
45
|
) -> ModuleType:
|
|
45
46
|
"""Iterates over the code cells of a notebook and includes the ones that run to the compiled module.
|
|
46
47
|
Args:
|
|
@@ -62,14 +63,16 @@ def compile_partial_module(
|
|
|
62
63
|
|
|
63
64
|
except Exception as e:
|
|
64
65
|
if exit_on_error:
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
66
|
+
if debug_mode:
|
|
67
|
+
print(
|
|
68
|
+
f"Error during execution of cell. Aborting full compilation.\n\nContents:\n\n{cell_code}\n\nException:\n\n{e}\n"
|
|
69
|
+
)
|
|
68
70
|
break
|
|
69
71
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
72
|
+
if debug_mode:
|
|
73
|
+
print(
|
|
74
|
+
f"Error during execution of cell but kept going.\n\nContents:\n\n{cell_code}\n\nException:\n\n{e}\n"
|
|
75
|
+
)
|
|
73
76
|
continue
|
|
74
77
|
|
|
75
78
|
return module
|
dlai_grader/templates.py
CHANGED
|
@@ -218,8 +218,7 @@ def load_templates() -> Dict[str, str]:
|
|
|
218
218
|
for t in transformations:
|
|
219
219
|
solution_nb = t(solution_nb)
|
|
220
220
|
|
|
221
|
-
|
|
222
|
-
solution_mod = compile_module(solution_script, "solution_mod", verbose=False)
|
|
221
|
+
solution_mod = compile_partial_module(solution_nb, "solution_mod", verbose=False)
|
|
223
222
|
|
|
224
223
|
g_func = handle_part_id(c.part_id)(learner_mod, solution_mod)
|
|
225
224
|
|
|
@@ -239,7 +238,7 @@ def load_templates() -> Dict[str, str]:
|
|
|
239
238
|
|
|
240
239
|
send_feedback(
|
|
241
240
|
0.0,
|
|
242
|
-
f"Object required for grading not found. If you haven't completed the exercise this is expected. Otherwise, check your solution as grader omits cells that throw errors
|
|
241
|
+
f"Object required for grading not found. If you haven't completed the exercise this is expected. Otherwise, check your solution as grader omits cells that throw errors.\\n{additional_msg}",
|
|
243
242
|
err=True,
|
|
244
243
|
)
|
|
245
244
|
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
dlai_grader/__init__.py,sha256=
|
|
1
|
+
dlai_grader/__init__.py,sha256=bjklEpR9B8-lHDwGGHlmv-prwjuze-EG437Nq5X7ydE,211
|
|
2
2
|
dlai_grader/cli.py,sha256=NIwboE-AFn1LXOFmF4O70Ow0fkRxgclG_eMwmWiua38,4917
|
|
3
|
-
dlai_grader/compiler.py,sha256=
|
|
3
|
+
dlai_grader/compiler.py,sha256=ob-gIzTcqVVwER55H-gNdZogNxW50ETCguiuy3oNPps,2833
|
|
4
4
|
dlai_grader/config.py,sha256=HQ3dzaFpRswIA_7EC8XdP8DdJH-XePsbMQMHG8Esblc,1638
|
|
5
5
|
dlai_grader/grading.py,sha256=Gmft9b7M8At_y_WZDatYdW6tinZMfqQoT7bDXp6uz2I,4606
|
|
6
6
|
dlai_grader/io.py,sha256=TB9d01AK5FIbFUQwM8AqOOfuMWzjzrit98i3MhK5AqU,8234
|
|
7
7
|
dlai_grader/notebook.py,sha256=noMU6DzPVylSjkHmSBUcmquVvAz4JigbRtbQrVYJdic,11830
|
|
8
8
|
dlai_grader/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
9
|
-
dlai_grader/templates.py,sha256=
|
|
9
|
+
dlai_grader/templates.py,sha256=JDDPoFm13pqRIOwSpt5kXXtMUM7jOv2Uyz1ap8KWu4I,7850
|
|
10
10
|
dlai_grader/types.py,sha256=_IIVbYL9cMmwA6in0aI5fEWCIaAMNcQbxG64X1P1CkE,335
|
|
11
|
-
dlai_grader-1.21.
|
|
12
|
-
dlai_grader-1.21.
|
|
13
|
-
dlai_grader-1.21.
|
|
14
|
-
dlai_grader-1.21.
|
|
15
|
-
dlai_grader-1.21.
|
|
16
|
-
dlai_grader-1.21.
|
|
11
|
+
dlai_grader-1.21.2.dist-info/LICENSE,sha256=a_kch_UqdJPtyxk35QJr9O84K_koPixqWPYW9On4-io,1072
|
|
12
|
+
dlai_grader-1.21.2.dist-info/METADATA,sha256=FIVXvgMev0R7OQkB-A1gFOufJ4O5iypU_f2ue-Q4KTo,8618
|
|
13
|
+
dlai_grader-1.21.2.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
|
|
14
|
+
dlai_grader-1.21.2.dist-info/entry_points.txt,sha256=4OcSAUIluONXa3ymViQ7CBQ2Lk52nb6xZnfph1rlMnk,71
|
|
15
|
+
dlai_grader-1.21.2.dist-info/top_level.txt,sha256=4YKtA3ztisFtx_g4hsGivy3J2NHnXxFziIMqawC8HWg,12
|
|
16
|
+
dlai_grader-1.21.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|