Submitting an assignment

Before reading this page, makes sure you’ve carefully followed the Example Assignment page.

In the rest of this page, we’ll use the git branches my-example and example, if you’re submitting a different assignment, simply replace those branches by the correct ones, e.g. for the first assignment it would be my-scalashop and scalashop.

Committing and pushing your code

If you’ve read the first few chapters of Git book 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:

git status

This will display the list of files you have modified since the last commit, to see the exact changes you made, run:

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 for some tips on writing good commit messages)

git commit -am "My message"

You can then synchronize your local git repository with the gitlab server by running:

 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.

At this point, your assignment is not yet submitted! It’s just saved online, allowing you to access it from multiple machines.

Creating a Merge Request and getting your code reviewed

Background on collaborative development

When working on a git project with other developers, a typical workflow is:

  1. Clone the project
  2. Create your own branch and implement your changes there
  3. Push your commits online
  4. Create a Merge Request (also called a Pull Request sometimes) to integrate your commits into the original project.
  5. The developers of the original project will review your code, they may merge it, reject it, or ask you to make changes to it before merging it.

The submission system for this class follows a similar model, except that your assignments will be reviewed by a bot instead of a human being.

The assignment system

For each assignment you will work with two branches:

Step 1. Open a Merge Request

First, open a merge request from your my-example branch to the original example branch:

  1. Go to https://gitlab.epfl.ch/lamp/student-repositories-s19/cs206-GASPAR (where GASPAR is replaced by your EPFL username).
    • If this repository doesn’t exist and you created your gitlab account recently, please wait 15 minutes and try again.
  2. Click on Create merge request on the top-right.
  3. Click on Change branches.
  4. Set the Source branch to my-example and the Target branch to example.
  5. Click on Compare branches and continue.
  6. Scroll down and click on Submit merge request.

Step 2. Assign the bot

To grade your assignment, click on Edit next to Assignee at the top-right of the page, and select LAMP Review Bot (do not assign someone else!). At this point, the bot will comment to let you know it’s about to build your code, comment again to let you know if your code compiled successfully, and leave a final comment with your grade and detailed feedback on what tests failed, then unassign himself since its job is done.

Assignment feedback

Step 3. Respond to the feedback

If you obtained a score inferior to the maximum (10), you will be allowed to submit your assignment again:

  1. Fix your code (if you’re not sure what’s wrong, try writing more tests).
  2. Commit your changes (git commit -a).
  3. Push your changes (git push).
  4. Assign the bot again on the existing Merge Request (no need to create a new Merge Request).

Don’t forget to assign the bot again each time, otherwise your assignment won’t be re-graded!

If you submit an assignment multiple times, we will keep the best grade from all your submission as your final grade.

You’re free to submit your assignment as many times as you want before the deadline, however, just like a real developer, the review bot is a busy person: he will only give you detailed feedback once per day, the first time you assign him. If you want more feedback on your code, you’ll have to write and run your own tests.

(Once you’re done with an assignment, you can either leave the merge request open or close it, this doesn’t matter for the grading system).

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.

The review bot does not comment on my merge request

Something is wrong on our end and it’s most likely broken for everyone: you can post on Moodle and/or try again later. To try again you will need to unassign the bot and then assign it again.