-
Timothée Floure authoredTimothée Floure authored
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 thetest
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 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.
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.