PyKubeGrader 0.2.21__py3-none-any.whl → 0.2.22__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: PyKubeGrader
3
- Version: 0.2.21
3
+ Version: 0.2.22
4
4
  Summary: Add a short description here!
5
5
  Home-page: https://github.com/pyscaffold/pyscaffold/
6
6
  Author: jagar2
@@ -4,8 +4,8 @@ pykubegrader/telemetry.py,sha256=h8PPrXWGFgPWCcrChJo2woqd_XIPMFfYcxgLJ0CWpH8,536
4
4
  pykubegrader/utils.py,sha256=T3GYnLnTL9VXjTZNPr00sUgMgobQYsNTGwynMyXdvHk,696
5
5
  pykubegrader/validate.py,sha256=2KLSB3wfFZbBh1NGgmrOV073paKAgrQz4AgA6LmCIj4,11076
6
6
  pykubegrader/build/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
7
- pykubegrader/build/api_notebook_builder.py,sha256=bgTfN2EDwuCPBFQ258cGUYYwDYxjEHJ8kT2brOG_dZI,20308
8
- pykubegrader/build/build_folder.py,sha256=nPuXqSYeHIK-ZwJLyF9Ku3bqps-wM9fZigppZd1eQ3s,81498
7
+ pykubegrader/build/api_notebook_builder.py,sha256=IzzU_jh6SYSA2wtjtlhxa4t9WM8-JqWnWsV8e3UPwdo,20305
8
+ pykubegrader/build/build_folder.py,sha256=y5hrxkZgqVr0MRXL3AkihaJQmtm70F4umyVT8--uYTk,81820
9
9
  pykubegrader/build/clean_folder.py,sha256=8N0KyL4eXRs0DCw-V_2jR9igtFs_mOFMQufdL6tD-38,1323
10
10
  pykubegrader/graders/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
11
11
  pykubegrader/graders/late_assignments.py,sha256=_2-rA5RqO0BWY9WAQA_mbCxxPKTOiJOl-byD2CYWaE0,1393
@@ -14,7 +14,7 @@ pykubegrader/log_parser/parse.ipynb,sha256=H1CUuqiUSE-tiZV1IS7VG6HAEvoopGd6i_5QM
14
14
  pykubegrader/log_parser/parse.py,sha256=YCs_OCnoxQKsL55MjTZWXBBBsehJL8PIB9ANnC-aE44,7379
15
15
  pykubegrader/submit/submit_assignment.py,sha256=p-v31479342q0AO3lJrd8Fwk7iJQUz183OeGeiNcXOY,3405
16
16
  pykubegrader/tokens/tokens.py,sha256=DorNwdrA5N5apB3LQjVGa2ABN5C1upkgglecaLHobr0,1260
17
- pykubegrader/tokens/validate_token.py,sha256=z2S86z48UxnVCIvjUT3_u5dErfCK2yRI2sDGugHPBtQ,4044
17
+ pykubegrader/tokens/validate_token.py,sha256=q5aJ0hUsFTDgrSfAszPS5RpxwTKODAguFqkZkKjkN3k,4058
18
18
  pykubegrader/widgets/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
19
19
  pykubegrader/widgets/multiple_choice.py,sha256=NjD3-uXSnibpUQ0mO3hRp_O-rynFyl0Dz6IXE4tnCRI,2078
20
20
  pykubegrader/widgets/reading_question.py,sha256=y30_swHwzH8LrT8deWTnxctAAmR8BSxTlXAqMgUrAT4,3031
@@ -27,9 +27,9 @@ pykubegrader/widgets_base/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-
27
27
  pykubegrader/widgets_base/multi_select.py,sha256=Cl0IN21wXLZuFu-zC65aS9tD4jMfzCRJ2DPjHao5_Ak,4044
28
28
  pykubegrader/widgets_base/reading.py,sha256=_vjUPynqmJe_R4vf-7hVhGnQR726S9GL6qT8bflBXBM,5383
29
29
  pykubegrader/widgets_base/select.py,sha256=Fw3uFNOIWo1a3CvlzSx23bvi6bSmA3TqutuRbhD4Dp8,2525
