Monday, October 12, 2020

Lab 3 life!

 Hi everyone:

Welcome back! So Happy Thanksgiving first of all.

This week we had to do lab 3, which needed us to work on our Lab. Which lab? Wanna take a guess??

Yes! The famous URL-inspector one! 😀

We had to add two functionalities out of these four: add CLICOLOR functionality, or exiting with zero or non zero exit code, or adding a -j, --json, and/or \j flag, or adding  --all, --good, and --bad flags.

 

So firstly I chose to do the CLI COLOR one, since I already used the colors in previous labs and release 0.1. I added CLI COLOR env variable in a file called .env. In this one, the code will be displayed without colors if the CLICOLOR is defined as 0 in the .env file, and in regular colors as previously if the CLICOLOR is defined as 1. Below is the example of CLICOLOR=0

This is the example of CLICOLOR=1

 

It worked nicely! All the features had to be done in separate branches according to the issues assigned. This one was on issue-7 and with the same branch name. I committed this feature from issue-7 branch. The issue can be found here:

https://github.com/chawlapalak/Url-Inspector/issues/9

The commit associated with it:

63895ca

 I dont know why, out of habit or what, I pushed the code to my branch and went to github and  made a PR and merged it. Then I remembered, I was not supposed to do that. I reverted the changed and did it how it was supposed to be done.

Then I started with another feature of adding the exit code one, but then I changed my mind and made the final feature of using different flags to display the urls:

  • --all        : flag to display all the URLs

 

  • --good    : flag to display only good URLs

 

  •  --bad     : flag to display only bad URLs

 

 

So this feature was added in my repo:

https://github.com/chawlapalak/Url-Inspector/issues/11 

Commit associated is : 1f6ecd9

 I committed this feature from my Issue-8 branch and moved to the master branch. I merged both my branches. There were no conflicts. I tested all the code before. I then pushed everything to master origin. Then I remembered I forgot to change the readme file. I made another branch for that as prof mentioned to not do anything on the master. Even for the readme update, I did the same procedure as the coding part. And everything was completed.

I had fun in implementing this lab. Although I never wanted to work or study again after this long weekend. But everything comes to an end, so did this weekend.

See you in the next blog!

PC


No comments:

Post a Comment

Lab 9 - The last chronicle

 Hey PC readers,  Welcome back to my channel! As the name says, this is our last lab of this semester Lab 9. In the last tale of the lighten...