PyKubeGrader 0.1.15__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: PyKubeGrader
3
- Version: 0.1.15
3
+ Version: 0.1.16
4
4
  Summary: Add a short description here!
5
5
  Home-page: https://github.com/pyscaffold/pyscaffold/
6
6
  Author: jagar2
@@ -1,5 +1,5 @@
1
1
  pykubegrader/__init__.py,sha256=AoAkdfIjDDZGWLlsIRENNq06L9h46kDGBIE8vRmsCfg,311
2
- pykubegrader/initialize.py,sha256=_PuzOs4p3qQYgZtZ5MSs6qITIvTSw26yNa24bbkQR-4,3112
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
@@ -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=u50IOhYxC_S_gq31VnFPLdbNajk_SUWhaqlMSJxhqVQ,3439
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=h1S5StcbX8S-Wiyga4fVDhPbVvRxffwaqyVbiiuInRs,2743
22
- PyKubeGrader-0.1.15.dist-info/LICENSE.txt,sha256=YTp-Ewc8Kems8PJEE27KnBPFnZSxoWvSg7nnknzPyYw,1546
23
- PyKubeGrader-0.1.15.dist-info/METADATA,sha256=3DJfL95kKRkM9_5ibnwBkaOM9FbMequnthLBMBVwW84,2665
24
- PyKubeGrader-0.1.15.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
25
- PyKubeGrader-0.1.15.dist-info/entry_points.txt,sha256=Kd4Bh-i3hc4qlnLU1p0nc8yPw9cC5AQGOtkk2eLGnQw,78
26
- PyKubeGrader-0.1.15.dist-info/top_level.txt,sha256=e550Klfze6higFxER1V62fnGOcIgiKRbsrl9CC4UdtQ,13
27
- PyKubeGrader-0.1.15.dist-info/RECORD,,
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,,
@@ -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 the custom CSS to Panel
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 assigning attributes based on keys, with default values from responses
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