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.
- {pykubegrader-0.2.21/src/PyKubeGrader.egg-info → pykubegrader-0.2.23}/PKG-INFO +1 -1
- {pykubegrader-0.2.21 → pykubegrader-0.2.23/src/PyKubeGrader.egg-info}/PKG-INFO +1 -1
- {pykubegrader-0.2.21 → pykubegrader-0.2.23}/src/pykubegrader/build/api_notebook_builder.py +1 -1
- {pykubegrader-0.2.21 → pykubegrader-0.2.23}/src/pykubegrader/build/build_folder.py +14 -1
- {pykubegrader-0.2.21 → pykubegrader-0.2.23}/src/pykubegrader/tokens/validate_token.py +2 -2
- {pykubegrader-0.2.21 → pykubegrader-0.2.23}/.coveragerc +0 -0
- {pykubegrader-0.2.21 → pykubegrader-0.2.23}/.github/workflows/main.yml +0 -0
- {pykubegrader-0.2.21 → pykubegrader-0.2.23}/.gitignore +0 -0
- {pykubegrader-0.2.21 → pykubegrader-0.2.23}/.readthedocs.yml +0 -0
- {pykubegrader-0.2.21 → pykubegrader-0.2.23}/AUTHORS.rst +0 -0
- {pykubegrader-0.2.21 → pykubegrader-0.2.23}/CHANGELOG.rst +0 -0
- {pykubegrader-0.2.21 → pykubegrader-0.2.23}/CONTRIBUTING.rst +0 -0
- {pykubegrader-0.2.21 → pykubegrader-0.2.23}/LICENSE.txt +0 -0
- {pykubegrader-0.2.21 → pykubegrader-0.2.23}/README.rst +0 -0
- {pykubegrader-0.2.21 → pykubegrader-0.2.23}/docs/Makefile +0 -0
- {pykubegrader-0.2.21 → pykubegrader-0.2.23}/docs/_static/Drexel_blue_Logo_square_Dark.png +0 -0
- {pykubegrader-0.2.21 → pykubegrader-0.2.23}/docs/_static/Drexel_blue_Logo_square_Light.png +0 -0
- {pykubegrader-0.2.21 → pykubegrader-0.2.23}/docs/_static/custom.css +0 -0
- {pykubegrader-0.2.21 → pykubegrader-0.2.23}/docs/authors.rst +0 -0
- {pykubegrader-0.2.21 → pykubegrader-0.2.23}/docs/changelog.rst +0 -0
- {pykubegrader-0.2.21 → pykubegrader-0.2.23}/docs/conf.py +0 -0
- {pykubegrader-0.2.21 → pykubegrader-0.2.23}/docs/contributing.rst +0 -0
- {pykubegrader-0.2.21 → pykubegrader-0.2.23}/docs/index.rst +0 -0
- {pykubegrader-0.2.21 → pykubegrader-0.2.23}/docs/license.rst +0 -0
- {pykubegrader-0.2.21 → pykubegrader-0.2.23}/docs/readme.rst +0 -0
- {pykubegrader-0.2.21 → pykubegrader-0.2.23}/docs/requirements.txt +0 -0
- {pykubegrader-0.2.21 → pykubegrader-0.2.23}/examples/.responses.json +0 -0
- {pykubegrader-0.2.21 → pykubegrader-0.2.23}/examples/true_false.ipynb +0 -0
- {pykubegrader-0.2.21 → pykubegrader-0.2.23}/pyproject.toml +0 -0
- {pykubegrader-0.2.21 → pykubegrader-0.2.23}/setup.cfg +0 -0
- {pykubegrader-0.2.21 → pykubegrader-0.2.23}/setup.py +0 -0
- {pykubegrader-0.2.21 → pykubegrader-0.2.23}/src/PyKubeGrader.egg-info/SOURCES.txt +0 -0
- {pykubegrader-0.2.21 → pykubegrader-0.2.23}/src/PyKubeGrader.egg-info/dependency_links.txt +0 -0
- {pykubegrader-0.2.21 → pykubegrader-0.2.23}/src/PyKubeGrader.egg-info/entry_points.txt +0 -0
- {pykubegrader-0.2.21 → pykubegrader-0.2.23}/src/PyKubeGrader.egg-info/not-zip-safe +0 -0
- {pykubegrader-0.2.21 → pykubegrader-0.2.23}/src/PyKubeGrader.egg-info/requires.txt +0 -0
- {pykubegrader-0.2.21 → pykubegrader-0.2.23}/src/PyKubeGrader.egg-info/top_level.txt +0 -0
- {pykubegrader-0.2.21 → pykubegrader-0.2.23}/src/pykubegrader/__init__.py +0 -0
- {pykubegrader-0.2.21 → pykubegrader-0.2.23}/src/pykubegrader/build/__init__.py +0 -0
- {pykubegrader-0.2.21 → pykubegrader-0.2.23}/src/pykubegrader/build/clean_folder.py +0 -0
- {pykubegrader-0.2.21 → pykubegrader-0.2.23}/src/pykubegrader/graders/__init__.py +0 -0
- {pykubegrader-0.2.21 → pykubegrader-0.2.23}/src/pykubegrader/graders/late_assignments.py +0 -0
- {pykubegrader-0.2.21 → pykubegrader-0.2.23}/src/pykubegrader/initialize.py +0 -0
- {pykubegrader-0.2.21 → pykubegrader-0.2.23}/src/pykubegrader/log_parser/__init__.py +0 -0
- {pykubegrader-0.2.21 → pykubegrader-0.2.23}/src/pykubegrader/log_parser/parse.ipynb +0 -0
- {pykubegrader-0.2.21 → pykubegrader-0.2.23}/src/pykubegrader/log_parser/parse.py +0 -0
- {pykubegrader-0.2.21 → pykubegrader-0.2.23}/src/pykubegrader/submit/submit_assignment.py +0 -0
- {pykubegrader-0.2.21 → pykubegrader-0.2.23}/src/pykubegrader/telemetry.py +0 -0
- {pykubegrader-0.2.21 → pykubegrader-0.2.23}/src/pykubegrader/tokens/tokens.py +0 -0
- {pykubegrader-0.2.21 → pykubegrader-0.2.23}/src/pykubegrader/utils.py +0 -0
- {pykubegrader-0.2.21 → pykubegrader-0.2.23}/src/pykubegrader/validate.py +0 -0
- {pykubegrader-0.2.21 → pykubegrader-0.2.23}/src/pykubegrader/widgets/__init__.py +0 -0
- {pykubegrader-0.2.21 → pykubegrader-0.2.23}/src/pykubegrader/widgets/multiple_choice.py +0 -0
- {pykubegrader-0.2.21 → pykubegrader-0.2.23}/src/pykubegrader/widgets/reading_question.py +0 -0
- {pykubegrader-0.2.21 → pykubegrader-0.2.23}/src/pykubegrader/widgets/select_many.py +0 -0
- {pykubegrader-0.2.21 → pykubegrader-0.2.23}/src/pykubegrader/widgets/student_info.py +0 -0
- {pykubegrader-0.2.21 → pykubegrader-0.2.23}/src/pykubegrader/widgets/style.py +0 -0
- {pykubegrader-0.2.21 → pykubegrader-0.2.23}/src/pykubegrader/widgets/true_false.py +0 -0
- {pykubegrader-0.2.21 → pykubegrader-0.2.23}/src/pykubegrader/widgets/types_question.py +0 -0
- {pykubegrader-0.2.21 → pykubegrader-0.2.23}/src/pykubegrader/widgets_base/__init__.py +0 -0
- {pykubegrader-0.2.21 → pykubegrader-0.2.23}/src/pykubegrader/widgets_base/multi_select.py +0 -0
- {pykubegrader-0.2.21 → pykubegrader-0.2.23}/src/pykubegrader/widgets_base/reading.py +0 -0
- {pykubegrader-0.2.21 → pykubegrader-0.2.23}/src/pykubegrader/widgets_base/select.py +0 -0
- {pykubegrader-0.2.21 → pykubegrader-0.2.23}/tests/conftest.py +0 -0
- {pykubegrader-0.2.21 → pykubegrader-0.2.23}/tests/import_test.py +0 -0
- {pykubegrader-0.2.21 → pykubegrader-0.2.23}/tox.ini +0 -0
@@ -122,7 +122,7 @@ class FastAPINotebookBuilder:
|
|
122
122
|
|
123
123
|
if self.require_key:
|
124
124
|
first_cell_header.append(
|
125
|
-
"from pykubegrader.
|
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.
|
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
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|