ygrader 1.1.22__tar.gz → 1.1.23__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ygrader
3
- Version: 1.1.22
3
+ Version: 1.1.23
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
@@ -3,7 +3,7 @@ from setuptools import setup
3
3
  setup(
4
4
  name="ygrader",
5
5
  packages=["ygrader"],
6
- version="1.1.22",
6
+ version="1.1.23",
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",
@@ -18,34 +18,38 @@ def clone_repo(git_path, tag, student_repo_path):
18
18
  "already cloned. Re-fetching tag",
19
19
  )
20
20
 
21
- # Fetch
22
- cmd = ["git", "fetch", "--tags", "-f"]
23
- try:
24
- subprocess.run(cmd, cwd=student_repo_path, check=True)
25
- except subprocess.CalledProcessError:
26
- print_color(TermColors.RED, "git fetch failed")
27
- return False
28
-
29
- # Checkout tag
30
- if tag not in ("master", "main"):
31
- tag = "tags/" + tag
32
- cmd = ["git", "checkout", tag, "-f"]
33
- try:
34
- subprocess.run(cmd, cwd=student_repo_path, check=True)
35
- except subprocess.CalledProcessError:
36
- print_color(TermColors.RED, "git checkout of tag failed")
37
- return False
38
- return True
21
+ if tag:
22
+ # Fetch
23
+ cmd = ["git", "fetch", "--tags", "-f"]
24
+ try:
25
+ subprocess.run(cmd, cwd=student_repo_path, check=True)
26
+ except subprocess.CalledProcessError:
27
+ print_color(TermColors.RED, "git fetch failed")
28
+ return False
29
+
30
+ # Checkout tag
31
+ if tag not in ("master", "main"):
32
+ tag = "tags/" + tag
33
+ cmd = ["git", "checkout", tag, "-f"]
34
+ try:
35
+ subprocess.run(cmd, cwd=student_repo_path, check=True)
36
+ except subprocess.CalledProcessError:
37
+ print_color(TermColors.RED, "git checkout of tag failed")
38
+ return False
39
+ return True
39
40
 
40
41
  print_color(TermColors.BLUE, "Cloning repo, tag =", tag)
41
- cmd = [
42
- "git",
43
- "clone",
44
- "--branch",
45
- tag,
46
- git_path,
47
- str(student_repo_path.absolute()),
48
- ]
42
+ if tag:
43
+ cmd = [
44
+ "git",
45
+ "clone",
46
+ "--branch",
47
+ tag,
48
+ git_path,
49
+ str(student_repo_path.absolute()),
50
+ ]
51
+ else:
52
+ cmd = ["git", "clone", git_path, str(student_repo_path.absolute())]
49
53
  try:
50
54
  subprocess.run(cmd, check=True)
51
55
  except KeyboardInterrupt:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ygrader
3
- Version: 1.1.22
3
+ Version: 1.1.23
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