otter-service-stdalone 1.1.31__py3-none-any.whl → 1.1.32__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.31"
1
+ __version__ = "1.1.32"
@@ -6,7 +6,6 @@ from otter.grade import main as grade
6
6
  from otter import logging as loggers
7
7
  from multiprocessing import Process
8
8
  from tornado.ioloop import PeriodicCallback
9
- from .util import clean_directory
10
9
 
11
10
  log_debug = f'{os.environ.get("ENVIRONMENT")}-debug'
12
11
  log_count = f'{os.environ.get("ENVIRONMENT")}-count'
@@ -45,9 +44,6 @@ class GradeNotebooks():
45
44
  try:
46
45
  notebook_folder = uh.handle_upload(notebooks_path, results_id)
47
46
 
48
- # remove special characters from notebooks and remove hidden folders
49
- clean_directory(notebook_folder)
50
-
51
47
  notebook_count = self.count_ipynb_files(notebook_folder, ".ipynb")
52
48
  log.write_logs(results_id, f"{notebook_count}",
53
49
  "",
@@ -2,6 +2,7 @@ import os
2
2
  import shutil
3
3
  from zipfile import ZipFile
4
4
  from otter_service_stdalone import fs_logging as log
5
+ from .util import clean_directory
5
6
 
6
7
 
7
8
  def handle_one_notebook(path):
@@ -119,7 +120,8 @@ def handle_upload(path, results_id):
119
120
  zip_folder = path.split(".")[0]
120
121
  with ZipFile(path, 'r') as zObject:
121
122
  zObject.extractall(path=zip_folder)
122
-
123
+ # remove special characters from notebooks and remove hidden folders
124
+ clean_directory(zip_folder)
123
125
  log.write_logs(results_id, "Step 4a: Configure Notebooks Folder for Otter Grader",
124
126
  "Zipped file of notebooks Uploaded",
125
127
  "debug",
@@ -49,7 +49,7 @@ def sanitize_filename(filename: str) -> str:
49
49
  # Split name and extension
50
50
  name, ext = os.path.splitext(filename)
51
51
  # Remove periods and commas from the name part
52
- clean_name = name.replace('.', '').replace(',', '')
52
+ clean_name = name.replace('.', '').replace(',', '').replace(' ', '')
53
53
  return f"{clean_name}{ext}"
54
54
 
55
55
 
@@ -62,7 +62,6 @@ def clean_directory(path: str):
62
62
  for dir_name in list(dirs):
63
63
  if dir_name.startswith('.') or dir_name == '__MACOSX':
64
64
  dir_path = os.path.join(root, dir_name)
65
- print(f"Deleting folder: {dir_path}")
66
65
  shutil.rmtree(dir_path)
67
66
  dirs.remove(dir_name) # remove from list to avoid walking it
68
67
 
@@ -72,5 +71,4 @@ def clean_directory(path: str):
72
71
  new_name = sanitize_filename(file_name)
73
72
  new_path = os.path.join(root, new_name)
74
73
  if old_path != new_path:
75
- print(f"Renaming {old_path} -> {new_path}")
76
74
  os.rename(old_path, new_path)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: otter_service_stdalone
3
- Version: 1.1.31
3
+ Version: 1.1.32
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=Y9b5TRHjXX4JCba9wG0eWODKTtGpLMDuVuylmN7aP8M,23
1
+ otter_service_stdalone/__init__.py,sha256=4tjdrCUGPIlEuanHiiHA6UbM8N2fLiGnKz4cTpNqquo,23
2
2
  otter_service_stdalone/access_sops_keys.py,sha256=nboU5aZ84Elrm5vO0dMgpIF5LLcnecpNAwpxKvj6DvU,2129
3
3
  otter_service_stdalone/app.py,sha256=sNHhy9PMOSXlzsx6DuJ6T69xixSvvDq9llh3_59KkC0,16176
4
4
  otter_service_stdalone/fs_logging.py,sha256=IKFZkc5TmpI6G3vTYFAU9jDjQ-GT5aRxk8kdZ0h0kJE,2390
5
- otter_service_stdalone/grade_notebooks.py,sha256=kHlil5pGcJWC6kSEqwCIUL-RUz7ODS6p6vbUoU0QKFM,3979
5
+ otter_service_stdalone/grade_notebooks.py,sha256=eNdJsqAs11Vy6lqT_VYu4E22_87Ow0VnsBniqYvJIL8,3818
6
6
  otter_service_stdalone/index.html,sha256=eEbFGxbV-plE5bAggGYHTv1q7yqoTN4kJbzL729uMmk,7276
7
- otter_service_stdalone/upload_handle.py,sha256=PbpQEyUIPKercJ9hegKwvxHBvSc9uylhIfwjvHybjs0,5061
7
+ otter_service_stdalone/upload_handle.py,sha256=esW765NkaCMiJKMBfWnXiUjqgftl3YF13j2VfzsGneI,5223
8
8
  otter_service_stdalone/user_auth.py,sha256=L9Kfj1BsQttAteHhRn71IUY8WX9nvBy3MXVGq1yjTtE,4253
9
- otter_service_stdalone/util.py,sha256=gyaHCPPUootX2i_wsxOo6cotkiNYKOQgoPpUlvjw8SA,2836
9
+ otter_service_stdalone/util.py,sha256=a7fwDOg7d2L-qu5EYzvnAI6TXmenh4gZFfVfOibc5OM,2739
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.31.dist-info/METADATA,sha256=NGDJ1XUgQ0Hdea_CciTv-jSgN_4f-khyXht3tO_6r58,1322
19
- otter_service_stdalone-1.1.31.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
20
- otter_service_stdalone-1.1.31.dist-info/entry_points.txt,sha256=cx447chuIEl8ly9jEoF5-2xNhaKsWcIMDdhUMH_00qQ,75
21
- otter_service_stdalone-1.1.31.dist-info/top_level.txt,sha256=6UP22fD4OhbLt23E01v8Kvjn44vPRbyTIg_GqMYL-Ng,23
22
- otter_service_stdalone-1.1.31.dist-info/RECORD,,
18
+ otter_service_stdalone-1.1.32.dist-info/METADATA,sha256=qyMOnYrZobct0gVJHrhxDlt-ePip-iALM1AnrFhoRik,1322
19
+ otter_service_stdalone-1.1.32.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
20
+ otter_service_stdalone-1.1.32.dist-info/entry_points.txt,sha256=cx447chuIEl8ly9jEoF5-2xNhaKsWcIMDdhUMH_00qQ,75
21
+ otter_service_stdalone-1.1.32.dist-info/top_level.txt,sha256=6UP22fD4OhbLt23E01v8Kvjn44vPRbyTIg_GqMYL-Ng,23
22
+ otter_service_stdalone-1.1.32.dist-info/RECORD,,