ygrader 2.6.3__tar.gz → 2.6.5__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {ygrader-2.6.3/ygrader.egg-info → ygrader-2.6.5}/PKG-INFO +1 -1
- {ygrader-2.6.3 → ygrader-2.6.5}/setup.py +1 -1
- {ygrader-2.6.3 → ygrader-2.6.5}/ygrader/grader.py +19 -1
- {ygrader-2.6.3 → ygrader-2.6.5}/ygrader/utils.py +5 -0
- {ygrader-2.6.3 → ygrader-2.6.5/ygrader.egg-info}/PKG-INFO +1 -1
- {ygrader-2.6.3 → ygrader-2.6.5}/LICENSE +0 -0
- {ygrader-2.6.3 → ygrader-2.6.5}/setup.cfg +0 -0
- {ygrader-2.6.3 → ygrader-2.6.5}/test/test_interactive.py +0 -0
- {ygrader-2.6.3 → ygrader-2.6.5}/test/test_unittest.py +0 -0
- {ygrader-2.6.3 → ygrader-2.6.5}/ygrader/__init__.py +0 -0
- {ygrader-2.6.3 → ygrader-2.6.5}/ygrader/deductions.py +0 -0
- {ygrader-2.6.3 → ygrader-2.6.5}/ygrader/feedback.py +0 -0
- {ygrader-2.6.3 → ygrader-2.6.5}/ygrader/grades_csv.py +0 -0
- {ygrader-2.6.3 → ygrader-2.6.5}/ygrader/grading_item.py +0 -0
- {ygrader-2.6.3 → ygrader-2.6.5}/ygrader/grading_item_config.py +0 -0
- {ygrader-2.6.3 → ygrader-2.6.5}/ygrader/remote.py +0 -0
- {ygrader-2.6.3 → ygrader-2.6.5}/ygrader/score_input.py +0 -0
- {ygrader-2.6.3 → ygrader-2.6.5}/ygrader/send_ctrl_backtick.ahk +0 -0
- {ygrader-2.6.3 → ygrader-2.6.5}/ygrader/student_repos.py +0 -0
- {ygrader-2.6.3 → ygrader-2.6.5}/ygrader/upstream_merger.py +0 -0
- {ygrader-2.6.3 → ygrader-2.6.5}/ygrader.egg-info/SOURCES.txt +0 -0
- {ygrader-2.6.3 → ygrader-2.6.5}/ygrader.egg-info/dependency_links.txt +0 -0
- {ygrader-2.6.3 → ygrader-2.6.5}/ygrader.egg-info/requires.txt +0 -0
- {ygrader-2.6.3 → ygrader-2.6.5}/ygrader.egg-info/top_level.txt +0 -0
|
@@ -4,7 +4,7 @@ setup(
|
|
|
4
4
|
name="ygrader",
|
|
5
5
|
packages=["ygrader"],
|
|
6
6
|
package_data={"ygrader": ["*.ahk"]},
|
|
7
|
-
version="2.6.
|
|
7
|
+
version="2.6.5",
|
|
8
8
|
description="Grading scripts used in BYU's Electrical and Computer Engineering Department",
|
|
9
9
|
author="Jeff Goeders",
|
|
10
10
|
author_email="jeff.goeders@gmail.com",
|
|
@@ -357,7 +357,9 @@ class Grader:
|
|
|
357
357
|
run_only: bool
|
|
358
358
|
Whether you only want to run/grade and not build the students code. This will be passed to your
|
|
359
359
|
callback function, and is useful for labs that take a while to build. You can build all the code
|
|
360
|
-
in one pass, then return and grade the code later.
|
|
360
|
+
in one pass, then return and grade the code later. When using GitHub submissions, this will skip
|
|
361
|
+
fetching/cloning repositories and assume they already exist in a good state. If a student's
|
|
362
|
+
repository does not exist, an error will be reported and that student will be skipped.
|
|
361
363
|
allow_rebuild: bool
|
|
362
364
|
By default, the program will pass build=True and run=True to your callback on the first invocation,
|
|
363
365
|
and then allow the grader the option to "re-run" the student's code, where build=False and run=True
|
|
@@ -875,6 +877,22 @@ class Grader:
|
|
|
875
877
|
def _get_student_code_github(self, row, student_work_path, output=None):
|
|
876
878
|
if output is None:
|
|
877
879
|
output = sys.stdout
|
|
880
|
+
|
|
881
|
+
# If run_only mode, skip fetching and just verify the repo exists
|
|
882
|
+
if self.run_only:
|
|
883
|
+
if student_work_path.is_dir() and list(student_work_path.iterdir()):
|
|
884
|
+
print(
|
|
885
|
+
f"run_only mode: Using existing repo at {student_work_path}",
|
|
886
|
+
file=output,
|
|
887
|
+
)
|
|
888
|
+
return True
|
|
889
|
+
msg = f"run_only mode: Repo does not exist at {student_work_path}"
|
|
890
|
+
if output is sys.stdout:
|
|
891
|
+
print_color(TermColors.RED, msg)
|
|
892
|
+
else:
|
|
893
|
+
print(msg, file=output)
|
|
894
|
+
return False
|
|
895
|
+
|
|
878
896
|
student_work_path.mkdir(parents=True, exist_ok=True)
|
|
879
897
|
|
|
880
898
|
# Clone student repo
|
|
@@ -7,6 +7,7 @@ import shutil
|
|
|
7
7
|
import subprocess
|
|
8
8
|
import hashlib
|
|
9
9
|
import time
|
|
10
|
+
import os
|
|
10
11
|
|
|
11
12
|
|
|
12
13
|
class TermColors:
|
|
@@ -193,6 +194,10 @@ def open_file_in_vscode(file_path, sleep_time=1.0):
|
|
|
193
194
|
if result.returncode != 0:
|
|
194
195
|
error(f"VS Code exited with code {result.returncode}")
|
|
195
196
|
|
|
197
|
+
# Check if we're in an SSH connection - if so, skip sending the key combination
|
|
198
|
+
if os.environ.get("SSH_CONNECTION"):
|
|
199
|
+
return
|
|
200
|
+
|
|
196
201
|
# Give VS Code a moment to open, then send Ctrl+` to toggle terminal focus
|
|
197
202
|
time.sleep(sleep_time)
|
|
198
203
|
|
|
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
|