Skip to content

Commit 36c745c

Browse files
committed
[exercises] Introduce new ignore type
These don't generate a subfolder and are gracefully handled by git-autograder
1 parent a12437f commit 36c745c

File tree

4 files changed

+14
-8
lines changed

4 files changed

+14
-8
lines changed

fork_repo/.gitmastery-exercise.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
"requires_github": true,
88
"base_files": {},
99
"exercise_repo": {
10-
"repo_type": "local",
10+
"repo_type": "ignore",
1111
"repo_name": "ignore-me",
1212
"repo_title": null,
1313
"create_fork": null,
1414
"init": true
1515
}
16-
}
16+
}

new-exercise.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,16 @@ def get_exercise_config() -> ExerciseConfig:
5454
tags = [] if tags_str.strip() == "" else tags_str.split(" ")
5555
requires_git = confirm("Requires Git?", True)
5656
requires_github = confirm("Requires Github?", True)
57-
exercise_repo_type = prompt("Exercise repo type (local or remote)", "local").lower()
58-
59-
if exercise_repo_type != "local" and exercise_repo_type != "remote":
60-
print("Invalid exercise_repo_type, only local and remote allowed")
57+
exercise_repo_type = prompt(
58+
"Exercise repo type (local, remote, or ignore)", "local"
59+
).lower()
60+
61+
if (
62+
exercise_repo_type != "local"
63+
and exercise_repo_type != "remote"
64+
and exercise_repo_type != "ignore"
65+
):
66+
print("Invalid exercise_repo_type, only local, remote, and ignore allowed")
6167
sys.exit(1)
6268

6369
exercise_repo_name = prompt("Exercise repo name", exercise_name.replace("-", "_"))

remote_control/.gitmastery-exercise.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"requires_github": true,
66
"base_files": {},
77
"exercise_repo": {
8-
"repo_type": "local",
8+
"repo_type": "ignore",
99
"repo_name": "ignore-me",
1010
"init": true,
1111
"create_fork": null,

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
mypy
2-
git-autograder==5.*
2+
git-autograder==6.*
33
pytest
44
repo-smith
55
PyYAML

0 commit comments

Comments
 (0)