PyKubeGrader 0.2.7__tar.gz → 0.2.9__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {pykubegrader-0.2.7/src/PyKubeGrader.egg-info → pykubegrader-0.2.9}/PKG-INFO +2 -1
- {pykubegrader-0.2.7 → pykubegrader-0.2.9}/setup.cfg +1 -0
- {pykubegrader-0.2.7 → pykubegrader-0.2.9/src/PyKubeGrader.egg-info}/PKG-INFO +2 -1
- {pykubegrader-0.2.7 → pykubegrader-0.2.9}/src/PyKubeGrader.egg-info/requires.txt +1 -0
- {pykubegrader-0.2.7 → pykubegrader-0.2.9}/src/pykubegrader/submit/submit_assignment.py +15 -2
- {pykubegrader-0.2.7 → pykubegrader-0.2.9}/.coveragerc +0 -0
- {pykubegrader-0.2.7 → pykubegrader-0.2.9}/.github/workflows/main.yml +0 -0
- {pykubegrader-0.2.7 → pykubegrader-0.2.9}/.gitignore +0 -0
- {pykubegrader-0.2.7 → pykubegrader-0.2.9}/.readthedocs.yml +0 -0
- {pykubegrader-0.2.7 → pykubegrader-0.2.9}/AUTHORS.rst +0 -0
- {pykubegrader-0.2.7 → pykubegrader-0.2.9}/CHANGELOG.rst +0 -0
- {pykubegrader-0.2.7 → pykubegrader-0.2.9}/CONTRIBUTING.rst +0 -0
- {pykubegrader-0.2.7 → pykubegrader-0.2.9}/LICENSE.txt +0 -0
- {pykubegrader-0.2.7 → pykubegrader-0.2.9}/README.rst +0 -0
- {pykubegrader-0.2.7 → pykubegrader-0.2.9}/docs/Makefile +0 -0
- {pykubegrader-0.2.7 → pykubegrader-0.2.9}/docs/_static/Drexel_blue_Logo_square_Dark.png +0 -0
- {pykubegrader-0.2.7 → pykubegrader-0.2.9}/docs/_static/Drexel_blue_Logo_square_Light.png +0 -0
- {pykubegrader-0.2.7 → pykubegrader-0.2.9}/docs/_static/custom.css +0 -0
- {pykubegrader-0.2.7 → pykubegrader-0.2.9}/docs/authors.rst +0 -0
- {pykubegrader-0.2.7 → pykubegrader-0.2.9}/docs/changelog.rst +0 -0
- {pykubegrader-0.2.7 → pykubegrader-0.2.9}/docs/conf.py +0 -0
- {pykubegrader-0.2.7 → pykubegrader-0.2.9}/docs/contributing.rst +0 -0
- {pykubegrader-0.2.7 → pykubegrader-0.2.9}/docs/index.rst +0 -0
- {pykubegrader-0.2.7 → pykubegrader-0.2.9}/docs/license.rst +0 -0
- {pykubegrader-0.2.7 → pykubegrader-0.2.9}/docs/readme.rst +0 -0
- {pykubegrader-0.2.7 → pykubegrader-0.2.9}/docs/requirements.txt +0 -0
- {pykubegrader-0.2.7 → pykubegrader-0.2.9}/examples/.responses.json +0 -0
- {pykubegrader-0.2.7 → pykubegrader-0.2.9}/examples/true_false.ipynb +0 -0
- {pykubegrader-0.2.7 → pykubegrader-0.2.9}/pyproject.toml +0 -0
- {pykubegrader-0.2.7 → pykubegrader-0.2.9}/setup.py +0 -0
- {pykubegrader-0.2.7 → pykubegrader-0.2.9}/src/PyKubeGrader.egg-info/SOURCES.txt +0 -0
- {pykubegrader-0.2.7 → pykubegrader-0.2.9}/src/PyKubeGrader.egg-info/dependency_links.txt +0 -0
- {pykubegrader-0.2.7 → pykubegrader-0.2.9}/src/PyKubeGrader.egg-info/entry_points.txt +0 -0
- {pykubegrader-0.2.7 → pykubegrader-0.2.9}/src/PyKubeGrader.egg-info/not-zip-safe +0 -0
- {pykubegrader-0.2.7 → pykubegrader-0.2.9}/src/PyKubeGrader.egg-info/top_level.txt +0 -0
- {pykubegrader-0.2.7 → pykubegrader-0.2.9}/src/pykubegrader/__init__.py +0 -0
- {pykubegrader-0.2.7 → pykubegrader-0.2.9}/src/pykubegrader/build/__init__.py +0 -0
- {pykubegrader-0.2.7 → pykubegrader-0.2.9}/src/pykubegrader/build/api_notebook_builder.py +0 -0
- {pykubegrader-0.2.7 → pykubegrader-0.2.9}/src/pykubegrader/build/build_folder.py +0 -0
- {pykubegrader-0.2.7 → pykubegrader-0.2.9}/src/pykubegrader/build/clean_folder.py +0 -0
- {pykubegrader-0.2.7 → pykubegrader-0.2.9}/src/pykubegrader/graders/__init__.py +0 -0
- {pykubegrader-0.2.7 → pykubegrader-0.2.9}/src/pykubegrader/graders/late_assignments.py +0 -0
- {pykubegrader-0.2.7 → pykubegrader-0.2.9}/src/pykubegrader/initialize.py +0 -0
- {pykubegrader-0.2.7 → pykubegrader-0.2.9}/src/pykubegrader/log_parser/__init__.py +0 -0
- {pykubegrader-0.2.7 → pykubegrader-0.2.9}/src/pykubegrader/log_parser/parse.ipynb +0 -0
- {pykubegrader-0.2.7 → pykubegrader-0.2.9}/src/pykubegrader/log_parser/parse.py +0 -0
- {pykubegrader-0.2.7 → pykubegrader-0.2.9}/src/pykubegrader/telemetry.py +0 -0
- {pykubegrader-0.2.7 → pykubegrader-0.2.9}/src/pykubegrader/utils.py +0 -0
- {pykubegrader-0.2.7 → pykubegrader-0.2.9}/src/pykubegrader/validate.py +0 -0
- {pykubegrader-0.2.7 → pykubegrader-0.2.9}/src/pykubegrader/widgets/__init__.py +0 -0
- {pykubegrader-0.2.7 → pykubegrader-0.2.9}/src/pykubegrader/widgets/multiple_choice.py +0 -0
- {pykubegrader-0.2.7 → pykubegrader-0.2.9}/src/pykubegrader/widgets/reading_question.py +0 -0
- {pykubegrader-0.2.7 → pykubegrader-0.2.9}/src/pykubegrader/widgets/select_many.py +0 -0
- {pykubegrader-0.2.7 → pykubegrader-0.2.9}/src/pykubegrader/widgets/student_info.py +0 -0
- {pykubegrader-0.2.7 → pykubegrader-0.2.9}/src/pykubegrader/widgets/style.py +0 -0
- {pykubegrader-0.2.7 → pykubegrader-0.2.9}/src/pykubegrader/widgets/true_false.py +0 -0
- {pykubegrader-0.2.7 → pykubegrader-0.2.9}/src/pykubegrader/widgets/types_question.py +0 -0
- {pykubegrader-0.2.7 → pykubegrader-0.2.9}/src/pykubegrader/widgets_base/__init__.py +0 -0
- {pykubegrader-0.2.7 → pykubegrader-0.2.9}/src/pykubegrader/widgets_base/multi_select.py +0 -0
- {pykubegrader-0.2.7 → pykubegrader-0.2.9}/src/pykubegrader/widgets_base/reading.py +0 -0
- {pykubegrader-0.2.7 → pykubegrader-0.2.9}/src/pykubegrader/widgets_base/select.py +0 -0
- {pykubegrader-0.2.7 → pykubegrader-0.2.9}/tests/conftest.py +0 -0
- {pykubegrader-0.2.7 → pykubegrader-0.2.9}/tests/import_test.py +0 -0
- {pykubegrader-0.2.7 → pykubegrader-0.2.9}/tox.ini +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: PyKubeGrader
|
3
|
-
Version: 0.2.
|
3
|
+
Version: 0.2.9
|
4
4
|
Summary: Add a short description here!
|
5
5
|
Home-page: https://github.com/pyscaffold/pyscaffold/
|
6
6
|
Author: jagar2
|
@@ -29,6 +29,7 @@ Requires-Dist: types-pyyaml
|
|
29
29
|
Requires-Dist: types-requests
|
30
30
|
Requires-Dist: types-setuptools
|
31
31
|
Requires-Dist: httpx
|
32
|
+
Requires-Dist: nest_asyncio
|
32
33
|
Provides-Extra: testing
|
33
34
|
Requires-Dist: setuptools; extra == "testing"
|
34
35
|
Requires-Dist: pytest; extra == "testing"
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: PyKubeGrader
|
3
|
-
Version: 0.2.
|
3
|
+
Version: 0.2.9
|
4
4
|
Summary: Add a short description here!
|
5
5
|
Home-page: https://github.com/pyscaffold/pyscaffold/
|
6
6
|
Author: jagar2
|
@@ -29,6 +29,7 @@ Requires-Dist: types-pyyaml
|
|
29
29
|
Requires-Dist: types-requests
|
30
30
|
Requires-Dist: types-setuptools
|
31
31
|
Requires-Dist: httpx
|
32
|
+
Requires-Dist: nest_asyncio
|
32
33
|
Provides-Extra: testing
|
33
34
|
Requires-Dist: setuptools; extra == "testing"
|
34
35
|
Requires-Dist: pytest; extra == "testing"
|
@@ -1,6 +1,10 @@
|
|
1
1
|
import os
|
2
2
|
import httpx
|
3
3
|
import asyncio
|
4
|
+
import nest_asyncio
|
5
|
+
|
6
|
+
# Apply nest_asyncio for environments like Jupyter
|
7
|
+
nest_asyncio.apply()
|
4
8
|
|
5
9
|
|
6
10
|
def get_credentials():
|
@@ -60,7 +64,6 @@ async def call_score_assignment(
|
|
60
64
|
raise RuntimeError(f"An unexpected error occurred: {e}")
|
61
65
|
|
62
66
|
|
63
|
-
# Importable function
|
64
67
|
def submit_assignment(
|
65
68
|
assignment_title: str, file_path: str = ".output_reduced.log"
|
66
69
|
) -> None:
|
@@ -71,7 +74,17 @@ def submit_assignment(
|
|
71
74
|
assignment_title (str): Title of the assignment.
|
72
75
|
file_path (str): Path to the log file to upload.
|
73
76
|
"""
|
74
|
-
|
77
|
+
# Get the current event loop or create one
|
78
|
+
try:
|
79
|
+
loop = asyncio.get_event_loop()
|
80
|
+
except RuntimeError:
|
81
|
+
loop = asyncio.new_event_loop()
|
82
|
+
asyncio.set_event_loop(loop)
|
83
|
+
|
84
|
+
# Run the async function in the event loop
|
85
|
+
response = loop.run_until_complete(
|
86
|
+
call_score_assignment(assignment_title, file_path)
|
87
|
+
)
|
75
88
|
print("Server Response:", response.get("message", "No message in response"))
|
76
89
|
|
77
90
|
|
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
|