Techno Blender
Digitally Yours.

How to Start Contributing to Open Source Software | by Jeff Hale | Oct, 2022

0 84


A straightforward guide to getting involved

Getting started with open source software can feel intimidating, but it doesn’t need to. In this guide you’ll learn how to contribute to open source, no matter your experience level.

Source: pixabay.com

First let’s look at why you might want to get involved.

There are many reasons to contribute to projects that use the dominant software development model. Here are a few reasons to give back to the community that we all benefit from:

  • fix a problem for yourself or other users
  • fix a security issue
  • build a new feature
  • help users understand how something works
  • develop your skills
  • show other people what you can do

Alright, so contributing is one of those things you really should do. But not knowing how to get started can be paralyzing. Let’s make a roadmap to make things easier.

There are many ways you can contribute to open source, regardless of your skill level. Let’s start with something everyone can do right now.

Star GitHub repositories you find valuable ⭐️

GitHub is where the vast majority of open source work is done. You’ll need to make a free GitHub account, if you don’t have one.

star count on GitHub

Adding a star to a GitHub repository indicates to other people that you found a repository to be valuable. This community signaling is extremely useful, because we all need to make decisions as to which repositories to use.

Open source repositories with more use and attention generally have more feedback and more contributors. These resources lead projects to be updated so that they stay safe and relevant.

Stars are the quickest signal of value, so add a star when one is deserved.

Create an issue ⚠️

Starring a repo takes a second, while creating an issue might take a few more minutes the first time. Still, it’s not a huge lift. Filing an issue is how you alert the development team about bugs, needed documentation fixes, and feature requests.

Let’s say you think you’ve found a bug in a project. First, make sure you’ve checked the documentation and Stack Overflow and done some Google searching.

Then it’s time to head over to the GitHub repo for the project. If you don’t have a direct link handy in the docs, you can usually find the repo by Google searching “project_name GitHub”.

Click on Issues.

GitHub screenshot of Issues and PRs

Search for any open issues on the topic. You might not be the first person to have found this problem. If someone has already opened a GitHub issue about the same problem or feature request, add comments to the existing issue instead of duplicating it.

GitHub screenshot of Issues and PRs and Issues button

Let’s say you find that no one has reported your issue. Time to create one. Click on the green New issue button.

Some project repos have issue templates for you to use. If there are instructions, follow those.

issue templates

Repos without templates have blank fields for the title and description.

blank issue

Describe the problem in as much detail as you think might be helpful. If applicable, include the version of the package you’re using, the version of the programming language, and your hardware (e.g. Windows 10).

