Summary
Highlights
The video outlines seven steps for contributing to open source: finding a project, deciding on it, reading documentation, finding work, asking for clarification, working on the project, and submitting a pull request. It highlights the importance of contributing to tools you already use, like PyTorch, but also offers external resources for finding projects.
The first step is to identify projects you frequently use that are open source. If no such projects come to mind, websites like GitHub's 'Great for new contributors', 'Up for grabs', and 'Code Triage' can help. These sites list projects suitable for beginners, often indicating active communities and manageable issues.
To determine if a project is good for new contributors, check for a license, a code of conduct, and contribution documentation. Assess the project's activity by looking at recent commits, issue creation and closure rates, and the responsiveness of maintainers to issues and pull requests, as demonstrated with the YouTube-DL library.
Before contributing, thoroughly read the project's documentation, including the README, contributing guidelines, and code of conduct. This helps in understanding the project's jargon, vision, and expected contribution process. It ensures your contributions align with the project's goals and practices.
Ways to find tasks include fixing typos in the documentation, filtering open issues by 'good first issue' labels, or searching for 'to do' comments within the codebase. For more complex tasks, engaging with existing issue discussions is crucial for clarity.
While minor fixes might not require much communication, for significant changes or new features, always inform the maintainers. If working on a specific issue, ask questions in the issue thread and state your intention to work on it to avoid duplication and ensure guidance.
To start, fork the repository to create your own copy. Then, clone your forked repository to your local machine. Before making changes, review the project's contributing guide for specific development and documentation rules. Create a new branch for your changes to keep your work isolated from the main branch.
Make your desired changes in your local branch. Before pushing, ensure your local main branch is up-to-date with the original project's main branch to avoid conflicts. Then, commit your changes with a clear message, referencing any relevant issue numbers. Finally, push your branch to your forked GitHub repository.
On GitHub, navigate to your forked repository and click 'Compare & pull request'. Ensure you are proposing changes from your branch to the original project's main branch. Fill out the pull request template, adhering to any specific patterns or information requested in the contribution documentation. You can also create a 'draft pull request' for ongoing work that needs feedback.
After submitting, be prepared for feedback, which may include comments, suggestions, or even rejection. Maintain an open and friendly attitude, as open-source communities value collaboration and learning. The goal is to contribute and grow together.