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.
Top comments (0)