Including the full stack trace for the error is great. Take advantage of Markdown formatting to make the issue more readable. Markdown is like regular text with a few symbols added to make the formatting pretty. Here’s a quick guide. Quick tip: three backticks ``` will give you code formatting, which makes reading the stack trace much easier.

If you can create a minimum reproducible example (MRE), that’s a huge help to the folks who will try to diagnose and fix your problem. Just remember to put any code in backticks.

Please remember that open source contributors are often volunteers and busy human beings. Please be kind to them. 🙂

Let’s look at how you can contribute changes directly.

Let’s look at documentation changes first. To fix a typo or add some documentation, sometimes you can get lucky and have an edit button to click.

edit button

Then you can adjust the Markdown file in the browser.

screenshot of Markdown doc

If you’re changing formatting in the docs, you’ll likely use Markdown. Some repos are written in reStructuredText (.rst). I would avoid rst for your first documentation work, as it’s a bit harder to learn that Markdown, but if you’d like to learn rst, here’s a guide.

After you make your changes in the browser, you can create a pull request.

If you’re working on more than just a single file, you’ll want to fork the repo and clone the fork down to your machine.

If you are looking for docs files, they are often found in a docs folder. Contributing guidelines, if they exist, can help you know where to find the files. Usually they are in a folder named docs.

Then you’ll do work in your text editor, commit changes, and push them the changes to your repo. Finally, you’ll open a pull request.

If you want practice making pull requests, this repo was designed for just that!

Alright, let’s turn to our final scenario — contributing some code.

The bar is a bit higher for contributing code to a repository. You’ll need to:

  • have proficiency with the programming language used
  • create a development environment — there should be instructions
  • spend time understanding the code base
  • write tests

Here are some tips to guide you on your way.

Start small

If this is your first time contributing code, I suggest starting with a small project. A smaller project takes less time to wrap your head around. It’s also likely to have a test suite that runs faster.

Ensure the project is active

You’ll want a project that is being actively maintained. You can see how long it’s been since files were updated in the repository. If nothing’s been done for six months, whatever you do isn’t likely to get incorporated into the code base any time soon. ☹️

screenshot showing how recently code was merged

You want a quick win. Look for an issue that you think you could solve within a few hours.

Different projects are managed slightly differently. If the project has issue tags such as good first issue, those can be a fruitful place to look.

If your coding skills are strong, feel free to work on harder issues.

Follow the style guide

Many projects have a style guide. If they do, it will likely be in the Contributing docs file. Use docstrings and if you’re using Python, use type hints. Following the instructions is most of the game. 🙂

Write tests

Writing tests is a great way to make your code reliable. Tests and linting for code style will generally have to pass before your PR will be accepted.

If you have added new functionality, make sure you add instructions to the docs.

Run the tests locally and ensure everything passes. Commit your code as you go and push it to your repository. Now you’re ready to ask the maintainers to accept your contribution.

Create a PR

Click on the green New pull request button and create the PR.

open PR

Describe what your pull request does when you open it.

When you submit your pull request, tests and formatting will likely run in the cloud.

Now what?

Maybe your PR is immediately accepted. Awesome!

There’s a decent chance that you spend a bit of time waiting for someone to get back to you. Stay patient.

If it’s been a few weeks and no one has commented on your PR, asked for changes, or merged it to the Main branch, it’s okay to nicely ask if someone can take a look at it.

In GitHub, if you use @ and the maintainer’s handle, that will ping them (use judiciously). Hopefully you followed the advice above and picked a repository that is being actively maintained.

If you are asked to make changes please do so or discuss in the GitHub comment thread.

You’ve seen how to get started contributing to open source! For open source communities to thrive it takes a virtual village. With your contributions, you’re joining the community. 🎉

I hope you’ve found this guide helpful. If you have, please share it on social media so other people can find it, too.

If you want to get involved with Prefect, we’re making it easy for folks by hosting a casual #hacktoberfest. Check out some good first issues on the Prefect GitHub repo for inspiration, and submit your PR for some Prefect swag!

trees in autumn
Source: pixabay.com

Happy contributing!


A straightforward guide to getting involved

Getting started with open source software can feel intimidating, but it doesn’t need to. In this guide you’ll learn how to contribute to open source, no matter your experience level.

Source: pixabay.com

First let’s look at why you might want to get involved.

There are many reasons to contribute to projects that use the dominant software development model. Here are a few reasons to give back to the community that we all benefit from:

  • fix a problem for yourself or other users
  • fix a security issue
  • build a new feature
  • help users understand how something works
  • develop your skills
  • show other people what you can do

Alright, so contributing is one of those things you really should do. But not knowing how to get started can be paralyzing. Let’s make a roadmap to make things easier.

There are many ways you can contribute to open source, regardless of your skill level. Let’s start with something everyone can do right now.

Star GitHub repositories you find valuable ⭐️

GitHub is where the vast majority of open source work is done. You’ll need to make a free GitHub account, if you don’t have one.

star count on GitHub

Adding a star to a GitHub repository indicates to other people that you found a repository to be valuable. This community signaling is extremely useful, because we all need to make decisions as to which repositories to use.

Open source repositories with more use and attention generally have more feedback and more contributors. These resources lead projects to be updated so that they stay safe and relevant.

Stars are the quickest signal of value, so add a star when one is deserved.

Create an issue ⚠️

Starring a repo takes a second, while creating an issue might take a few more minutes the first time. Still, it’s not a huge lift. Filing an issue is how you alert the development team about bugs, needed documentation fixes, and feature requests.

Let’s say you think you’ve found a bug in a project. First, make sure you’ve checked the documentation and Stack Overflow and done some Google searching.

Then it’s time to head over to the GitHub repo for the project. If you don’t have a direct link handy in the docs, you can usually find the repo by Google searching “project_name GitHub”.

Click on Issues.

GitHub screenshot of Issues and PRs

Search for any open issues on the topic. You might not be the first person to have found this problem. If someone has already opened a GitHub issue about the same problem or feature request, add comments to the existing issue instead of duplicating it.

GitHub screenshot of Issues and PRs and Issues button

Let’s say you find that no one has reported your issue. Time to create one. Click on the green New issue button.

Some project repos have issue templates for you to use. If there are instructions, follow those.

issue templates

Repos without templates have blank fields for the title and description.

blank issue

Describe the problem in as much detail as you think might be helpful. If applicable, include the version of the package you’re using, the version of the programming language, and your hardware (e.g. Windows 10).

Including the full stack trace for the error is great. Take advantage of Markdown formatting to make the issue more readable. Markdown is like regular text with a few symbols added to make the formatting pretty. Here’s a quick guide. Quick tip: three backticks ``` will give you code formatting, which makes reading the stack trace much easier.

