DEV Community

Qiwen Yu
Qiwen Yu

Posted on

2

Hacktoberfest: Ploomber Project "add venv directory to .gitignore"

Introduction

This is my second contribution to an open source project. This contribution required to write code and a corresponding unitest. Meanwhile, since this issue is a bit more complicated, it also required a contributor to have a better communication with the project maintainer, and to closely follow the contributing guidance in the documentation.

Project

I chose the ploomber project, which is an opensource project to help write maintainable, production-ready pipelines using Jupyter or your favorite text editor. Develop locally, deploy to the cloud.

Issue

The issue was raised here, this is to automatically add the venv directory to .gitignore to prevent it from being committed. Interestingly, the project maintainer made a mistake initially. Thus, the requirement of this issue has changed, according to this comment.

Challenge

The most challenge part of this issue was having a good understanding of the architectures and designs of this project at both big-picture and function levels. Only in this way, the code added by me can merged smoothly into the original code. Also, the corresponding unitest must be provided.

Solution and Pull Request

I solved this issue by using existing functions in this project and adding several lines of code, together with a proper unitest function. The original code in the source code provide a class to do this task. I generated a commit. The unitest uses assert to make sure only one line was added to the .gitignore. The PR can be found here.

Speedy emails, satisfied customers

Postmark Image

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay