otter-service-stdalone 1.1.26__py3-none-any.whl → 1.1.27__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.
@@ -1 +1 @@
1
- __version__ = "1.1.26"
1
+ __version__ = "1.1.27"
@@ -256,7 +256,7 @@ class Upload(BaseHandler):
256
256
  if autograder is not None and notebooks is not None:
257
257
  log.write_logs(results_path, "Step 1: Upload accepted", "", "debug", log_debug)
258
258
  notebooks_fname = notebooks['filename']
259
- sanitized_filename = re.sub(r"[ ,./\\\[\]{}()]]", "", os.path.splitext(notebooks_fname)[0])
259
+ sanitized_filename = re.sub(r"[ ,./\\\[\]{}()]", "", os.path.splitext(notebooks_fname)[0])
260
260
  results_path = f"{sanitized_filename}-{results_path}"
261
261
  notebooks_extn = os.path.splitext(notebooks_fname)[1]
262
262
  if notebooks_extn == ".zip":
@@ -281,12 +281,14 @@ class Upload(BaseHandler):
281
281
  m = "Step 3A: Uploaded autograder.zip files written to disk - now checking otter version"
282
282
  log.write_logs(results_path, m, f"Results Code: {results_path}", "debug", log_debug)
283
283
  if not otter_version_correct(auto_p):
284
- m = "Step 3A-1: autograder.zip is wrong version of otter-grader; must be >= 6.0.4"
284
+ m = "Step 3A-1: autograder.zip is made with the wrong version of otter-grader; must be >="
285
+ m += os.environ.get("TARGET_OTTER_VERSION")
285
286
  log.write_logs(results_path, m, f"Results Code: {results_path}", "debug", log_debug)
286
287
  m = "If you are teaching Data 8, please get the latest autograder.zips from materials-sp22-private. "
287
288
  m += "If you are NOT teaching Berkeley's Data 8, you need to make sure the autograder.zip uses "
288
- m += "otter-grader version >=6.0.4; due to breaking changes in "
289
- m += "otter-grader dependencies you need to run otter assign with otter-grader >= 6.0.4 to generate working "
289
+ m += f"otter-grader version >={os.environ.get('TARGET_OTTER_VERSION')}; due to breaking changes in "
290
+ m += "otter-grader dependencies you need to run otter assign with "
291
+ m += f"otter-grader >={os.environ.get('TARGET_OTTER_VERSION')} to generate working "
290
292
  m += "solution files(autograder.zips)."
291
293
  self.render("index.html", message=m)
292
294
  else:
@@ -1,5 +1,7 @@
1
1
  import re
2
2
  import zipfile
3
+ from packaging import version
4
+ import os
3
5
 
4
6
 
5
7
  def is_version_6_or_greater(zip_ref, target_file, reg):
@@ -8,10 +10,13 @@ def is_version_6_or_greater(zip_ref, target_file, reg):
8
10
  content = file.read().decode('utf-8')
9
11
  match = reg.search(content)
10
12
  if match:
11
- version = match.group(2)
12
- version_nums = version.split(".")
13
- if len(version_nums) >= 3 and int(version_nums[0]) >= 6 and int(version_nums[2]) >= 4:
14
- return True
13
+ version_str = match.group(2)
14
+ try:
15
+ current_ver = version.parse(version_str)
16
+ target_ver = version.parse(os.environ.get("TARGET_OTTER_VERSION"))
17
+ return current_ver >= target_ver
18
+ except Exception:
19
+ pass
15
20
  return False
16
21
 
17
22
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: otter_service_stdalone
3
- Version: 1.1.26
3
+ Version: 1.1.27
4
4
  Summary: Grading Service for Instructors using Otter Grader
5
5
  Home-page: https://github.com/sean-morris/otter-service-stdalone
6
6
  Author: Sean Morris
@@ -1,12 +1,12 @@
1
- otter_service_stdalone/__init__.py,sha256=nMFQZEWuqinhLfp5WtJf8zuYSjLowSMbH7-9OyiH_eA,23
1
+ otter_service_stdalone/__init__.py,sha256=Ic1q5iNlYFlxryUNn49tIjp1KtV-8DMqDsPQHB0fNtY,23
2
2
  otter_service_stdalone/access_sops_keys.py,sha256=nboU5aZ84Elrm5vO0dMgpIF5LLcnecpNAwpxKvj6DvU,2129
