otter-service-stdalone 0.1.5__py3-none-any.whl → 0.1.8__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 +13 -0
- {otter_service_stdalone-0.1.5.dist-info → otter_service_stdalone-0.1.8.dist-info}/METADATA +1 -1
- otter_service_stdalone-0.1.8.dist-info/RECORD +9 -0
- otter_service_stdalone-0.1.5.dist-info/RECORD +0 -9
- {otter_service_stdalone-0.1.5.dist-info → otter_service_stdalone-0.1.8.dist-info}/WHEEL +0 -0
- {otter_service_stdalone-0.1.5.dist-info → otter_service_stdalone-0.1.8.dist-info}/entry_points.txt +0 -0
- {otter_service_stdalone-0.1.5.dist-info → otter_service_stdalone-0.1.8.dist-info}/top_level.txt +0 -0
@@ -1 +1 @@
|
|
1
|
-
__version__ = "0.1.
|
1
|
+
__version__ = "0.1.8"
|
otter_service_stdalone/app.py
CHANGED
@@ -8,10 +8,21 @@ from otter_service_stdalone import fs_logging as log
|
|
8
8
|
from zipfile import ZipFile, ZIP_DEFLATED
|
9
9
|
import asyncio
|
10
10
|
import async_timeout
|
11
|
+
import shutil
|
11
12
|
|
12
13
|
__UPLOADS__ = "/tmp/uploads"
|
13
14
|
|
14
15
|
|
16
|
+
def copySubDirNotebooksToParentDir(parent_dir):
|
17
|
+
for root, dirs, files in os.walk(parent_dir):
|
18
|
+
for directory in dirs:
|
19
|
+
print(f"Subdirectory: {os.path.join(root, directory)}")
|
20
|
+
dir_path = os.path.join(root, directory)
|
21
|
+
for f in os.listdir(dir_path):
|
22
|
+
if os.path.isfile(f):
|
23
|
+
shutil.move(f, parent_dir)
|
24
|
+
|
25
|
+
|
15
26
|
class GradeNotebooks():
|
16
27
|
async def grade(self, p, notebooks_zip):
|
17
28
|
try:
|
@@ -19,6 +30,8 @@ class GradeNotebooks():
|
|
19
30
|
with ZipFile(notebooks_zip, 'r') as zObject:
|
20
31
|
zObject.extractall(path=zip_folder)
|
21
32
|
|
33
|
+
copySubDirNotebooksToParentDir(zip_folder)
|
34
|
+
|
22
35
|
command = [
|
23
36
|
'otter', 'grade',
|
24
37
|
'-a', p,
|
@@ -0,0 +1,9 @@
|
|
1
|
+
otter_service_stdalone/__init__.py,sha256=C69ADlbQREQlR15trneyA2sk8x0-oH4rDAX5fsv19_U,22
|
2
|
+
otter_service_stdalone/app.py,sha256=9kWJvEJc4xRmqm2gz3JK5Nnzpm3KzRxiGUmg7bSkHKw,6799
|
3
|
+
otter_service_stdalone/fs_logging.py,sha256=BaigFMwt277bW-MXnQKvmiBiyYBNxNRQz_ilPoxcO-w,1734
|
4
|
+
otter_service_stdalone/index.html,sha256=Kxg-itiwyIRvnqjOYBB8Sa73WczkE601jptOfXlIM3w,6024
|
5
|
+
otter_service_stdalone-0.1.8.dist-info/METADATA,sha256=50KrjD0N9P_rzxMpst97SIRYfg6L6VCq0rxVnhu5k1Q,1344
|
6
|
+
otter_service_stdalone-0.1.8.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
|
7
|
+
otter_service_stdalone-0.1.8.dist-info/entry_points.txt,sha256=cx447chuIEl8ly9jEoF5-2xNhaKsWcIMDdhUMH_00qQ,75
|
8
|
+
otter_service_stdalone-0.1.8.dist-info/top_level.txt,sha256=6UP22fD4OhbLt23E01v8Kvjn44vPRbyTIg_GqMYL-Ng,23
|
9
|
+
otter_service_stdalone-0.1.8.dist-info/RECORD,,
|
@@ -1,9 +0,0 @@
|
|
1
|
-
otter_service_stdalone/__init__.py,sha256=rPSfWgIeq2YWVPyESOAwCBt8vftsTpIkuLAGDEzyRQc,22
|
2
|
-
otter_service_stdalone/app.py,sha256=wAsJ6sNcxX7Yqbl6Q0x44H7BgRp7QSmOIPwDu_uN_1k,6349
|
3
|
-
otter_service_stdalone/fs_logging.py,sha256=BaigFMwt277bW-MXnQKvmiBiyYBNxNRQz_ilPoxcO-w,1734
|
4
|
-
otter_service_stdalone/index.html,sha256=Kxg-itiwyIRvnqjOYBB8Sa73WczkE601jptOfXlIM3w,6024
|
5
|
-
otter_service_stdalone-0.1.5.dist-info/METADATA,sha256=WFhfb0dZjQhhde2yZM_SE_0xuL3_U9z9WlkcOraBT2I,1344
|
6
|
-
otter_service_stdalone-0.1.5.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
|
7
|
-
otter_service_stdalone-0.1.5.dist-info/entry_points.txt,sha256=cx447chuIEl8ly9jEoF5-2xNhaKsWcIMDdhUMH_00qQ,75
|
8
|
-
otter_service_stdalone-0.1.5.dist-info/top_level.txt,sha256=6UP22fD4OhbLt23E01v8Kvjn44vPRbyTIg_GqMYL-Ng,23
|
9
|
-
otter_service_stdalone-0.1.5.dist-info/RECORD,,
|
File without changes
|
{otter_service_stdalone-0.1.5.dist-info → otter_service_stdalone-0.1.8.dist-info}/entry_points.txt
RENAMED
File without changes
|
{otter_service_stdalone-0.1.5.dist-info → otter_service_stdalone-0.1.8.dist-info}/top_level.txt
RENAMED
File without changes
|