30
- PyKubeGrader-0.2.21.dist-info/LICENSE.txt,sha256=YTp-Ewc8Kems8PJEE27KnBPFnZSxoWvSg7nnknzPyYw,1546
31
- PyKubeGrader-0.2.21.dist-info/METADATA,sha256=xp-GB2HwfV49LVDfRsp1cigdUqqSsLuti2FGsv6kdQg,2779
32
- PyKubeGrader-0.2.21.dist-info/WHEEL,sha256=A3WOREP4zgxI0fKrHUG8DC8013e3dK3n7a6HDbcEIwE,91
33
- PyKubeGrader-0.2.21.dist-info/entry_points.txt,sha256=UPMdTT46fQwTYJWtrUwIWIbXbwyOPfNQgBFRa0frWzw,138
34
- PyKubeGrader-0.2.21.dist-info/top_level.txt,sha256=e550Klfze6higFxER1V62fnGOcIgiKRbsrl9CC4UdtQ,13
35
- PyKubeGrader-0.2.21.dist-info/RECORD,,
30
+ PyKubeGrader-0.2.22.dist-info/LICENSE.txt,sha256=YTp-Ewc8Kems8PJEE27KnBPFnZSxoWvSg7nnknzPyYw,1546
31
+ PyKubeGrader-0.2.22.dist-info/METADATA,sha256=dPgcV3VFD4CAMAFJ2kQR8dw3ZY9wu1qls8k5gstiKJw,2779
32
+ PyKubeGrader-0.2.22.dist-info/WHEEL,sha256=A3WOREP4zgxI0fKrHUG8DC8013e3dK3n7a6HDbcEIwE,91
33
+ PyKubeGrader-0.2.22.dist-info/entry_points.txt,sha256=UPMdTT46fQwTYJWtrUwIWIbXbwyOPfNQgBFRa0frWzw,138
34
+ PyKubeGrader-0.2.22.dist-info/top_level.txt,sha256=e550Klfze6higFxER1V62fnGOcIgiKRbsrl9CC4UdtQ,13
35
+ PyKubeGrader-0.2.22.dist-info/RECORD,,
@@ -122,7 +122,7 @@ class FastAPINotebookBuilder:
122
122
 
123
123
  if self.require_key:
124
124
  first_cell_header.append(
125
- "from pykubegrader.submit.submit_assignment import validate_token\nvalidate_token()\n"
125
+ "from pykubegrader.tokens.validate_token import validate_token\nvalidate_token()\n"
126
126
  )
127
127
 
128
128
  short_filename = self.filename.split(".")[0].replace("_temp", "")
@@ -28,6 +28,19 @@ from .api_notebook_builder import FastAPINotebookBuilder
28
28
  from typing import Optional
29
29
 
30
30
 
31
+ import os
32
+
33
+ os.environ["JUPYTERHUB_USER"] = "jca92"
34
+ os.environ["TOKEN"] = "token"
35
+ os.environ["DB_URL"] = "https://engr-131-api.eastus.cloudapp.azure.com/"
36
+ os.environ["keys_student"] = "capture"
37
+ os.environ["user_name_student"] = "student"
38
+
39
+ from pykubegrader.tokens.tokens import add_token
40
+
41
+ add_token("token", duration=20)
42
+
43
+
31
44
  @dataclass
32
45
  class NotebookProcessor:
33
46
  """
@@ -39,7 +39,7 @@ def get_credentials():
39
39
  return {"username": username, "password": password}
40
40
 
41
41
 
42
- async def async_validate_token(token: str) -> None:
42
+ async def async_validate_token(token: str = None) -> None:
43
43
  """
44
44
  Asynchronously validate a token by making a GET request to the validation endpoint.
45
45
 
@@ -103,7 +103,7 @@ async def async_validate_token(token: str) -> None:
103
103
  raise TokenValidationError(f"An unexpected error occurred: {e}")
104
104
 
105
105
 
106
- def validate_token(token: str) -> None:
106
+ def validate_token(token: str = None) -> None:
107
107
  """
108
108
  Synchronous wrapper for the `async_validate_token` function.
109
109