ygrader 1.2.2__tar.gz → 1.2.4__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.2/ygrader.egg-info → ygrader-1.2.4}/PKG-INFO +1 -1
- {ygrader-1.2.2 → ygrader-1.2.4}/setup.py +1 -1
- {ygrader-1.2.2 → ygrader-1.2.4}/ygrader/utils.py +23 -1
- {ygrader-1.2.2 → ygrader-1.2.4/ygrader.egg-info}/PKG-INFO +1 -1
- {ygrader-1.2.2 → ygrader-1.2.4}/LICENSE +0 -0
- {ygrader-1.2.2 → ygrader-1.2.4}/setup.cfg +0 -0
- {ygrader-1.2.2 → ygrader-1.2.4}/test/test_interactive.py +0 -0
- {ygrader-1.2.2 → ygrader-1.2.4}/test/test_unittest.py +0 -0
- {ygrader-1.2.2 → ygrader-1.2.4}/ygrader/__init__.py +0 -0
- {ygrader-1.2.2 → ygrader-1.2.4}/ygrader/deductions.py +0 -0
- {ygrader-1.2.2 → ygrader-1.2.4}/ygrader/feedback.py +0 -0
- {ygrader-1.2.2 → ygrader-1.2.4}/ygrader/grader.py +0 -0
- {ygrader-1.2.2 → ygrader-1.2.4}/ygrader/grades_csv.py +0 -0
- {ygrader-1.2.2 → ygrader-1.2.4}/ygrader/grading_item.py +0 -0
- {ygrader-1.2.2 → ygrader-1.2.4}/ygrader/grading_item_config.py +0 -0
- {ygrader-1.2.2 → ygrader-1.2.4}/ygrader/score_input.py +0 -0
- {ygrader-1.2.2 → ygrader-1.2.4}/ygrader/send_ctrl_backtick.ahk +0 -0
- {ygrader-1.2.2 → ygrader-1.2.4}/ygrader/student_repos.py +0 -0
- {ygrader-1.2.2 → ygrader-1.2.4}/ygrader/upstream_merger.py +0 -0
- {ygrader-1.2.2 → ygrader-1.2.4}/ygrader.egg-info/SOURCES.txt +0 -0
- {ygrader-1.2.2 → ygrader-1.2.4}/ygrader.egg-info/dependency_links.txt +0 -0
- {ygrader-1.2.2 → ygrader-1.2.4}/ygrader.egg-info/requires.txt +0 -0
- {ygrader-1.2.2 → ygrader-1.2.4}/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.4",
|
|
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",
|
|
@@ -193,7 +193,7 @@ def open_file_in_vscode(file_path):
|
|
|
193
193
|
# Give VS Code a moment to open, then send Ctrl+` to toggle terminal focus
|
|
194
194
|
time.sleep(0.5)
|
|
195
195
|
|
|
196
|
-
# Use AutoHotkey on WSL, xdotool on Linux
|
|
196
|
+
# Use AutoHotkey on WSL, osascript on macOS, xdotool on Linux
|
|
197
197
|
if is_wsl():
|
|
198
198
|
# Get the path to the .ahk file in the package
|
|
199
199
|
package_dir = pathlib.Path(__file__).parent
|
|
@@ -216,6 +216,28 @@ def open_file_in_vscode(file_path):
|
|
|
216
216
|
f"AutoHotkey not found at {autohotkey_path}. Install AutoHotkey v2 to keep terminal focus when opening files in VS Code."
|
|
217
217
|
)
|
|
218
218
|
_FOCUS_WARNING_PRINTED = True
|
|
219
|
+
elif sys.platform == "darwin":
|
|
220
|
+
# macOS: Use osascript to send Ctrl+` (toggle terminal) to VS Code
|
|
221
|
+
applescript = """
|
|
222
|
+
tell application "System Events"
|
|
223
|
+
tell process "Code"
|
|
224
|
+
keystroke "`" using control down
|
|
225
|
+
end tell
|
|
226
|
+
end tell
|
|
227
|
+
"""
|
|
228
|
+
result = subprocess.run(
|
|
229
|
+
["osascript", "-e", applescript],
|
|
230
|
+
stdout=subprocess.DEVNULL,
|
|
231
|
+
stderr=subprocess.DEVNULL,
|
|
232
|
+
check=False,
|
|
233
|
+
)
|
|
234
|
+
if result.returncode != 0:
|
|
235
|
+
if not _FOCUS_WARNING_PRINTED:
|
|
236
|
+
warning(
|
|
237
|
+
f"osascript failed to send hotkey (exit code {result.returncode}). "
|
|
238
|
+
"Make sure VS Code is granted accessibility permissions in System Preferences."
|
|
239
|
+
)
|
|
240
|
+
_FOCUS_WARNING_PRINTED = True
|
|
219
241
|
else:
|
|
220
242
|
# Check if xdotool exists
|
|
221
243
|
try:
|
|
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
|