DEV Community

Cleo Buenaventura
Cleo Buenaventura

Posted on

Hacktoberfest 2024 - Part 1

Breaking the ice

This is my very first time participating in Hacktoberfest, and as a requirement for my open source course, I am required to successfully make 4 PRs (1 PR per week) to open source projects while also having these PRs accepted and merged. I may have the experience of collaborating with classmates and contributing to their projects, this will be my first actual open source contribution to someone outside of class. I was a bit anxious about the standards of creating issues, asking to be assigned for the issue, or how repo owners want a solution done in a specific way. So for starters, I chose a simple issue to work on.

GitHub logo surreal30 / Food-Data-Scrapper

Scrapping data for https://github.com/surreal30/Is-My-Food-Healthy

About

This repository serves as a directory to hold the web scrapping script for the the repo Is-My-Food-Healthy That app requires lots and lots of data. And entering that manually even with a team for 20 people is a mammoth task. These scripts automated it.

Why is the website url hidden?

That's a very intelligent question! Well, the reason is that I scrapped this data from a site and I am not sure of the legality. So, it' better not to mention it. And yes, that site was really really helpful.

What is missing?

Currently I am looking for sites to scrap data for ingredients, artificial colours, preservatives, etc. I am researching and looking for them. Once that is done, I will create that script for those as well and add it to this repo.

Get started

Requirements

  • Python3
  • requests library (Needs to be installed separately)
  • BeautifulSoup from bs4…

Issue #1

The first issue I worked on is to simply create a requirements.txt for the project to make it easy for users to install any packages required by the program. The slightly tricky part with this issue is that the repo owner tipped me that they use uv as their package manager, to which I have never heard of before. So, I had to do research about this package manager to ensure that generating and installing requirements.txt is compatible with uv.

PR #1

My Pull Request consists of what I accomplished and how I accomplished the task, while also interacting with the repo owner for any additional request from them.
The repo owner also provided a comment which is a nitpick based on some line I changed in the README.md. This made me realize that my prettier autoformatted the file when I saved, causing it to make changes I did not intend to make. Fortunately, the changes made affect nothing as it only added a cancellation character. This gave me the realization that not all projects use formatters, so I'm taking note to either have my formatter turned off if the project does not use it, or do research on how I can make the formatter project specific.

Top comments (0)