3
- otter_service_stdalone/app.py,sha256=tPg2CVbzDWDksPkKUWD_ixKjsDp3KPNGbnnwXDYl0a8,16082
3
+ otter_service_stdalone/app.py,sha256=MALn80A-zWUw2QfWQG7kll7gSZIsnvISKDb6zRRYVrs,16244
4
4
  otter_service_stdalone/fs_logging.py,sha256=IKFZkc5TmpI6G3vTYFAU9jDjQ-GT5aRxk8kdZ0h0kJE,2390
5
5
  otter_service_stdalone/grade_notebooks.py,sha256=x19MK_ResW-xM3mdwEUALsdsCiX4I1OHmODUHodcIow,3817
6
6
  otter_service_stdalone/index.html,sha256=eEbFGxbV-plE5bAggGYHTv1q7yqoTN4kJbzL729uMmk,7276
7
7
  otter_service_stdalone/upload_handle.py,sha256=PbpQEyUIPKercJ9hegKwvxHBvSc9uylhIfwjvHybjs0,5061
8
8
  otter_service_stdalone/user_auth.py,sha256=L9Kfj1BsQttAteHhRn71IUY8WX9nvBy3MXVGq1yjTtE,4253
9
- otter_service_stdalone/util.py,sha256=O8NKOFZiS2cg6feHlPjMCumFqnfshwC7nyyJ-T-RIAo,1404
9
+ otter_service_stdalone/util.py,sha256=HtPmi0vEi2v7CZft3GYfpppbkd8UOb_IMubUplpTWi8,1544
10
10
  otter_service_stdalone/scripts/web_socket.js,sha256=0h71SNvaD7WNQ735KvuqAPsLYvqHyxzUbLWMu-8qYds,6348
11
11
  otter_service_stdalone/secrets/gh_key.dev.yaml,sha256=ORUVDu8SDcv0OE2ThwROppeg7y8oLkJJbPTCMn0s5l0,1138
12
12
  otter_service_stdalone/secrets/gh_key.local.yaml,sha256=NtPXXyGf1iSgJ9Oa2ahvIEf_fcmflB3dwd3LWyCgxis,1138
@@ -15,8 +15,8 @@ otter_service_stdalone/secrets/gh_key.staging.yaml,sha256=cKVqj4dcwuz2LhXwMNQy_1
15
15
  otter_service_stdalone/static_files/README_DO_NOT_DISTRIBUTE.txt,sha256=eMqBa1du1u0c07fuG3Eu9DDHuixRTFEbiQwrlvAnL1Y,353
16
16
  otter_service_stdalone/static_templates/403.html,sha256=7eO3XQsEkl4nF8PEeFkLwCzGBfdZ3kkkeu_Kgpgbh0k,1440
17
17
  otter_service_stdalone/static_templates/500.html,sha256=t6DeEMp8piSWyBToHb_JpTrw3GStAHFrozlmeuXyamg,1421
18
- otter_service_stdalone-1.1.26.dist-info/METADATA,sha256=Xsuq_QlfZv3rkxO8g6TbvkrUDxOcs_DX2JSeC1lp2L8,1468
19
- otter_service_stdalone-1.1.26.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
20
- otter_service_stdalone-1.1.26.dist-info/entry_points.txt,sha256=cx447chuIEl8ly9jEoF5-2xNhaKsWcIMDdhUMH_00qQ,75
21
- otter_service_stdalone-1.1.26.dist-info/top_level.txt,sha256=6UP22fD4OhbLt23E01v8Kvjn44vPRbyTIg_GqMYL-Ng,23
22
- otter_service_stdalone-1.1.26.dist-info/RECORD,,
18
+ otter_service_stdalone-1.1.27.dist-info/METADATA,sha256=pP3hdyM-IOBCq_s3rJbvqWB_1lB3NqXFfEWNmOnhE8c,1468
19
+ otter_service_stdalone-1.1.27.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
20
+ otter_service_stdalone-1.1.27.dist-info/entry_points.txt,sha256=cx447chuIEl8ly9jEoF5-2xNhaKsWcIMDdhUMH_00qQ,75
21
+ otter_service_stdalone-1.1.27.dist-info/top_level.txt,sha256=6UP22fD4OhbLt23E01v8Kvjn44vPRbyTIg_GqMYL-Ng,23
22
+ otter_service_stdalone-1.1.27.dist-info/RECORD,,