ygrader 1.2.0__tar.gz → 1.2.1__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-1.2.0/ygrader.egg-info → ygrader-1.2.1}/PKG-INFO +1 -1
- {ygrader-1.2.0 → ygrader-1.2.1}/setup.py +1 -1
- {ygrader-1.2.0 → ygrader-1.2.1}/ygrader/utils.py +26 -5
- {ygrader-1.2.0 → ygrader-1.2.1/ygrader.egg-info}/PKG-INFO +1 -1
- {ygrader-1.2.0 → ygrader-1.2.1}/LICENSE +0 -0
- {ygrader-1.2.0 → ygrader-1.2.1}/setup.cfg +0 -0
- {ygrader-1.2.0 → ygrader-1.2.1}/test/test_interactive.py +0 -0
- {ygrader-1.2.0 → ygrader-1.2.1}/test/test_unittest.py +0 -0
- {ygrader-1.2.0 → ygrader-1.2.1}/ygrader/__init__.py +0 -0
- {ygrader-1.2.0 → ygrader-1.2.1}/ygrader/deductions.py +0 -0
- {ygrader-1.2.0 → ygrader-1.2.1}/ygrader/grader.py +0 -0
- {ygrader-1.2.0 → ygrader-1.2.1}/ygrader/grades_csv.py +0 -0
- {ygrader-1.2.0 → ygrader-1.2.1}/ygrader/grading_item.py +0 -0
- {ygrader-1.2.0 → ygrader-1.2.1}/ygrader/score_input.py +0 -0
- {ygrader-1.2.0 → ygrader-1.2.1}/ygrader/send_ctrl_backtick.ahk +0 -0
- {ygrader-1.2.0 → ygrader-1.2.1}/ygrader/student_repos.py +0 -0
- {ygrader-1.2.0 → ygrader-1.2.1}/ygrader/sub_items.py +0 -0
- {ygrader-1.2.0 → ygrader-1.2.1}/ygrader/upstream_merger.py +0 -0
- {ygrader-1.2.0 → ygrader-1.2.1}/ygrader.egg-info/SOURCES.txt +0 -0
- {ygrader-1.2.0 → ygrader-1.2.1}/ygrader.egg-info/dependency_links.txt +0 -0
- {ygrader-1.2.0 → ygrader-1.2.1}/ygrader.egg-info/requires.txt +0 -0
- {ygrader-1.2.0 → ygrader-1.2.1}/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="1.2.
|
|
7
|
+
version="1.2.1",
|
|
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",
|
|
@@ -174,13 +174,22 @@ def open_file_in_vscode(file_path):
|
|
|
174
174
|
|
|
175
175
|
file_path = pathlib.Path(file_path)
|
|
176
176
|
|
|
177
|
+
# Verify file exists before trying to open
|
|
178
|
+
if not file_path.exists():
|
|
179
|
+
error(f"File does not exist: {file_path}")
|
|
180
|
+
|
|
181
|
+
print(f"Opening {file_path} in VS Code...")
|
|
182
|
+
|
|
177
183
|
# Open in VS Code (will steal focus)
|
|
178
|
-
|
|
184
|
+
result = subprocess.run(
|
|
179
185
|
["code", "--reuse-window", file_path],
|
|
180
186
|
stdout=subprocess.DEVNULL,
|
|
181
187
|
stderr=subprocess.DEVNULL,
|
|
182
|
-
|
|
183
|
-
|
|
188
|
+
check=False,
|
|
189
|
+
)
|
|
190
|
+
if result.returncode != 0:
|
|
191
|
+
error(f"VS Code exited with code {result.returncode}")
|
|
192
|
+
|
|
184
193
|
# Give VS Code a moment to open, then send Ctrl+` to toggle terminal focus
|
|
185
194
|
time.sleep(0.5)
|
|
186
195
|
|
|
@@ -194,7 +203,13 @@ def open_file_in_vscode(file_path):
|
|
|
194
203
|
)
|
|
195
204
|
|
|
196
205
|
if autohotkey_path.exists():
|
|
197
|
-
subprocess.run([str(autohotkey_path), str(ahk_file)], check=False)
|
|
206
|
+
result = subprocess.run([str(autohotkey_path), str(ahk_file)], check=False)
|
|
207
|
+
if result.returncode != 0:
|
|
208
|
+
if not _FOCUS_WARNING_PRINTED:
|
|
209
|
+
warning(
|
|
210
|
+
f"AutoHotkey failed to send hotkey (exit code {result.returncode}). Check that AutoHotkey v2 is properly installed."
|
|
211
|
+
)
|
|
212
|
+
_FOCUS_WARNING_PRINTED = True
|
|
198
213
|
else:
|
|
199
214
|
if not _FOCUS_WARNING_PRINTED:
|
|
200
215
|
warning(
|
|
@@ -210,7 +225,13 @@ def open_file_in_vscode(file_path):
|
|
|
210
225
|
stderr=subprocess.DEVNULL,
|
|
211
226
|
check=True,
|
|
212
227
|
)
|
|
213
|
-
subprocess.run(["xdotool", "key", "ctrl+grave"], check=False)
|
|
228
|
+
result = subprocess.run(["xdotool", "key", "ctrl+grave"], check=False)
|
|
229
|
+
if result.returncode != 0:
|
|
230
|
+
if not _FOCUS_WARNING_PRINTED:
|
|
231
|
+
warning(
|
|
232
|
+
f"xdotool failed to send hotkey (exit code {result.returncode}). Check that xdotool is properly installed."
|
|
233
|
+
)
|
|
234
|
+
_FOCUS_WARNING_PRINTED = True
|
|
214
235
|
except subprocess.CalledProcessError:
|
|
215
236
|
if not _FOCUS_WARNING_PRINTED:
|
|
216
237
|
warning(
|
|
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
|