otter-service-stdalone 1.1.23__py3-none-any.whl → 1.1.25__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.
- otter_service_stdalone/__init__.py +1 -1
- otter_service_stdalone/app.py +6 -4
- {otter_service_stdalone-1.1.23.dist-info → otter_service_stdalone-1.1.25.dist-info}/METADATA +2 -2
- {otter_service_stdalone-1.1.23.dist-info → otter_service_stdalone-1.1.25.dist-info}/RECORD +7 -7
- {otter_service_stdalone-1.1.23.dist-info → otter_service_stdalone-1.1.25.dist-info}/WHEEL +1 -1
- {otter_service_stdalone-1.1.23.dist-info → otter_service_stdalone-1.1.25.dist-info}/entry_points.txt +0 -0
- {otter_service_stdalone-1.1.23.dist-info → otter_service_stdalone-1.1.25.dist-info}/top_level.txt +0 -0
@@ -1 +1 @@
|
|
1
|
-
__version__ = "1.1.
|
1
|
+
__version__ = "1.1.25"
|
otter_service_stdalone/app.py
CHANGED
@@ -209,10 +209,11 @@ class Download(BaseHandler):
|
|
209
209
|
zipF.write(f"{file_path}", f_path, compress_type=ZIP_DEFLATED)
|
210
210
|
read_me = os.path.join(os.path.dirname(__file__), "static_files", "README_DO_NOT_DISTRIBUTE.txt")
|
211
211
|
zipF.write(read_me, "README_DO_NOT_DISTRIBUTE.txt", compress_type=ZIP_DEFLATED)
|
212
|
-
|
212
|
+
|
213
|
+
download_label = f"{'-'.join(download_code.split('-')[:-5])}-results.zip"
|
213
214
|
self.set_header('Content-Type', 'application/octet-stream')
|
214
215
|
self.set_header("Content-Description", "File Transfer")
|
215
|
-
m = f"attachment; filename=
|
216
|
+
m = f"attachment; filename={download_label}"
|
216
217
|
self.set_header('Content-Disposition', m)
|
217
218
|
with open(f"{directory}/results.zip", 'rb') as f:
|
218
219
|
try:
|
@@ -251,9 +252,10 @@ class Upload(BaseHandler):
|
|
251
252
|
results_path = str(uuid.uuid4())
|
252
253
|
autograder = self.request.files['autograder'][0] if "autograder" in files else None
|
253
254
|
notebooks = self.request.files['notebooks'][0] if "notebooks" in files else None
|
254
|
-
log.write_logs(results_path, "Step 1: Upload accepted", "", "debug", log_debug)
|
255
255
|
if autograder is not None and notebooks is not None:
|
256
|
+
log.write_logs(results_path, "Step 1: Upload accepted", "", "debug", log_debug)
|
256
257
|
notebooks_fname = notebooks['filename']
|
258
|
+
results_path = f"{os.path.splitext(notebooks_fname)[0]}-{results_path}"
|
257
259
|
notebooks_extn = os.path.splitext(notebooks_fname)[1]
|
258
260
|
if notebooks_extn == ".zip":
|
259
261
|
notebooks_name = results_path + notebooks_extn
|
@@ -300,7 +302,7 @@ class Upload(BaseHandler):
|
|
300
302
|
except Exception as e:
|
301
303
|
log.write_logs(results_path, "Grading Problem", str(e), "error", log_error)
|
302
304
|
else:
|
303
|
-
m = "Step
|
305
|
+
m = "Step 1: Uploaded Files not given"
|
304
306
|
log.write_logs(results_path, m, "", "debug", log_debug)
|
305
307
|
m = "It looks like you did not set the notebooks or autograder.zip or both!"
|
306
308
|
self.render("index.html", message=m)
|
@@ -1,6 +1,6 @@
|
|
1
|
-
otter_service_stdalone/__init__.py,sha256=
|
1
|
+
otter_service_stdalone/__init__.py,sha256=GUhBe-u2VIxlWj6VnsQTa5f-5Y_9NH483RwP3bh4950,23
|
2
2
|
otter_service_stdalone/access_sops_keys.py,sha256=nboU5aZ84Elrm5vO0dMgpIF5LLcnecpNAwpxKvj6DvU,2129
|
3
|
-
otter_service_stdalone/app.py,sha256=
|
3
|
+
otter_service_stdalone/app.py,sha256=CR6QaQlPO0I04Llxn48eTDJEWUaALI-nTrri1nf1wkI,15990
|
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
|
@@ -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.
|
19
|
-
otter_service_stdalone-1.1.
|
20
|
-
otter_service_stdalone-1.1.
|
21
|
-
otter_service_stdalone-1.1.
|
22
|
-
otter_service_stdalone-1.1.
|
18
|
+
otter_service_stdalone-1.1.25.dist-info/METADATA,sha256=dzDrh9QLpjRvaf2g4vvWoRfhy6FeSPEE1ffnmOt5v90,1468
|
19
|
+
otter_service_stdalone-1.1.25.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
20
|
+
otter_service_stdalone-1.1.25.dist-info/entry_points.txt,sha256=cx447chuIEl8ly9jEoF5-2xNhaKsWcIMDdhUMH_00qQ,75
|
21
|
+
otter_service_stdalone-1.1.25.dist-info/top_level.txt,sha256=6UP22fD4OhbLt23E01v8Kvjn44vPRbyTIg_GqMYL-Ng,23
|
22
|
+
otter_service_stdalone-1.1.25.dist-info/RECORD,,
|
{otter_service_stdalone-1.1.23.dist-info → otter_service_stdalone-1.1.25.dist-info}/entry_points.txt
RENAMED
File without changes
|
{otter_service_stdalone-1.1.23.dist-info → otter_service_stdalone-1.1.25.dist-info}/top_level.txt
RENAMED
File without changes
|