ygrader 2.6.2__tar.gz → 2.6.3__tar.gz

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 (24) hide show
  1. {ygrader-2.6.2/ygrader.egg-info → ygrader-2.6.3}/PKG-INFO +1 -1
  2. {ygrader-2.6.2 → ygrader-2.6.3}/setup.py +1 -1
  3. {ygrader-2.6.2 → ygrader-2.6.3}/ygrader/deductions.py +3 -1
  4. {ygrader-2.6.2 → ygrader-2.6.3}/ygrader/grading_item.py +5 -0
  5. {ygrader-2.6.2 → ygrader-2.6.3/ygrader.egg-info}/PKG-INFO +1 -1
  6. {ygrader-2.6.2 → ygrader-2.6.3}/LICENSE +0 -0
  7. {ygrader-2.6.2 → ygrader-2.6.3}/setup.cfg +0 -0
  8. {ygrader-2.6.2 → ygrader-2.6.3}/test/test_interactive.py +0 -0
  9. {ygrader-2.6.2 → ygrader-2.6.3}/test/test_unittest.py +0 -0
  10. {ygrader-2.6.2 → ygrader-2.6.3}/ygrader/__init__.py +0 -0
  11. {ygrader-2.6.2 → ygrader-2.6.3}/ygrader/feedback.py +0 -0
  12. {ygrader-2.6.2 → ygrader-2.6.3}/ygrader/grader.py +0 -0
  13. {ygrader-2.6.2 → ygrader-2.6.3}/ygrader/grades_csv.py +0 -0
  14. {ygrader-2.6.2 → ygrader-2.6.3}/ygrader/grading_item_config.py +0 -0
  15. {ygrader-2.6.2 → ygrader-2.6.3}/ygrader/remote.py +0 -0
  16. {ygrader-2.6.2 → ygrader-2.6.3}/ygrader/score_input.py +0 -0
  17. {ygrader-2.6.2 → ygrader-2.6.3}/ygrader/send_ctrl_backtick.ahk +0 -0
  18. {ygrader-2.6.2 → ygrader-2.6.3}/ygrader/student_repos.py +0 -0
  19. {ygrader-2.6.2 → ygrader-2.6.3}/ygrader/upstream_merger.py +0 -0
  20. {ygrader-2.6.2 → ygrader-2.6.3}/ygrader/utils.py +0 -0
  21. {ygrader-2.6.2 → ygrader-2.6.3}/ygrader.egg-info/SOURCES.txt +0 -0
  22. {ygrader-2.6.2 → ygrader-2.6.3}/ygrader.egg-info/dependency_links.txt +0 -0
  23. {ygrader-2.6.2 → ygrader-2.6.3}/ygrader.egg-info/requires.txt +0 -0
  24. {ygrader-2.6.2 → ygrader-2.6.3}/ygrader.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ygrader
3
- Version: 2.6.2
3
+ Version: 2.6.3
4
4
  Summary: Grading scripts used in BYU's Electrical and Computer Engineering Department
5
5
  Home-page: https://github.com/byu-cpe/ygrader
6
6
  Author: Jeff Goeders
@@ -4,7 +4,7 @@ setup(
4
4
  name="ygrader",
5
5
  packages=["ygrader"],
6
6
  package_data={"ygrader": ["*.ahk"]},
7
- version="2.6.2",
7
+ version="2.6.3",
8
8
  description="Grading scripts used in BYU's Electrical and Computer Engineering Department",
9
9
  author="Jeff Goeders",
10
10
  author_email="jeff.goeders@gmail.com",
@@ -178,11 +178,13 @@ class StudentDeductions:
178
178
 
179
179
  Args:
180
180
  message: The deduction message/description
181
- points: Points to deduct (can be negative for bonus points)
181
+ points: Points to deduct (must be non-negative)
182
182
 
183
183
  Returns:
184
184
  The ID assigned to this deduction type
185
185
  """
186
+ if points < 0:
187
+ raise ValueError(f"Deduction points must be non-negative, got {points}")
186
188
  # Find the next available ID (start at 1, reserve 0 for clear command)
187
189
  if self.deduction_types:
188
190
  next_id = max(self.deduction_types.keys()) + 1
@@ -211,6 +211,11 @@ class GradeItem:
211
211
  # Callback returned deductions to apply automatically
212
212
  if isinstance(callback_result, list):
213
213
  for deduction_desc, deduction_points in callback_result:
214
+ if deduction_points < 0:
215
+ raise ValueError(
216
+ f"Deduction points must be non-negative, got {deduction_points} "
217
+ f"for '{deduction_desc}'"
218
+ )
214
219
  # Find or create the deduction type
215
220
  deduction_id = (
216
221
  self.student_deductions.find_or_create_deduction_type(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ygrader
3
- Version: 2.6.2
3
+ Version: 2.6.3
4
4
  Summary: Grading scripts used in BYU's Electrical and Computer Engineering Department
5
5
  Home-page: https://github.com/byu-cpe/ygrader
6
6
  Author: Jeff Goeders
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes