Adding Features and Pull Request

Week 3 OSD600 - Pull Requests 

 This week, our class took a look at each other's release from the previous week and were tasked with finding an issue or suggesting an improvement/adding a feature and then implementing that fix or improvement in the from of a  pull request. This week I decided to once again took a look at Matt's CheckMyLinks python tool. 

Finding Issues or Suggesting an Improvement

While reviewing Matt's code, I couldn't really find any issues that I could fix, so I instead I decided to look for ways I could think of to improve his tool. I had a couple ideas but the one I decided to go with was to add an option that would allow the user to save the results of the link check to a text file. I thought this would be useful so the user can have a reference of the results after leaving the command line. I left an issue request on Matt's repo and began to implement the improvement. 

Implementing Improvement  

The first thing I did when starting to code the improvement was create a branch for the changes I was going to make in my forked repo of Matt's tool. After I had done this I studied Matt's code once again so I could try to stay consistent with his coding style. One thing I had to do was read up on some of the libraries he had used because they differed from the ones I used in my python tool, specifically he used the click library to manage his command line arguments and options whereas I used the argparse library. After reading up on the click documentation I created a --savefile option and used the function Matt had created to check and output the status of link and modified it to return the string that was outputted to the command line so it could be saved to a results file. After all this was done I made a pull request and waited for feedback from Matt.  

Feedback 

Unfournately my first attempt at the pull request did not work as smoothly as it should have when Matt tried to run it. There was an issue with how the program was parsing the links file. I went back and took a look and after reading the BeautifulSoup library documentation and learning that the html-parser it uses works by isolating html tags to find links, I was able to figure out that the issue was coming form the links file I using not having closed <a> </a> tags. I added a new links file with working tags and pushed my changes to the branch I used in the pull request. 


Comments

Popular posts from this blog

Planning for Release 0.4

Release 0.2 3rd Pull Request