DEV Community

Kevan Y
Kevan Y

Posted on

Lab 4 - Adding config option for other student repo

Intro

For my fourth lab, we have to implement 1 feature to another student Static site generator CLI. The feature is to add support --config with Config File. I found a repo in python from lmpham1. I started to create an Issue #15 letting him know that I'm adding this feature to his code.

Implementation

I started to folk, clone his repo, and created a new branch for that issue.
The way am I going to implement is to check if the config option has some arguments. If it doesn't check if the file is correct json. After that loading the json file and overwrite the arguments for the other option, so in this way, it will skip the other option.

After implementing my code I run some tests on my side when everything looks good. I commit, then push to remote then created a Pull Request #16. lmpham1 found a small bug in my code where I have to check correctly if it was a json file. After fixing it and pushed to the remote. lmpham1 merged my PR and the issue that was linked to it was closed automatically.

Top comments (0)