If you can create a minimum reproducible example (MRE), that’s a huge help to the folks who will try to diagnose and fix your problem. Just remember to put any code in backticks.

Please remember that open source contributors are often volunteers and busy human beings. Please be kind to them. 🙂

Let’s look at how you can contribute changes directly.

Let’s look at documentation changes first. To fix a typo or add some documentation, sometimes you can get lucky and have an edit button to click.

edit button

Then you can adjust the Markdown file in the browser.

screenshot of Markdown doc

If you’re changing formatting in the docs, you’ll likely use Markdown. Some repos are written in reStructuredText (.rst). I would avoid rst for your first documentation work, as it’s a bit harder to learn that Markdown, but if you’d like to learn rst, here’s a guide.

After you make your changes in the browser, you can create a pull request.

If you’re working on more than just a single file, you’ll want to fork the repo and clone the fork down to your machine.

If you are looking for docs files, they are often found in a docs folder. Contributing guidelines, if they exist, can help you know where to find the files. Usually they are in a folder named docs.

Then you’ll do work in your text editor, commit changes, and push them the changes to your repo. Finally, you’ll open a pull request.

If you want practice making pull requests, this repo was designed for just that!

Alright, let’s turn to our final scenario — contributing some code.

The bar is a bit higher for contributing code to a repository. You’ll need to:

  • have proficiency with the programming language used
  • create a development environment — there should be instructions
  • spend time understanding the code base
  • write tests

Here are some tips to guide you on your way.

Start small

If this is your first time contributing code, I suggest starting with a small project. A smaller project takes less time to wrap your head around. It’s also likely to have a test suite that runs faster.

Ensure the project is active

You’ll want a project that is being actively maintained. You can see how long it’s been since files were updated in the repository. If nothing’s been done for six months, whatever you do isn’t likely to get incorporated into the code base any time soon. ☹️

screenshot showing how recently code was merged

You want a quick win. Look for an issue that you think you could solve within a few hours.

Different projects are managed slightly differently. If the project has issue tags such as good first issue, those can be a fruitful place to look.

If your coding skills are strong, feel free to work on harder issues.

Follow the style guide

Many projects have a style guide. If they do, it will likely be in the Contributing docs file. Use docstrings and if you’re using Python, use type hints. Following the instructions is most of the game. 🙂

Write tests

Writing tests is a great way to make your code reliable. Tests and linting for code style will generally have to pass before your PR will be accepted.

If you have added new functionality, make sure you add instructions to the docs.

Run the tests locally and ensure everything passes. Commit your code as you go and push it to your repository. Now you’re ready to ask the maintainers to accept your contribution.

Create a PR

Click on the green New pull request button and create the PR.

open PR

Describe what your pull request does when you open it.

When you submit your pull request, tests and formatting will likely run in the cloud.

Now what?

Maybe your PR is immediately accepted. Awesome!

There’s a decent chance that you spend a bit of time waiting for someone to get back to you. Stay patient.

If it’s been a few weeks and no one has commented on your PR, asked for changes, or merged it to the Main branch, it’s okay to nicely ask if someone can take a look at it.

In GitHub, if you use @ and the maintainer’s handle, that will ping them (use judiciously). Hopefully you followed the advice above and picked a repository that is being actively maintained.

If you are asked to make changes please do so or discuss in the GitHub comment thread.

You’ve seen how to get started contributing to open source! For open source communities to thrive it takes a virtual village. With your contributions, you’re joining the community. 🎉

I hope you’ve found this guide helpful. If you have, please share it on social media so other people can find it, too.

If you want to get involved with Prefect, we’re making it easy for folks by hosting a casual #hacktoberfest. Check out some good first issues on the Prefect GitHub repo for inspiration, and submit your PR for some Prefect swag!

trees in autumn
Source: pixabay.com

Happy contributing!

FOLLOW US ON GOOGLE NEWS

Read original article here

Denial of responsibility! Techno Blender is an automatic aggregator of the all world’s media. In each content, the hyperlink to the primary source is specified. All trademarks belong to their rightful owners, all materials to their authors. If you are the owner of the content and do not want us to publish your materials, please contact us by email – [email protected]. The content will be deleted within 24 hours.

Leave a comment