Posted on

Spending winter making meaningful contributions

kwoc-poster

The Kharagpur Winter of Code, often abbreviated as KWoC, is an annual five week long program where students new or unknown to free and open-source software contribute to coding projects registered in the program by experienced mentors or project owners and gain experience in contributing to open source software. The program is hosted by Kharagpur Open Source Society, an independent student group at IIT Kharagpur, but is open to students of any university.

- From the MetaKGP Wiki

About Me

(and why I chose to participate in KWoC 2023)

I am Shikhar Soni, a first year Computer Science and Engineering undergraduate student at IIT Kharagpur. I like to code things that hold meaning to me and impact the communities I care about. The open-source ideology of collaborating with people fascinates me. I am an active member of MetaKGP, an open community of students working on useful projects for IIT-KGP students. KWoC was an ideal opportunity to connect with like-minded people, make contributions and improve my skills. Also, the format of KWoC is inspired by GSoC, which I aim for. Other than programming, I like to take photographs and design posters.

Projects

While selecting projects, I looked out for the ones written in Go, because I really enjoy writing in it, and some from MetaKGP, because I care deeply about them. In total, I contributed to three projects: MetaKGP-Wiki, KWoC-Backend and Chillzone.

MetaKGP-Wiki

MetaKGP-Wiki is the community wiki of IIT Kharagpur that anyone can edit. The Github repository contains the dockerized source code of the wiki, built on Mediawiki. It is very useful for finding all kinds of info about IIT-KGP.

PRs merged:

#116: Fixed backup to Dropbox script.

The backup script was not running due to Dropbox API changes. This involved checking the API documentation, writing the new script(Python) and updating a few environmental variables.

#117: Enabled error logging for MySQL container.

I had to read MySQL docker documentation and make few changes to the configuration file.

#121: Add environmental variables in README.

Wrote documentation for environmental variables which are needed to properly set up the wiki.

KWoC-Backend

The backend of KWoC website, written in Go.

PRs merged:

#186: Migrated from SQLite to Postgres in local development.

Having no prior knowledge of Postgres and Docker, I saw this as a good learning opportunity. Initially, it was unclear what tasks needed to be done to migrate to Postgres. I had to figure things out as I made progress.

I discovered the best way to set up Postgres was to use a Docker container. I followed these slides, referred to the official documentation to learn the basics of Docker, and wrote a docker-compose file. I had to change a few environmental variables for the ORM to connect to the database.

Some tests were failing after using Postgres. I learned this was due to Foreign Key Constraints in SQL. The fix was ensuring keys were also added whenever a table in the database was populated. I also moved all tests to a separate directory for better structure. I also had to update the Github Actions workflow which ran tests.

All changes also required some documentation changes(like env variables, db setup instructions) in README.

#192: Fixed swaggo documentation workflow.

The Github Actions workflow which built API documentation was failing. Finding the source of the problem took some trial and error because the errors were not clear. At the end, the fix was simple and short.

Chillzone

Another project of MetaKGP, it finds empty classrooms during class hours for students to chill. This project is exclusively for KGPians. It is one of projects which I personally find very useful in my daily life.

PRs merged:

#62: Update for Spring 2024 semester.

Updated timetable data for Spring 2024 semester. Also improved logic of matching slots from IIT-KGP ERP.

#57: Integrate with ERP login package Go.

Note: This PR was made on Dec 5, 2023, a few days before coding period started.

Earlier, to update data, cookies from ERP had to be manually added. This PR integrated chillzone to use ERP login package, which handles ERP login functionality.

Beyond(and before) KWoC

I was familiar with some of these projects before KWoC and had contributed to them. Working on them in KWoC improved my understanding of the projects. I could not complete these two issues in MetaKGP-Wiki and currently working on them. I have also had discussions with my mentors on how we can improve many aspects of the KWoC-Backend. KWoC was a boost to my open-source journey; I have only started and have a long long way to go. And I am really excited for future experiences like this.

Acknowledgement

I express my sincere gratitude to Harsh Khandeparkar, who guided me throughout the program as my mentor. Thank you for the quick replies to my queries and for the acknowledgments you gave me. Looking forward to working more on MetaKGP-Wiki and KWoC-Backend. I also thank Chirag Ghosh, for giving me a chance to work on Chillzone and ERP login package.

A big thanks to the KOSS team for organizing this program. Looking forward to more events by KOSS :)