From 78553cc293ef0f0b328e9e61d4483a2c2c0e75a3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Timoth=C3=A9e=20Floure?= <timothee.floure@posteo.net>
Date: Wed, 18 Sep 2019 15:53:01 +0200
Subject: [PATCH] Add documentation for submission and grading

---
 week1/00-grading-and-submission.md | 89 ++++++++++++++++++++++++++++++
 week1/01-example.md                |  2 +-
 2 files changed, 90 insertions(+), 1 deletion(-)
 create mode 100644 week1/00-grading-and-submission.md

diff --git a/week1/00-grading-and-submission.md b/week1/00-grading-and-submission.md
new file mode 100644
index 0000000..030fbfb
--- /dev/null
+++ b/week1/00-grading-and-submission.md
@@ -0,0 +1,89 @@
+# Grading and submission
+
+## Local tests and grading
+
+Each assignment is shipped with two sets of tests:
+  * The grading tests, provided as a 'black box': you can run them
+    but are not allowed to the their content. You can run them locally (= on
+    your computer) with the `runGradingTests` SBT command. You will get the
+    full score if all the grading tests pass.
+  * The tests defined under `src/test/scala`. They can be run with the `test`
+    SBT command and you can - we encourage you to - add your owns.
+
+We also use a Continuous Integration tool to run the grading system on the
+commits you push on gitlab (explained in the next section). You can see the
+result online (under the *CI/CD > Pipeline* section of your personal gitlab
+repository) and check if your code compiles and runs properly on the grading
+environment.
+
+![images/pipeline-tab.png]
+
+The grading pipeline contains two steps:
+  * *compile*: your code does not compile for grading if the job fail.
+  * *grade*: the job results in a warning if you do not get the maximum grade
+    (10.00/10.00)
+
+You can click on the jobs to see the logs:
+
+![images/pipeline-details.png]
+
+![images/pipeline-logs.png]
+
+## Committing and pushing your code
+
+If you've read the first few chapters of [Git
+book](https://git-scm.com/book/en/v2) as recommended, you must already be
+familiar with committing and pushing, but let's go over the basics once again:
+
+At any point while working on an assignment, you can see what changes you
+haven't committed by writing:
+```shell
+git status
+```
+
+This will display the list of files you have modified since the last commit, to
+see the exact changes you made, run:
+```shell
+git diff
+```
+
+To save these changes in a commit, run: (replace `"My message"` by a message
+describing the changes since the last commit, see [How to Write a Git Commit
+Message](https://chris.beams.io/posts/git-commit/) for some tips on writing
+good commit messages)
+```shell
+git commit -am "My message"
+```
+
+You can then synchronize your local git repository with the gitlab server by
+running:
+```shell
+ git push -u origin my-example
+```
+
+(If you've already done this once, you can just do `git push` without
+arguments).  Note that there are also graphical user interfaces to interact
+with git, for example [VSCode has built-in git
+support](https://code.visualstudio.com/docs/editor/versioncontrol#_git-support).
+
+### Submission
+
+You only have to make sure your commits are pushed on gitlab and that your code
+is properly graded in the CI: your branch will be automatically snapshotted
+under the `submission-$ASSIGNMENT` tag at the deadline. Note that you cannot
+create, delete or update the `submission-*` tags by yourself.
+
+## Troubleshooting
+
+### Wrong remote address
+
+```
+Cloning into 'cs206-example'...
+GitLab: The project you were looking for could not be found.
+fatal: Could not read from remote repository.
+
+Please make sure you have the correct access rights
+and the repository exists.
+```
+
+If you get the above message, you ever used the wrong clone URL or you recently created your account on gitlab.epfl.ch, please wait 15 minutes and try again.
diff --git a/week1/01-example.md b/week1/01-example.md
index 7d738bb..b013bb7 100644
--- a/week1/01-example.md
+++ b/week1/01-example.md
@@ -213,4 +213,4 @@ Inside this file, you can type any line of code you would type in the REPL. To r
 
 ## Part 5: Submitting your Solution
 
-[Click here to learn how to submit your assignment.](todo)
+[Click here to learn how to submit your assignment.](00-grading-and-submission.md)
-- 
GitLab