ygrader 1.1.27__tar.gz → 1.1.28__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.1.27/ygrader.egg-info → ygrader-1.1.28}/PKG-INFO +1 -1
- {ygrader-1.1.27 → ygrader-1.1.28}/setup.py +1 -1
- {ygrader-1.1.27 → ygrader-1.1.28}/ygrader/utils.py +14 -5
- {ygrader-1.1.27 → ygrader-1.1.28/ygrader.egg-info}/PKG-INFO +1 -1
- {ygrader-1.1.27 → ygrader-1.1.28}/LICENSE +0 -0
- {ygrader-1.1.27 → ygrader-1.1.28}/setup.cfg +0 -0
- {ygrader-1.1.27 → ygrader-1.1.28}/test/test_interactive.py +0 -0
- {ygrader-1.1.27 → ygrader-1.1.28}/test/test_unittest.py +0 -0
- {ygrader-1.1.27 → ygrader-1.1.28}/ygrader/__init__.py +0 -0
- {ygrader-1.1.27 → ygrader-1.1.28}/ygrader/grader.py +0 -0
- {ygrader-1.1.27 → ygrader-1.1.28}/ygrader/grades_csv.py +0 -0
- {ygrader-1.1.27 → ygrader-1.1.28}/ygrader/grading_item.py +0 -0
- {ygrader-1.1.27 → ygrader-1.1.28}/ygrader/student_repos.py +0 -0
- {ygrader-1.1.27 → ygrader-1.1.28}/ygrader/upstream_merger.py +0 -0
- {ygrader-1.1.27 → ygrader-1.1.28}/ygrader.egg-info/SOURCES.txt +0 -0
- {ygrader-1.1.27 → ygrader-1.1.28}/ygrader.egg-info/dependency_links.txt +0 -0
- {ygrader-1.1.27 → ygrader-1.1.28}/ygrader.egg-info/requires.txt +0 -0
- {ygrader-1.1.27 → ygrader-1.1.28}/ygrader.egg-info/top_level.txt +0 -0
|
@@ -3,7 +3,7 @@ from setuptools import setup
|
|
|
3
3
|
setup(
|
|
4
4
|
name="ygrader",
|
|
5
5
|
packages=["ygrader"],
|
|
6
|
-
version="1.1.
|
|
6
|
+
version="1.1.28",
|
|
7
7
|
description="Grading scripts used in BYU's Electrical and Computer Engineering Department",
|
|
8
8
|
author="Jeff Goeders",
|
|
9
9
|
author_email="jeff.goeders@gmail.com",
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
""" ygrader utility functions"""
|
|
2
|
+
|
|
2
3
|
import pathlib
|
|
3
4
|
import sys
|
|
4
5
|
import shutil
|
|
@@ -59,8 +60,12 @@ def clang_format_code(dir_path):
|
|
|
59
60
|
cmd = ["clang-format", "-i", path]
|
|
60
61
|
try:
|
|
61
62
|
# Run clang-format twice (this shouldn't be necessary, but I've run into it with one students code -- it would be considered a bug in clang)
|
|
62
|
-
subprocess.run(
|
|
63
|
-
|
|
63
|
+
subprocess.run(
|
|
64
|
+
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, check=True
|
|
65
|
+
)
|
|
66
|
+
subprocess.run(
|
|
67
|
+
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, check=True
|
|
68
|
+
)
|
|
64
69
|
except subprocess.CalledProcessError as e:
|
|
65
70
|
print(e.output)
|
|
66
71
|
error("Clang format errored", str())
|
|
@@ -69,7 +74,11 @@ def clang_format_code(dir_path):
|
|
|
69
74
|
def names_to_dir(first_names, last_names, net_ids):
|
|
70
75
|
"""Convert first and last names to a valid filesystem directory name"""
|
|
71
76
|
return (
|
|
72
|
-
first_names[0].replace(" ", "_")
|
|
77
|
+
first_names[0].replace(" ", "_")
|
|
78
|
+
+ "_"
|
|
79
|
+
+ last_names[0].replace(" ", "_")
|
|
80
|
+
+ "_"
|
|
81
|
+
+ net_ids[0]
|
|
73
82
|
)
|
|
74
83
|
|
|
75
84
|
|
|
@@ -104,11 +113,11 @@ def verify_workflow_hash(workflow_file_path, hash_str):
|
|
|
104
113
|
"""Checks that the github workflow is valid (has 1 file and matches given hash)"""
|
|
105
114
|
|
|
106
115
|
if not workflow_file_path.is_file():
|
|
107
|
-
|
|
116
|
+
raise WorkflowHashError(f"{workflow_file_path} is missing")
|
|
108
117
|
|
|
109
118
|
workflow_dir_path = workflow_file_path.parent
|
|
110
119
|
if len(list(workflow_dir_path.glob("**/*"))) != 1:
|
|
111
|
-
|
|
120
|
+
raise WorkflowHashError(f"{workflow_dir_path} has more than one file")
|
|
112
121
|
|
|
113
122
|
hash_val = hash_file(workflow_file_path)
|
|
114
123
|
if hash_val != hash_str:
|
|
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
|