PyKubeGrader 0.2.18__py3-none-any.whl → 0.2.19__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.18
3
+ Version: 0.2.19
4
4
  Summary: Add a short description here!
5
5
  Home-page: https://github.com/pyscaffold/pyscaffold/
6
6
  Author: jagar2
@@ -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=qbAKE8Vtz3trD99Yb3RnC7gr23CRqaNMFiESqFmWDlY,2037
17
+ pykubegrader/tokens/validate_token.py,sha256=QV_xWKsWowBHzmLEAFe-D_gficYvg2jSBGEnBvpoL8c,2115
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.18.dist-info/LICENSE.txt,sha256=YTp-Ewc8Kems8PJEE27KnBPFnZSxoWvSg7nnknzPyYw,1546
31
- PyKubeGrader-0.2.18.dist-info/METADATA,sha256=m7tPzuZwXFkUeK19vPiztdP6MYcuFPbVzgT18AYOVAw,2779
32
- PyKubeGrader-0.2.18.dist-info/WHEEL,sha256=A3WOREP4zgxI0fKrHUG8DC8013e3dK3n7a6HDbcEIwE,91
33
- PyKubeGrader-0.2.18.dist-info/entry_points.txt,sha256=UPMdTT46fQwTYJWtrUwIWIbXbwyOPfNQgBFRa0frWzw,138
34
- PyKubeGrader-0.2.18.dist-info/top_level.txt,sha256=e550Klfze6higFxER1V62fnGOcIgiKRbsrl9CC4UdtQ,13
35
- PyKubeGrader-0.2.18.dist-info/RECORD,,
30
+ PyKubeGrader-0.2.19.dist-info/LICENSE.txt,sha256=YTp-Ewc8Kems8PJEE27KnBPFnZSxoWvSg7nnknzPyYw,1546
31
+ PyKubeGrader-0.2.19.dist-info/METADATA,sha256=wPPKPTXgCW6_bOgG8J7r9nFFi9SOCTPJAvJR5rk8DB4,2779
32
+ PyKubeGrader-0.2.19.dist-info/WHEEL,sha256=A3WOREP4zgxI0fKrHUG8DC8013e3dK3n7a6HDbcEIwE,91
33
+ PyKubeGrader-0.2.19.dist-info/entry_points.txt,sha256=UPMdTT46fQwTYJWtrUwIWIbXbwyOPfNQgBFRa0frWzw,138
34
+ PyKubeGrader-0.2.19.dist-info/top_level.txt,sha256=e550Klfze6higFxER1V62fnGOcIgiKRbsrl9CC4UdtQ,13
35
+ PyKubeGrader-0.2.19.dist-info/RECORD,,
@@ -29,17 +29,19 @@ def validate_token(token = None):
29
29
  Returns:
30
30
  None: If the token is valid, the function will pass silently.
31
31
  """
32
- endpoint = f"https://engr-131-api.eastus.cloudapp.azure.com/validate-token/{token}"
33
-
32
+ # sets the token in the environment variable
34
33
  if token is not None:
35
34
  os.environ["TOKEN"] = token
36
35
 
37
36
  if token is None:
38
37
  token = os.getenv("TOKEN", None)
39
-
38
+
40
39
  if token is None:
41
40
  raise TokenValidationError("No token provided")
42
41
 
42
+ # Define the validation endpoint
43
+ endpoint = f"https://engr-131-api.eastus.cloudapp.azure.com/validate-token/{token}"
44
+
43
45
  try:
44
46
  response = requests.get(endpoint, timeout=10)
45
47