ygrader 2.6.12__tar.gz → 2.6.13__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.
Files changed (24) hide show
  1. {ygrader-2.6.12/ygrader.egg-info → ygrader-2.6.13}/PKG-INFO +1 -1
  2. {ygrader-2.6.12 → ygrader-2.6.13}/setup.py +1 -1
  3. {ygrader-2.6.12 → ygrader-2.6.13}/ygrader/utils.py +21 -0
  4. {ygrader-2.6.12 → ygrader-2.6.13/ygrader.egg-info}/PKG-INFO +1 -1
  5. {ygrader-2.6.12 → ygrader-2.6.13}/LICENSE +0 -0
  6. {ygrader-2.6.12 → ygrader-2.6.13}/setup.cfg +0 -0
  7. {ygrader-2.6.12 → ygrader-2.6.13}/test/test_interactive.py +0 -0
  8. {ygrader-2.6.12 → ygrader-2.6.13}/test/test_unittest.py +0 -0
  9. {ygrader-2.6.12 → ygrader-2.6.13}/ygrader/__init__.py +0 -0
  10. {ygrader-2.6.12 → ygrader-2.6.13}/ygrader/deductions.py +0 -0
  11. {ygrader-2.6.12 → ygrader-2.6.13}/ygrader/feedback.py +0 -0
  12. {ygrader-2.6.12 → ygrader-2.6.13}/ygrader/grader.py +0 -0
  13. {ygrader-2.6.12 → ygrader-2.6.13}/ygrader/grades_csv.py +0 -0
  14. {ygrader-2.6.12 → ygrader-2.6.13}/ygrader/grading_item.py +0 -0
  15. {ygrader-2.6.12 → ygrader-2.6.13}/ygrader/grading_item_config.py +0 -0
  16. {ygrader-2.6.12 → ygrader-2.6.13}/ygrader/remote.py +0 -0
  17. {ygrader-2.6.12 → ygrader-2.6.13}/ygrader/score_input.py +0 -0
  18. {ygrader-2.6.12 → ygrader-2.6.13}/ygrader/send_ctrl_backtick.ahk +0 -0
  19. {ygrader-2.6.12 → ygrader-2.6.13}/ygrader/student_repos.py +0 -0
  20. {ygrader-2.6.12 → ygrader-2.6.13}/ygrader/upstream_merger.py +0 -0
  21. {ygrader-2.6.12 → ygrader-2.6.13}/ygrader.egg-info/SOURCES.txt +0 -0
  22. {ygrader-2.6.12 → ygrader-2.6.13}/ygrader.egg-info/dependency_links.txt +0 -0
  23. {ygrader-2.6.12 → ygrader-2.6.13}/ygrader.egg-info/requires.txt +0 -0
  24. {ygrader-2.6.12 → ygrader-2.6.13}/ygrader.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ygrader
3
- Version: 2.6.12
3
+ Version: 2.6.13
4
4
  Summary: Grading scripts used in BYU's Electrical and Computer Engineering Department
5
5
  Home-page: https://github.com/byu-cpe/ygrader
6
6
  Author: Jeff Goeders
@@ -4,7 +4,7 @@ setup(
4
4
  name="ygrader",
5
5
  packages=["ygrader"],
6
6
  package_data={"ygrader": ["*.ahk"]},
7
- version="2.6.12",
7
+ version="2.6.13",
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",
@@ -8,6 +8,7 @@ import subprocess
8
8
  import hashlib
9
9
  import time
10
10
  import os
11
+ import shlex
11
12
 
12
13
 
13
14
  class TermColors:
@@ -163,6 +164,26 @@ def is_wsl():
163
164
  _FOCUS_WARNING_PRINTED = False
164
165
 
165
166
 
167
+ def opener(file_path, sleep_time=1.0):
168
+ """Open a file using VS Code or a custom opener defined in the OPENER environment variable.
169
+
170
+ Parameters
171
+ ----------
172
+ file_path: pathlib.Path or str
173
+ Path to the file to open
174
+ sleep_time: float, optional
175
+ Time in seconds to wait for the editor to open (default: 1.0)
176
+ """
177
+ if "OPENER" not in os.environ:
178
+ open_file_in_vscode(file_path, sleep_time)
179
+ else:
180
+ subprocess.run(
181
+ f'{os.environ["OPENER"]} {shlex.quote(str(file_path))}',
182
+ shell=True,
183
+ check=False,
184
+ )
185
+
186
+
166
187
  def open_file_in_vscode(file_path, sleep_time=1.0):
167
188
  """Open a file in VS Code and return focus to terminal.
168
189
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ygrader
3
- Version: 2.6.12
3
+ Version: 2.6.13
4
4
  Summary: Grading scripts used in BYU's Electrical and Computer Engineering Department
5
5
  Home-page: https://github.com/byu-cpe/ygrader
6
6
  Author: Jeff Goeders
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