DEV Community

Kevan Y
Kevan Y

Posted on

1

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.

Image of Quadratic

Python + AI + Spreadsheet

Chat with your data and get insights in seconds with the all-in-one spreadsheet that connects to your data, supports code natively, and has built-in AI.

Try Quadratic free

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay