PyKubeGrader 0.2.21__tar.gz → 0.2.23__tar.gz

Sign up to get free protection for your applications and to get access to all the features.
Files changed (66) hide show
  1. {pykubegrader-0.2.21/src/PyKubeGrader.egg-info → pykubegrader-0.2.23}/PKG-INFO +1 -1
  2. {pykubegrader-0.2.21 → pykubegrader-0.2.23/src/PyKubeGrader.egg-info}/PKG-INFO +1 -1
  3. {pykubegrader-0.2.21 → pykubegrader-0.2.23}/src/pykubegrader/build/api_notebook_builder.py +1 -1
  4. {pykubegrader-0.2.21 → pykubegrader-0.2.23}/src/pykubegrader/build/build_folder.py +14 -1
  5. {pykubegrader-0.2.21 → pykubegrader-0.2.23}/src/pykubegrader/tokens/validate_token.py +2 -2
  6. {pykubegrader-0.2.21 → pykubegrader-0.2.23}/.coveragerc +0 -0
  7. {pykubegrader-0.2.21 → pykubegrader-0.2.23}/.github/workflows/main.yml +0 -0
  8. {pykubegrader-0.2.21 → pykubegrader-0.2.23}/.gitignore +0 -0
  9. {pykubegrader-0.2.21 → pykubegrader-0.2.23}/.readthedocs.yml +0 -0
  10. {pykubegrader-0.2.21 → pykubegrader-0.2.23}/AUTHORS.rst +0 -0
  11. {pykubegrader-0.2.21 → pykubegrader-0.2.23}/CHANGELOG.rst +0 -0
  12. {pykubegrader-0.2.21 → pykubegrader-0.2.23}/CONTRIBUTING.rst +0 -0
  13. {pykubegrader-0.2.21 → pykubegrader-0.2.23}/LICENSE.txt +0 -0
  14. {pykubegrader-0.2.21 → pykubegrader-0.2.23}/README.rst +0 -0
  15. {pykubegrader-0.2.21 → pykubegrader-0.2.23}/docs/Makefile +0 -0
  16. {pykubegrader-0.2.21 → pykubegrader-0.2.23}/docs/_static/Drexel_blue_Logo_square_Dark.png +0 -0
  17. {pykubegrader-0.2.21 → pykubegrader-0.2.23}/docs/_static/Drexel_blue_Logo_square_Light.png +0 -0
  18. {pykubegrader-0.2.21 → pykubegrader-0.2.23}/docs/_static/custom.css +0 -0
  19. {pykubegrader-0.2.21 → pykubegrader-0.2.23}/docs/authors.rst +0 -0
  20. {pykubegrader-0.2.21 → pykubegrader-0.2.23}/docs/changelog.rst +0 -0
  21. {pykubegrader-0.2.21 → pykubegrader-0.2.23}/docs/conf.py +0 -0
  22. {pykubegrader-0.2.21 → pykubegrader-0.2.23}/docs/contributing.rst +0 -0
  23. {pykubegrader-0.2.21 → pykubegrader-0.2.23}/docs/index.rst +0 -0
  24. {pykubegrader-0.2.21 → pykubegrader-0.2.23}/docs/license.rst +0 -0
  25. {pykubegrader-0.2.21 → pykubegrader-0.2.23}/docs/readme.rst +0 -0
  26. {pykubegrader-0.2.21 → pykubegrader-0.2.23}/docs/requirements.txt +0 -0
  27. {pykubegrader-0.2.21 → pykubegrader-0.2.23}/examples/.responses.json +0 -0
  28. {pykubegrader-0.2.21 → pykubegrader-0.2.23}/examples/true_false.ipynb +0 -0
  29. {pykubegrader-0.2.21 → pykubegrader-0.2.23}/pyproject.toml +0 -0
  30. {pykubegrader-0.2.21 → pykubegrader-0.2.23}/setup.cfg +0 -0
  31. {pykubegrader-0.2.21 → pykubegrader-0.2.23}/setup.py +0 -0
  32. {pykubegrader-0.2.21 → pykubegrader-0.2.23}/src/PyKubeGrader.egg-info/SOURCES.txt +0 -0
  33. {pykubegrader-0.2.21 → pykubegrader-0.2.23}/src/PyKubeGrader.egg-info/dependency_links.txt +0 -0
  34. {pykubegrader-0.2.21 → pykubegrader-0.2.23}/src/PyKubeGrader.egg-info/entry_points.txt +0 -0
  35. {pykubegrader-0.2.21 → pykubegrader-0.2.23}/src/PyKubeGrader.egg-info/not-zip-safe +0 -0
  36. {pykubegrader-0.2.21 → pykubegrader-0.2.23}/src/PyKubeGrader.egg-info/requires.txt +0 -0
  37. {pykubegrader-0.2.21 → pykubegrader-0.2.23}/src/PyKubeGrader.egg-info/top_level.txt +0 -0
  38. {pykubegrader-0.2.21 → pykubegrader-0.2.23}/src/pykubegrader/__init__.py +0 -0
  39. {pykubegrader-0.2.21 → pykubegrader-0.2.23}/src/pykubegrader/build/__init__.py +0 -0
  40. {pykubegrader-0.2.21 → pykubegrader-0.2.23}/src/pykubegrader/build/clean_folder.py +0 -0
  41. {pykubegrader-0.2.21 → pykubegrader-0.2.23}/src/pykubegrader/graders/__init__.py +0 -0
  42. {pykubegrader-0.2.21 → pykubegrader-0.2.23}/src/pykubegrader/graders/late_assignments.py +0 -0
  43. {pykubegrader-0.2.21 → pykubegrader-0.2.23}/src/pykubegrader/initialize.py +0 -0
  44. {pykubegrader-0.2.21 → pykubegrader-0.2.23}/src/pykubegrader/log_parser/__init__.py +0 -0
  45. {pykubegrader-0.2.21 → pykubegrader-0.2.23}/src/pykubegrader/log_parser/parse.ipynb +0 -0
  46. {pykubegrader-0.2.21 → pykubegrader-0.2.23}/src/pykubegrader/log_parser/parse.py +0 -0
  47. {pykubegrader-0.2.21 → pykubegrader-0.2.23}/src/pykubegrader/submit/submit_assignment.py +0 -0
  48. {pykubegrader-0.2.21 → pykubegrader-0.2.23}/src/pykubegrader/telemetry.py +0 -0
  49. {pykubegrader-0.2.21 → pykubegrader-0.2.23}/src/pykubegrader/tokens/tokens.py +0 -0
  50. {pykubegrader-0.2.21 → pykubegrader-0.2.23}/src/pykubegrader/utils.py +0 -0
  51. {pykubegrader-0.2.21 → pykubegrader-0.2.23}/src/pykubegrader/validate.py +0 -0
  52. {pykubegrader-0.2.21 → pykubegrader-0.2.23}/src/pykubegrader/widgets/__init__.py +0 -0
  53. {pykubegrader-0.2.21 → pykubegrader-0.2.23}/src/pykubegrader/widgets/multiple_choice.py +0 -0
  54. {pykubegrader-0.2.21 → pykubegrader-0.2.23}/src/pykubegrader/widgets/reading_question.py +0 -0
  55. {pykubegrader-0.2.21 → pykubegrader-0.2.23}/src/pykubegrader/widgets/select_many.py +0 -0
  56. {pykubegrader-0.2.21 → pykubegrader-0.2.23}/src/pykubegrader/widgets/student_info.py +0 -0
  57. {pykubegrader-0.2.21 → pykubegrader-0.2.23}/src/pykubegrader/widgets/style.py +0 -0
  58. {pykubegrader-0.2.21 → pykubegrader-0.2.23}/src/pykubegrader/widgets/true_false.py +0 -0
  59. {pykubegrader-0.2.21 → pykubegrader-0.2.23}/src/pykubegrader/widgets/types_question.py +0 -0
  60. {pykubegrader-0.2.21 → pykubegrader-0.2.23}/src/pykubegrader/widgets_base/__init__.py +0 -0
  61. {pykubegrader-0.2.21 → pykubegrader-0.2.23}/src/pykubegrader/widgets_base/multi_select.py +0 -0
  62. {pykubegrader-0.2.21 → pykubegrader-0.2.23}/src/pykubegrader/widgets_base/reading.py +0 -0
  63. {pykubegrader-0.2.21 → pykubegrader-0.2.23}/src/pykubegrader/widgets_base/select.py +0 -0
  64. {pykubegrader-0.2.21 → pykubegrader-0.2.23}/tests/conftest.py +0 -0
  65. {pykubegrader-0.2.21 → pykubegrader-0.2.23}/tests/import_test.py +0 -0
  66. {pykubegrader-0.2.21 → pykubegrader-0.2.23}/tox.ini +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: PyKubeGrader
3
- Version: 0.2.21
3
+ Version: 0.2.23
4
4
  Summary: Add a short description here!
5
5
  Home-page: https://github.com/pyscaffold/pyscaffold/
6
6
  Author: jagar2
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: PyKubeGrader
3
- Version: 0.2.21
3
+ Version: 0.2.23
4
4
  Summary: Add a short description here!
5
5
  Home-page: https://github.com/pyscaffold/pyscaffold/
6
6
  Author: jagar2
@@ -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
  """
@@ -721,7 +734,7 @@ class NotebookProcessor:
721
734
  import_text += "from pykubegrader.initialize import initialize_assignment\n"
722
735
  if require_key:
723
736
  import_text += (
724
- "from pykubegrader.token.validate_token import validate_token\n"
737
+ "from pykubegrader.tokens.validate_token import validate_token\n"
725
738
  )
726
739
  import_text += "validate_token('type the key provided by your TA here')\n"
727
740
  import_text += f'\nresponses = initialize_assignment("{os.path.splitext(os.path.basename(notebook_path))[0]}", "{week}", "{assignment_type}" )\n'
@@ -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
 
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes