2. Project management¶
This week I worked through Git tutorials and I developed my website to include info About me, student agreement, project idea as well as a guide to how I did some of this that will be described here.
Getting started with Git and Building Website¶
Signing into Gitlab was difficult at first because I did not have any password sent to me. Therefore I had to improvise and go to "Forgot my password" and then I set up a new password. This gave me access to my Gitlab account.
The Git session we had with our local instructor helped me to get an idea about how git really works. I was assisted in downloading git application to my laptop from Git downloads.
- I went through a Git tutorial from here in order to understand different concepts about git like A workspace, local repository, and global repository as well as other key concepts required for interacting with the repositories. for example: commands like:
- Git clone: which copies all the content from the remote repository into my computer's local folder. Additionally, it also creates a local repository.
- Git pull: which allows us to get the latest changes from the remote repository into my workspace, and updates local repository.
- Git add: used to stage all the files from the working directory in order to get them ready for commits.
- Git commit: used to publish the changes made so that they're available in the version history. It updates the local repository with the changes that have been staged.
- Git push: makes the changes made from the local repository to be updated in the remote repository.
- When working with Git there’s a remote repository which is stored on the code hosting server, and a Local repository that is on a user’s local computer. When a user wants to download the remote repository on their computer they have to clone it. After that, they can work on it from their computer so that changes made on the PC can be updated to the remote repository by using Git push. Similarly, when changes are made to the remote repository, in order to get those changes into the workspace in the PC the user needs to pull them from the remote repository.
Next, let me walk you through how I set up Git on my computer and built my website:
- I first created a public/private key pair in order for me to securely access my remote repository. From the command line of the Git application previously installed I typed:
ssh-keygen -t rsa -b 4096 -C "gachille2000@gmail.com"
The two keys got saved in C:\Users\Achille.ssh folder.
- Next, I went to that directory and copied the public key file content and went to my Git lab’s account (which is hosted by the Fabcloud server) in Settings > SSH and pasted it there. After this it shows in my account as shown below:
- After this I created a folder on my system to use for my local repository and I then configured it using the following commands:
git config --global user.name "gachille200"
git config --global user.email "gachille2000@gmail.com"
- After that, I cloned the remote repository to get all the files in my new folder by using the command:
git clone git@gitlab.fabcloud.org:academany/fabacademy/2020/labs/oulu/students/achille-gakwaya.git
the link for Git clone can be obtained from the Git project page by clicking the blue clone button then copy the content under clone with SSH.
- After this I had the files from my remote repository on my computer and then edited the file mkdocs.yml to change my web site’s name and to add my Linkedin social account’s link. Then,I staged all the files from the working directory to get them ready for commits.
git add .
- Then I committed the changes to make them available in the version history.
git commit -m "Added Website's name and Social Account"
- After making the commits I pushed all the changes to my remote repository
git push origin master
- After all this I could see the changes on my website
* Markdown is a markup language that gives output in different formats and in my case the output is HTML.
-
Mkdocs is a static site generator used by default in Fab academy to build project documentation, and Mkdocs converts the Markdown language to HTML in order to generate the websites.
-
Next I proceeded to update the website with info About me, student agreement, project idea, and a summary of the work I did for my first week. I modified the mkdocs.yml file to include my name as the site author and recently, in the reqirements.txt file, I added the statement mkdocs-material<5.0 that helped with a problem I had, where pushing changes to the remote repository was not working because there was a compatibility problem with different versions of different libraries, the rest of the files were unchanged. I used the templates provided in the docs folder from my remote repository to edit all the previously mentioned fields, I’m using Notepad to edit all the files. For example, to create the About Me page, I went to the about folder and there was a file named index and this was the one whose information was linked to the about me page on the website. Therefore, I edited the file using Notepad and used Markdown syntax to add images and paragraphs for example # is used to create a heading and * could be used to start a paragraph. The other documents are arranged in the order of weeks so it’s easy to modify the file related to the week I’m working on. Images are also saved according to weeks and put in the files folder, so to include them in the website I just need to define the path for the image. Finally, I used the Fablab Academy website to view the look of my website and then make corrections if needed. I currently use the default template.
-
Some of the challenges I faced while creating my website were that I needed to understand Markdown syntax in order to make the content readable. Additionally, at first, I used HTML to style my text but in doing so, I mixed it with Markdown and this caused some problems like some images weren’t able to be displayed correctly because both syntaxes should not be mixed, I was trying to define a URL by using both syntaxes which created an ambiguity when mkdocs was trying to make the translation. But, with the help of my local instructor, I figured it out and decided to go with Markdown now.