DEV Community

Roman Rezinkin
Roman Rezinkin

Posted on

DPS909 - Lab 4

For this week in open source, we were assigned to work on another students repository. We had to implement a configuration file for the students static site generator. By adding a new argument

--config or -c

, we needed to make the static site generator be able to identify this argument and look for a JSON file. The purpose of this implementation was to give the user the ability to have a central config file that contained all the arguments that they wish to execute. This would lead to a cleaner argument list when executing the program.

I began working on a-rokay SSG, which was coded in Python (same language as my SSG that I coded). This made the process of understanding the new codebase simple. Luckily enough, the codebase was filled with comments and very intuitive flow of code. I was quickly able to make changes in the main function, which added the new argument, as well as implemented the ability to read JSON files. Python made it a very simple process.

Once I made all the required changes, I submitted a PR. After a-rokay made comments, I was able to make the required changes, so that my code matches the exact specifications of how the owner prefers the code.

The same story applied to me, when a-rokay worked on my SSG to implement the configuration file. I used git commands to make a remote of his fork. I was then able to review the code, and test it. Once everything checked out I fetched the latest changes, and used git merge to merge the branch into my main branch.

Overall, this lab helped me introduce myself to git commands such as git fetch and git remote. The difficulty of the lab was about a 40%, which included the actual logic behind the JSON file reading.

Top comments (0)