Skip to content

Commit bbf8d54

Browse files
committed
[mix-messy-graph] Add setup
1 parent ccca7a1 commit bbf8d54

File tree

8 files changed

+74
-0
lines changed

8 files changed

+74
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"exercise_name": "mix-messy-graph",
3+
"tags": [
4+
"git-branch",
5+
"git-merge"
6+
],
7+
"requires_git": true,
8+
"requires_github": true,
9+
"base_files": {},
10+
"exercise_repo": {
11+
"repo_type": "remote",
12+
"repo_name": "user-docs",
13+
"repo_title": "gm-user-docs",
14+
"create_fork": false,
15+
"init": null
16+
}
17+
}

mix_messy_graph/README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# mix-messy-graph
2+
3+
<!--- Insert exercise description -->
4+
5+
## Task
6+
7+
<!--- Insert exercise task, simplify what needs to be done -->
8+
9+
## Hints
10+
11+
<!--- Insert hints here -->
12+
<!---
13+
Use Github Markdown's collapsible content:
14+
<details>
15+
<summary>...</summary>
16+
...
17+
</details>
18+
-->

mix_messy_graph/__init__.py

Whitespace-only changes.

mix_messy_graph/download.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
from exercise_utils.git import merge, merge_with_message, track_remote_branch
2+
3+
4+
def setup(verbose: bool = False):
5+
remote_name = "origin"
6+
remote_branches = ["feature-search", "feature-delete", "list"]
7+
for remote_branch_name in remote_branches:
8+
track_remote_branch(remote_name, remote_branch_name, verbose)
9+
10+
merge_with_message("feature-search", False, "Merge search feature", verbose)

mix_messy_graph/tests/__init__.py

Whitespace-only changes.
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
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
from git_autograder import GitAutograderTestLoader
2+
3+
from ..verify import verify
4+
5+
REPOSITORY_NAME = "mix-messy-graph"
6+
7+
loader = GitAutograderTestLoader(__file__, REPOSITORY_NAME, verify)
8+
9+
10+
def test_base():
11+
with loader.load("specs/base.yml", "start"):
12+
pass

mix_messy_graph/verify.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
from git_autograder import (
2+
GitAutograderOutput,
3+
GitAutograderExercise,
4+
GitAutograderStatus,
5+
)
6+
7+
8+
def verify(exercise: GitAutograderExercise) -> GitAutograderOutput:
9+
# INSERT YOUR GRADING CODE HERE
10+
11+
return exercise.to_output([], GitAutograderStatus.SUCCESSFUL)

0 commit comments

Comments
 (0)