Assignment Submission

Please read this document carefully and follow the steps to submit your assignments. Do not forget that you also will submit your midterm exam in a similar way.

Register on GitLab

First, you need to sign up for GitLab using your student email.

Click here to go to GitLab's registration page. Fill the form. Use your student email (1234567890@ogr.btu.edu.tr for example).

Consider that you will use your username and password several times, both in the lectures and during the midterm exam. Do not forget them. Try to choose ones that are easy and quick to type.

GitLab Sign Up

Figure: Sign Up for GitLab

After, fill the related forms as follows.

GitLab Sign Up

Figure: Fill the forms as shown

GitLab Sign Up

Figure: Fill the forms as shown

Finally, click your profile picture on the top left corner, click Edit Profile, go down, and read your GitLab User ID.

GitLab Sign Up

Figure: Read the User ID on GitLab

Write your user ID in the Google Sheets document shared with you in the WhatsApp group.



Set up Your Computer for Automatic Submission

You can submit your assignments automatically by typing submitAssignment.sh. However, to use this method, you need to set up your computer first.

If you made initial setting of Ubuntu on your personal computer following the video below, you can set up your computer for automatic submission.

Video: Ubuntu initial settings for personal computers. Click here for more detail.



Submit Your Assignments

Download this script on ~/Downloads directory on your computer, and run the commands below in your assignment folder.

sudo mkdir -p /opt/soscfd/lib
sudo mv ~/Downloads/submitAssignment.sh /opt/soscfd/lib
sudo chmod +x /opt/soscfd/lib/submitAssignment.sh

To submit your assignment, run submitAssignment.sh on ~/AssignmentX/ directory. Here X is the number of your assignment. The tutorial document below is for Assighment1. If you submit another assignment, do not forget to change the 1 to the related number.

cd ~/Assignment1/
submitAssignment.sh

You will be asked to enter your information.

First, you will see an output from the script similar to as follows:

You are currently at /home/laydinbakar/Assignment1

The following files are currently located in your directory (/home/laydinbakar/Assignment1)

data  docs  README.md


Press ctrl+c to cancel.
Size is being calculated...

Please wait...


Total size of the files: 28K
Are you sure you want to submit these files? (yes/no)
yes

Check it carefully.

Next, you need to enter your student ID.

Enter your student ID (e.g., 123456789):
12345678900

Then, you need to enter your GitLab username, and GitLab password to download your repository from Dr. Aydinbakar's GitLab account.

Cloning repository https://gitlab.com/laydinbakar/12345678900.git...
Cloning into '12345678900'...
Username for 'https://gitlab.com': leventaydinbakar
Password for 'https://leventaydinbakar@gitlab.com': 
remote: Enumerating objects: 42, done.
remote: Counting objects: 100% (14/14), done.
remote: Compressing objects: 100% (12/12), done.
remote: Total 42 (delta 4), reused 0 (delta 0), pack-reused 28 (from 1)
Receiving objects: 100% (42/42), 6.97 KiB | 1.39 MiB/s, done.
Resolving deltas: 100% (8/8), done.
Repository cloned successfully.

Later, you will be asked to enter the assignment number. Write just the number 1 to 12. If you have submitted that specific assignment earlier, you will be asked to overwrite it. So you can remove everything you have submitted before and resubmit all documents.

Once you enter the assignment number, the script will upload your assignment automatically.

Which assignment are you submitting? (Please enter a number from 1 to 12):
1
You have already submitted Assignment1.
Do you want to overwrite the existing files? (yes/no)
yes
Overwriting Assignment1...
Copying assignment files into Assignment1...
sending incremental file list
./
README.md
data/
data/input.txt
data/output.txt
docs/
docs/README.md
src/
src/main.py

sent 1,286 bytes  received 134 bytes  2,840.00 bytes/sec
total size is 754  speedup is 0.53
Adding files...
Committing changes...
[main 18d1b6f] Submitting Assignment1 on 2024-10-12 15:15:16
 7 files changed, 29 insertions(+), 1 deletion(-)
 delete mode 160000 Assignment1/12345678900
 create mode 100644 Assignment1/README.md
 delete mode 100644 Assignment1/a.txt
 create mode 100644 Assignment1/data/input.txt
 create mode 100644 Assignment1/data/output.txt
 create mode 100644 Assignment1/docs/README.md
 create mode 100755 Assignment1/src/main.py
Pushing changes to GitLab...

At this last step, you will be asked to enter your username and password (of GitLab account) once more.

Username for 'https://gitlab.com': leventaydinbakar
Password for 'https://leventaydinbakar@gitlab.com': 
Enumerating objects: 12, done.
Counting objects: 100% (12/12), done.
Delta compression using up to 4 threads
Compressing objects: 100% (7/7), done.
Writing objects: 100% (10/10), 1.04 KiB | 1.04 MiB/s, done.
Total 10 (delta 1), reused 0 (delta 0), pack-reused 0
To https://gitlab.com/laydinbakar/12345678900.git
   dd414a4..18d1b6f  main -> main
Assignment1 submitted successfully!

Read the output in the terminal to be sure that you have uploaded your assignment correctly.

You can also check the GiLab in your browser to see which files you have uploaded. Go to your GitLab repository which is located https://gitlab.com/laydinbakar/12345678900 where 12345678900 must be your student ID. Finally, click on Assignment1.

GitLab Sign Up

Figure: Check your GitLab repository on a browser