PyKubeGrader 0.1.6__tar.gz → 0.1.8__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {pykubegrader-0.1.6/src/PyKubeGrader.egg-info → pykubegrader-0.1.8}/PKG-INFO +1 -1
- {pykubegrader-0.1.6 → pykubegrader-0.1.8/src/PyKubeGrader.egg-info}/PKG-INFO +1 -1
- {pykubegrader-0.1.6 → pykubegrader-0.1.8}/src/pykubegrader/initialize.py +16 -2
- {pykubegrader-0.1.6 → pykubegrader-0.1.8}/src/pykubegrader/telemetry.py +2 -2
- {pykubegrader-0.1.6 → pykubegrader-0.1.8}/src/pykubegrader/validate.py +2 -2
- {pykubegrader-0.1.6 → pykubegrader-0.1.8}/.coveragerc +0 -0
- {pykubegrader-0.1.6 → pykubegrader-0.1.8}/.github/workflows/main.yml +0 -0
- {pykubegrader-0.1.6 → pykubegrader-0.1.8}/.gitignore +0 -0
- {pykubegrader-0.1.6 → pykubegrader-0.1.8}/.readthedocs.yml +0 -0
- {pykubegrader-0.1.6 → pykubegrader-0.1.8}/AUTHORS.rst +0 -0
- {pykubegrader-0.1.6 → pykubegrader-0.1.8}/CHANGELOG.rst +0 -0
- {pykubegrader-0.1.6 → pykubegrader-0.1.8}/CONTRIBUTING.rst +0 -0
- {pykubegrader-0.1.6 → pykubegrader-0.1.8}/LICENSE.txt +0 -0
- {pykubegrader-0.1.6 → pykubegrader-0.1.8}/README.rst +0 -0
- {pykubegrader-0.1.6 → pykubegrader-0.1.8}/docs/Makefile +0 -0
- {pykubegrader-0.1.6 → pykubegrader-0.1.8}/docs/_static/Drexel_blue_Logo_square_Dark.png +0 -0
- {pykubegrader-0.1.6 → pykubegrader-0.1.8}/docs/_static/Drexel_blue_Logo_square_Light.png +0 -0
- {pykubegrader-0.1.6 → pykubegrader-0.1.8}/docs/_static/custom.css +0 -0
- {pykubegrader-0.1.6 → pykubegrader-0.1.8}/docs/authors.rst +0 -0
- {pykubegrader-0.1.6 → pykubegrader-0.1.8}/docs/changelog.rst +0 -0
- {pykubegrader-0.1.6 → pykubegrader-0.1.8}/docs/conf.py +0 -0
- {pykubegrader-0.1.6 → pykubegrader-0.1.8}/docs/contributing.rst +0 -0
- {pykubegrader-0.1.6 → pykubegrader-0.1.8}/docs/index.rst +0 -0
- {pykubegrader-0.1.6 → pykubegrader-0.1.8}/docs/license.rst +0 -0
- {pykubegrader-0.1.6 → pykubegrader-0.1.8}/docs/readme.rst +0 -0
- {pykubegrader-0.1.6 → pykubegrader-0.1.8}/docs/requirements.txt +0 -0
- {pykubegrader-0.1.6 → pykubegrader-0.1.8}/examples/.responses.json +0 -0
- {pykubegrader-0.1.6 → pykubegrader-0.1.8}/examples/true_false.ipynb +0 -0
- {pykubegrader-0.1.6 → pykubegrader-0.1.8}/pyproject.toml +0 -0
- {pykubegrader-0.1.6 → pykubegrader-0.1.8}/setup.cfg +0 -0
- {pykubegrader-0.1.6 → pykubegrader-0.1.8}/setup.py +0 -0
- {pykubegrader-0.1.6 → pykubegrader-0.1.8}/src/PyKubeGrader.egg-info/SOURCES.txt +0 -0
- {pykubegrader-0.1.6 → pykubegrader-0.1.8}/src/PyKubeGrader.egg-info/dependency_links.txt +0 -0
- {pykubegrader-0.1.6 → pykubegrader-0.1.8}/src/PyKubeGrader.egg-info/entry_points.txt +0 -0
- {pykubegrader-0.1.6 → pykubegrader-0.1.8}/src/PyKubeGrader.egg-info/not-zip-safe +0 -0
- {pykubegrader-0.1.6 → pykubegrader-0.1.8}/src/PyKubeGrader.egg-info/requires.txt +0 -0
- {pykubegrader-0.1.6 → pykubegrader-0.1.8}/src/PyKubeGrader.egg-info/top_level.txt +0 -0
- {pykubegrader-0.1.6 → pykubegrader-0.1.8}/src/pykubegrader/__init__.py +0 -0
- {pykubegrader-0.1.6 → pykubegrader-0.1.8}/src/pykubegrader/build/build_folder.py +0 -0
- {pykubegrader-0.1.6 → pykubegrader-0.1.8}/src/pykubegrader/utils.py +0 -0
- {pykubegrader-0.1.6 → pykubegrader-0.1.8}/src/pykubegrader/widgets/__init__.py +0 -0
- {pykubegrader-0.1.6 → pykubegrader-0.1.8}/src/pykubegrader/widgets/multiple_choice.py +0 -0
- {pykubegrader-0.1.6 → pykubegrader-0.1.8}/src/pykubegrader/widgets/reading_question.py +0 -0
- {pykubegrader-0.1.6 → pykubegrader-0.1.8}/src/pykubegrader/widgets/select_many.py +0 -0
- {pykubegrader-0.1.6 → pykubegrader-0.1.8}/src/pykubegrader/widgets/student_info.py +0 -0
- {pykubegrader-0.1.6 → pykubegrader-0.1.8}/src/pykubegrader/widgets/style.py +0 -0
- {pykubegrader-0.1.6 → pykubegrader-0.1.8}/src/pykubegrader/widgets/true_false.py +0 -0
- {pykubegrader-0.1.6 → pykubegrader-0.1.8}/src/pykubegrader/widgets/types_question.py +0 -0
- {pykubegrader-0.1.6 → pykubegrader-0.1.8}/src/pykubegrader/widgets_base/__init__.py +0 -0
- {pykubegrader-0.1.6 → pykubegrader-0.1.8}/src/pykubegrader/widgets_base/multi_select.py +0 -0
- {pykubegrader-0.1.6 → pykubegrader-0.1.8}/src/pykubegrader/widgets_base/reading.py +0 -0
- {pykubegrader-0.1.6 → pykubegrader-0.1.8}/src/pykubegrader/widgets_base/select.py +0 -0
- {pykubegrader-0.1.6 → pykubegrader-0.1.8}/tests/conftest.py +0 -0
- {pykubegrader-0.1.6 → pykubegrader-0.1.8}/tests/import_test.py +0 -0
- {pykubegrader-0.1.6 → pykubegrader-0.1.8}/tox.ini +0 -0
@@ -1,4 +1,5 @@
|
|
1
1
|
import json
|
2
|
+
import os
|
2
3
|
|
3
4
|
import panel as pn
|
4
5
|
from IPython import get_ipython
|
@@ -16,13 +17,26 @@ def initialize_assignment(name: str) -> None:
|
|
16
17
|
ipython.events.register("pre_run_cell", telemetry)
|
17
18
|
except TypeError as e:
|
18
19
|
print(f"Failed to register telemetry: {e}")
|
20
|
+
return
|
21
|
+
|
22
|
+
jhub_user = os.getenv("JUPYTERHUB_USER")
|
23
|
+
if jhub_user is None:
|
24
|
+
print("Setup unsuccessful. Are you on JupyterHub?")
|
25
|
+
return
|
19
26
|
|
20
|
-
pn.extension()
|
27
|
+
pn.extension(silent=True)
|
21
28
|
|
22
29
|
try:
|
23
|
-
update_responses(key="assignment", value=name)
|
30
|
+
responses = update_responses(key="assignment", value=name)
|
31
|
+
|
32
|
+
seed = responses.get("seed")
|
33
|
+
if seed is None:
|
34
|
+
new_seed = hash(jhub_user) % 1000
|
35
|
+
responses = update_responses(key="seed", value=new_seed)
|
24
36
|
except (TypeError, json.JSONDecodeError) as e:
|
25
37
|
print(f"Failed to initialize assignment: {e}")
|
26
38
|
return
|
27
39
|
|
28
40
|
print("Assignment successfully initialized")
|
41
|
+
print(f"Assignment: {name}")
|
42
|
+
print(f"Username: {jhub_user}")
|
@@ -100,7 +100,7 @@ def score_question(
|
|
100
100
|
assignment: str,
|
101
101
|
question: str,
|
102
102
|
submission: str,
|
103
|
-
base_url: str = "https://engr-131-api.
|
103
|
+
base_url: str = "https://engr-131-api.eastus.cloudapp.azure.com/",
|
104
104
|
) -> Response:
|
105
105
|
url = base_url + "/live-scorer"
|
106
106
|
|
@@ -124,7 +124,7 @@ def submit_question_new(
|
|
124
124
|
question: str,
|
125
125
|
responses: dict,
|
126
126
|
score: dict,
|
127
|
-
base_url: str = "https://engr-131-api.
|
127
|
+
base_url: str = "https://engr-131-api.eastus.cloudapp.azure.com/",
|
128
128
|
):
|
129
129
|
url = base_url + "/submit-question"
|
130
130
|
|
@@ -18,8 +18,8 @@ def validate_logfile(
|
|
18
18
|
free_response_questions=0,
|
19
19
|
username="student",
|
20
20
|
password="capture",
|
21
|
-
post_url="https://engr-131-api.
|
22
|
-
login_url="https://engr-131-api.
|
21
|
+
post_url="https://engr-131-api.eastus.cloudapp.azure.com/upload-score",
|
22
|
+
login_url="https://engr-131-api.eastus.cloudapp.azure.com/login",
|
23
23
|
) -> None:
|
24
24
|
login_data = {
|
25
25
|
"username": username,
|
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
|