Skip to content

Commit bedbb71

Browse files
jovncVikramGoyal23
andauthored
Implement exercise T4L3/sensors-diff (#149)
# Exercise Review ## Exercise Discussion #143 ## 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? - [X] 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)? --------- Co-authored-by: Vikram Goyal <[email protected]>
1 parent d320d6a commit bedbb71

File tree

12 files changed

+360
-0
lines changed

12 files changed

+360
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"exercise_name": "sensors-diff",
3+
"tags": [
4+
"git-diff"
5+
],
6+
"requires_git": true,
7+
"requires_github": true,
8+
"base_files": {
9+
"answers.txt": "answers.txt"
10+
},
11+
"exercise_repo": {
12+
"repo_type": "remote",
13+
"repo_name": "sensors",
14+
"repo_title": "gm-sensors",
15+
"create_fork": false,
16+
"init": null
17+
}
18+
}

sensors_diff/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
See https://git-mastery.github.io/lessons/diff/exercise-sensors-diff.html

sensors_diff/__init__.py

Whitespace-only changes.

sensors_diff/download.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
from exercise_utils.git import add
2+
3+
__resources__ = {
4+
"south.csv": "south.csv",
5+
"north.csv": "north.csv",
6+
"west.csv": "west.csv",
7+
}
8+
9+
10+
def setup(verbose: bool = False):
11+
add(["north.csv"], verbose)

sensors_diff/res/answers.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
Q: Which are the new values in staged files?
2+
A:
3+
4+
Q: Which are the new values in modified but unstaged files?
5+
A:
6+
7+
Q: Which files have changed from Jan 09th to Jan 15th?
8+
A:
9+
10+
Q: Which new values are new in north.csv on Jan 10th, compared to Jan 01st?
11+
A:

sensors_diff/res/north.csv

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
6841
2+
2307
3+
9754
4+
4169
5+
5823
6+
3086
7+
7590
8+
8420
9+
1679
10+
5034
11+
2918
12+
7645
13+
8301
14+
4576
15+
9208
16+
3461
17+
5789
18+
6940
19+
1235
20+
8890

sensors_diff/res/south.csv

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
7412
2+
5068
3+
8921
4+
3754
5+
2809
6+
6197
7+
4531
8+
9674
9+
1185
10+
7326
11+
5401
12+
8937
13+
2640
14+
7083
15+
5914
16+
3208
17+
8745
18+
4069
19+
1592
20+
6831

sensors_diff/res/west.csv

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
5193
2+
8042
3+
6721
4+
4389
5+
2075
6+
9510
7+
3642
8+
7281
9+
5904
10+
1837
11+
4416
12+
9032
13+
7765
14+
6208
15+
3589
16+
8471
17+
2940
18+
1683
19+
7352
20+
5129

sensors_diff/tests/__init__.py

Whitespace-only changes.

sensors_diff/tests/specs/base.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
initialization:
2+
steps:
3+
- type: commit
4+
empty: true
5+
message: Empty commit
6+
id: start

0 commit comments

Comments
 (0)