Skip to content

Commit df4d90a

Browse files
authored
Fix bugs related to Tour 4 (#196)
# Exercise Review ## Exercise Discussion #194 ## Checklist - [ ] If you require a new remote repository on the `Git-Mastery` organization, have you [created a request](https://github.com/git-mastery/exercises/issues/new?template=request_exercise_repository.md) for it? - [ ] Have you written unit tests using [`repo-smith`](https://github.com/git-mastery/repo-smith) to validate the exercise grading scheme? - [X] Have you tested the download script using `test-download.sh`? - [X] Have you verified that this exercise does not already exist or is not currently in review? - [ ] Did you introduce a new grading mechanism that should belong to [`git-autograder`](https://github.com/git-mastery/git-autograder)? - [ ] Did you introduce a new dependency that should belong to [`app`](https://github.com/git-mastery/app)?
1 parent a4d4acc commit df4d90a

File tree

7 files changed

+18
-7
lines changed

7 files changed

+18
-7
lines changed

exercise_utils/test.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ def __init__(self, repo: Repo, verbose: bool) -> None:
3030
def create_start_tag(self) -> None:
3131
# TODO: Reconsider if this should be inlined within repo-smith or separated out
3232
"""Creates the Git-Mastery start tag."""
33+
assert self.repo is not None
3334
all_commits = list(self.repo.iter_commits())
3435
first_commit = list(reversed(all_commits))[0]
3536
first_commit_hash = first_commit.hexsha[:7]

hands_on/move_tags.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
import os
2-
from exercise_utils.git import tag_with_options
2+
from exercise_utils.git import (
3+
tag,
4+
tag_with_options,
5+
)
36
from exercise_utils.github_cli import (
47
get_github_username,
58
has_repo,
@@ -27,5 +30,5 @@ def download(verbose: bool):
2730
clone_repo_with_gh(full_repo_name, verbose)
2831

2932
os.chdir(LOCAL_DIR)
30-
tag_with_options("v1.0", ["HEAD~1"], verbose)
33+
tag("v1.0", verbose)
3134
tag_with_options("v0.9", ["HEAD~2", "-a", "-m", "First beta release"], verbose)

sensors_checkout/.gitmastery-exercise.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
],
66
"requires_git": true,
77
"requires_github": true,
8-
"base_files": {},
8+
"base_files": {
9+
"answers.txt": "answers.txt"
10+
},
911
"exercise_repo": {
1012
"repo_type": "remote",
1113
"repo_name": "sensors",

sensors_diff/res/answers.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,14 @@ A:
33

44
Q: Which are the new values in modified but unstaged files?
55
A:
6+
- ans1
7+
- ans2
68

79
Q: Which files have changed from Jan 09th to Jan 15th?
810
A:
11+
- ans1
12+
- ans2
13+
- ans3
914

1015
Q: Which new values are new in north.csv on Jan 10th, compared to Jan 01st?
1116
A:

sensors_diff/res/north.csv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@
1717
5789
1818
6940
1919
1235
20-
8890
20+
8890

sensors_diff/res/south.csv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@
1717
8745
1818
4069
1919
1592
20-
6831
20+
6831

view_commits/verify.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212

1313
QUESTION_ONE = "In February, who was replaced in the Wednesday duty roster?"
1414
QUESTION_TWO = "In February, who joined the Tuesday duty roster?"
15-
QUESTION_THREE = "In April, what were the new names added to the duty rosters? Give the list of names as one line, separated by spaces."
16-
QUESTION_FOUR = "In January, who were in the Tuesday duty roster? Give the list of names as one line, separated by spaces."
15+
QUESTION_THREE = "In April, what were the new names added to the duty rosters? Remove/add extra rows where appropriate."
16+
QUESTION_FOUR = "In January, who were in the Tuesday duty roster? Remove/add extra rows where appropriate."
1717

1818

1919
def verify(exercise: GitAutograderExercise) -> GitAutograderOutput:

0 commit comments

Comments
 (0)