PyKubeGrader 0.1.14__py3-none-any.whl → 0.1.16__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- {PyKubeGrader-0.1.14.dist-info → PyKubeGrader-0.1.16.dist-info}/METADATA +1 -1
- {PyKubeGrader-0.1.14.dist-info → PyKubeGrader-0.1.16.dist-info}/RECORD +10 -10
- pykubegrader/build/build_folder.py +1 -1
- pykubegrader/initialize.py +1 -0
- pykubegrader/widgets_base/multi_select.py +12 -1
- pykubegrader/widgets_base/select.py +3 -12
- {PyKubeGrader-0.1.14.dist-info → PyKubeGrader-0.1.16.dist-info}/LICENSE.txt +0 -0
- {PyKubeGrader-0.1.14.dist-info → PyKubeGrader-0.1.16.dist-info}/WHEEL +0 -0
- {PyKubeGrader-0.1.14.dist-info → PyKubeGrader-0.1.16.dist-info}/entry_points.txt +0 -0
- {PyKubeGrader-0.1.14.dist-info → PyKubeGrader-0.1.16.dist-info}/top_level.txt +0 -0
@@ -1,10 +1,10 @@
|
|
1
1
|
pykubegrader/__init__.py,sha256=AoAkdfIjDDZGWLlsIRENNq06L9h46kDGBIE8vRmsCfg,311
|
2
|
-
pykubegrader/initialize.py,sha256=
|
2
|
+
pykubegrader/initialize.py,sha256=UQ828VrueLOgrzJsYqWeQe6k0J6OWuX8AnojdU1eqFg,3167
|
3
3
|
pykubegrader/telemetry.py,sha256=-74wZq69W5CkD-Ous8hUnox8temjUOz1LMj3qfElOFM,4900
|
4
4
|
pykubegrader/utils.py,sha256=dKw6SyRYU3DWRgD3xER7wq-C9e1daWPkqr901LpcwiQ,642
|
5
5
|
pykubegrader/validate.py,sha256=vEdNN386yFloDRcjMDrTAqfBmeCXGcDPNH_rLZScIm8,10945
|
6
6
|
pykubegrader/build/api_notebook_builder.py,sha256=GVi6hupfQaWeFMv6Bdela3FTRHvOQYXPIcICnkaLhgA,20119
|
7
|
-
pykubegrader/build/build_folder.py,sha256=
|
7
|
+
pykubegrader/build/build_folder.py,sha256=S9TMzGwlsp9LU8DkEPmIt59u1c7qfM3VCdk_dDFBJA0,66298
|
8
8
|
pykubegrader/log_parser/parse.ipynb,sha256=F3ZWi5_AOxEnSihY0VBz4jjqo0__GggjRgFvS0QCHTg,10611
|
9
9
|
pykubegrader/log_parser/parse.py,sha256=aON6tWj0dFJcYR9GmzXWfmZ4_t8LU1FTq6vbWCePgRs,6987
|
10
10
|
pykubegrader/widgets/__init__.py,sha256=s3ky3eJDa1RedFVdpKxmqv6mHBYpOSL9Z6qThSH9cbs,303
|
@@ -16,12 +16,12 @@ pykubegrader/widgets/style.py,sha256=fVBMYy_a6Yoz21avNpiORWC3f5FD-OrVpaZ3npmunvs
|
|
16
16
|
pykubegrader/widgets/true_false.py,sha256=pE2FjvX6WQ-Z423N40nTWMtudtGS7LiNXZ5dERk6uWs,2823
|
17
17
|
pykubegrader/widgets/types_question.py,sha256=kZdRRXyFzOtYTmGdC7XWb_2oaxqg1WSuLcQn_sTj6Qc,2300
|
18
18
|
pykubegrader/widgets_base/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
19
|
-
pykubegrader/widgets_base/multi_select.py,sha256=
|
19
|
+
pykubegrader/widgets_base/multi_select.py,sha256=jzuK_1eLyhDOzR1jragLRBf_aO8IEaoixfozxBeMBs0,3975
|
20
20
|
pykubegrader/widgets_base/reading.py,sha256=4uTLmlPzCwxVzufFhPjM7W19uMGguRb6y4eAV3x-zAc,5314
|
21
|
-
pykubegrader/widgets_base/select.py,sha256=
|
22
|
-
PyKubeGrader-0.1.
|
23
|
-
PyKubeGrader-0.1.
|
24
|
-
PyKubeGrader-0.1.
|
25
|
-
PyKubeGrader-0.1.
|
26
|
-
PyKubeGrader-0.1.
|
27
|
-
PyKubeGrader-0.1.
|
21
|
+
pykubegrader/widgets_base/select.py,sha256=b5mmd-Cl1A2T2ePZ20-KLVyvP3bzvzYX36n3lMcrcFM,2456
|
22
|
+
PyKubeGrader-0.1.16.dist-info/LICENSE.txt,sha256=YTp-Ewc8Kems8PJEE27KnBPFnZSxoWvSg7nnknzPyYw,1546
|
23
|
+
PyKubeGrader-0.1.16.dist-info/METADATA,sha256=5kikimBqB4JnKir0KV8dhIcCx5ivOJQKG0mbSf425vI,2665
|
24
|
+
PyKubeGrader-0.1.16.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
25
|
+
PyKubeGrader-0.1.16.dist-info/entry_points.txt,sha256=Kd4Bh-i3hc4qlnLU1p0nc8yPw9cC5AQGOtkk2eLGnQw,78
|
26
|
+
PyKubeGrader-0.1.16.dist-info/top_level.txt,sha256=e550Klfze6higFxER1V62fnGOcIgiKRbsrl9CC4UdtQ,13
|
27
|
+
PyKubeGrader-0.1.16.dist-info/RECORD,,
|
@@ -729,7 +729,7 @@ class NotebookProcessor:
|
|
729
729
|
# Write updated total_points and solutions back to the file
|
730
730
|
with open(output_file, "w", encoding="utf-8") as f:
|
731
731
|
f.write("from typing import Any\n\n")
|
732
|
-
f.write(f"total_points: float = {total_points}\n\n")
|
732
|
+
f.write(f"total_points: list[float] = {total_points}\n\n")
|
733
733
|
|
734
734
|
f.write("solutions: dict[str, Any] = {\n")
|
735
735
|
for key, solution in solutions.items():
|
pykubegrader/initialize.py
CHANGED
@@ -50,6 +50,7 @@ def initialize_assignment(
|
|
50
50
|
update_responses(key="assignment", value=name)
|
51
51
|
update_responses(key="jhub_user", value=jhub_user)
|
52
52
|
|
53
|
+
# TODO: Check whether this is called correctly
|
53
54
|
log_variable("Student Info", jhub_user, seed)
|
54
55
|
|
55
56
|
responses = ensure_responses()
|
@@ -34,6 +34,8 @@ class MultiSelectQuestion:
|
|
34
34
|
self.question_number = question_number
|
35
35
|
self.style = style
|
36
36
|
|
37
|
+
self.true_keys = keys # Debugging; update later
|
38
|
+
|
37
39
|
flat_index = 0
|
38
40
|
self.keys: list[str] = []
|
39
41
|
for i, _ in enumerate(keys):
|
@@ -79,9 +81,11 @@ class MultiSelectQuestion:
|
|
79
81
|
def submit(self, _) -> None:
|
80
82
|
responses_flat: list[bool] = []
|
81
83
|
self.responses_nested: list[list[bool]] = []
|
84
|
+
self.names_nested: list[list[str]] = [] # Debugging; update later
|
82
85
|
|
83
86
|
for row in self.widgets:
|
84
|
-
next_selections = []
|
87
|
+
next_selections: list[bool] = []
|
88
|
+
next_names: list[str] = [] # Debugging; update later
|
85
89
|
|
86
90
|
for widget in row.objects:
|
87
91
|
# Skip HTML widgets
|
@@ -90,10 +94,13 @@ class MultiSelectQuestion:
|
|
90
94
|
|
91
95
|
if isinstance(widget, pn.widgets.Checkbox):
|
92
96
|
next_selections.append(widget.value)
|
97
|
+
if widget.value:
|
98
|
+
next_names.append(widget.name) # Debugging; update later
|
93
99
|
responses_flat.append(widget.value) # For flat list of responses
|
94
100
|
|
95
101
|
# Append all responses for this widget at once, forming a list of lists
|
96
102
|
self.responses_nested.append(next_selections)
|
103
|
+
self.names_nested.append(next_names) # Debugging; update later
|
97
104
|
|
98
105
|
self.record_responses(responses_flat)
|
99
106
|
|
@@ -101,6 +108,10 @@ class MultiSelectQuestion:
|
|
101
108
|
for key, value in zip(self.keys, responses_flat):
|
102
109
|
update_responses(key, value)
|
103
110
|
|
111
|
+
# Debugging; update later
|
112
|
+
for k, v in zip(self.true_keys, self.names_nested):
|
113
|
+
update_responses(k, v)
|
114
|
+
|
104
115
|
self.submit_button.name = "Responses Submitted"
|
105
116
|
time.sleep(1)
|
106
117
|
self.submit_button.name = "Submit"
|
@@ -7,7 +7,7 @@ from ..telemetry import ensure_responses, update_responses
|
|
7
7
|
from ..utils import shuffle_questions
|
8
8
|
from ..widgets.style import drexel_colors
|
9
9
|
|
10
|
-
# Pass
|
10
|
+
# Pass custom CSS to Panel
|
11
11
|
pn.extension(design="material", global_css=[drexel_colors])
|
12
12
|
|
13
13
|
|
@@ -39,7 +39,7 @@ class SelectQuestion:
|
|
39
39
|
"You must submit your student info before starting the exam"
|
40
40
|
)
|
41
41
|
|
42
|
-
# Dynamically
|
42
|
+
# Dynamically assign attributes based on keys, with default values from responses
|
43
43
|
for key in self.keys:
|
44
44
|
setattr(self, key, responses.get(key, None))
|
45
45
|
|
@@ -71,19 +71,10 @@ class SelectQuestion:
|
|
71
71
|
for key, value in selections.items():
|
72
72
|
update_responses(key, value)
|
73
73
|
|
74
|
+
# Temporarily change button text to indicate submission
|
74
75
|
self.submit_button.name = "Responses Submitted"
|
75
76
|
time.sleep(1)
|
76
77
|
self.submit_button.name = "Submit"
|
77
78
|
|
78
|
-
# # Display the message with a unique display_id
|
79
|
-
# display_id = "temp_message"
|
80
|
-
# display("Responses recorded successfully", display_id=display_id)
|
81
|
-
|
82
|
-
# # Wait for 1 second
|
83
|
-
# time.sleep(1)
|
84
|
-
|
85
|
-
# # Update the display with an empty string to clear it
|
86
|
-
# update_display('', display_id=display_id)
|
87
|
-
|
88
79
|
def show(self):
|
89
80
|
return self.layout
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|