I finally completed my hacktoberfest contributions. And my final contribution was on backend, which is what I was aiming for since the start of this event. This issue was very complex and took the most time to complete when compared with other issues I did for hacktoberfest.
Issue
The Issue. was about adding a new feature in a python library. The python library was an extension to the request library in python. The extension added some logging capabilities which made working with logs for request much more streamlined. Throughout this hacktoberfest series I kept saying that I am good at backend and I wanted to backend, and that is what I thought until I started working on this.
Deveplopment
I learned from my mistakes from my previous contributions. So I first analyzed the project before diving into the actual development. This project had poetry
for python packages management, 'makefile' to run commands like npm, 'new python file structure', all of which I had never used before. So the onboarding was quite challenging for me. I added a bunch of logs everywhere to understand the flow and get things started. I researched a little bit of what the logging and request libraries have because I will be building on top of these libraries. More specifically, I was supposed to add a global variable that a user can manage which will store the log level, and all of the logs that will be made on this library will follow this log level.
I found out that I can pass this as a parameter to the logging.log() function as opposed to hard code this as logging.info(). The structure to store global variables was already made, I just appended my code onto that and made everything work somehow.
PR
After the development was finally wrapped up, I made the PR. I was pretty sure I will get some reviews that I will have to address because my solution was a little hacky. And sure I did, I was suggested to use the ENUM as opposed to validating the user input using a dictionary in the setter function, so that the use can pass the enum, and there are less errors. I knew I should have implemented my logic used enum, but I just winged it. Then I had to almost scrap most of my changes and implement the logic using enums and pushed everything. It turns out I forgot to remove one of the print statements that I added for debugging. So I got another review for that, So I quickly removed it and finally its time to merge now!!!.
Conclusion
There are couple of things I learned in this final issue that I took part in. Firstly, a lot of new things about python and such dependencies projects. Secondly, things about contributing in general, like if you know that there exists a better solution just implement it, dont wait for a review to think that your in efficient solution might get past the reviewers. Lastly double check your changes to make sure you are pushing any unnecessary code.