How to Create an Open Source Project on Github

Creating a new open source library or project is a great way to give back to the developer community. Those that contribute to open source projects are usually free of charge and use the projects they create or contribute to in their own projects and businesses.

This guide will help with beginning the process of setting up an account and adding a project to Github. It is geared toward an atmosphere where it is likely that there is a technical writer who helps set up a project, but users are responsible for writing any documentation.

Set a LICENSE file

The first thing you should do is choose a license for your project and ensure the license text lives in the LICENSE file. There are sadly too many projects on GitHub with a missing license and this makes it more difficult for people to use and contribute code.

If you are unsure which license to choose for your project, there are great resources online for choosing what is best for you.

Find Your Motivation

It is almost impossible to game the GitHub Trending section:

GitHub’s definition (of trending) takes into account a longer term definition of trending and uses more complex measurement than sheer number of stars which helps to keep people from farming the system.

Founders often create startups based on problems they have personally encountered. With open-sourced code, you will likely be trying to solve problems that developer commonly have.

And since gaming the GitHub Trending section is almost impossible, you need a strong motivation – a big, common developer problem – to work on. So how do you stumble onto a developer problem?

Well, for starters you can participate in hackathons, build projects, and experiment with other projects. And you will soon find something which could be made into a library, something you could make a utility out of, and so on.

Your motivation for building your project could come from anywhere. In my case, I explore new Machine Learning papers daily on arXiv (an open-access archive for papers) and read the ones I find interesting. One such paper I read motivated me to build my Python package.

Another time, I was in a hackathon training a Machine Learning model and wanted to participate in other festivities. Our team then decided to build another open-source project called TF-Watcher.

So you see, you’ll likely find all sorts of issues you can work on when you’re building a project.

And just to note – when I say you should have a strong motivation, I do not mean the project should be really huge or really complex. It could certainly be a simple project that could make developers’ lives easier.

Think about it this way: if there was a project like the one you want to develop, would you use it? If the answer is yes, you have enough motivation to build the project, regardless of the size or complexity.

Create a README.md

When you visit a GitHub repo for first time, the README.md file is rendered underneath the code. This is a fantastic opportunity to introduce your project, explain how you build the code, and explain how people can get involved and participate. Remember, .md files are Markdown files and you can use Markdown syntax to make them look all puuuuurty. OK, I admit, that was creepy.

Research Your Idea

Once you find a developer problem you want to solve and have enough motivation to start working on it, you’ll ideally want to spend quite a bit of time doing your research.

I believe it is a good practice to try and answer these questions through your research.

Does a similar project or tool already exist?

If it has not been done yet, and there’s a need for it, go ahead and start building it.

If something similar exists, is well developed, and is heavily used too, you might want to move on.

There are a huge number of open-source projects out there already, and it is quite common to find a repository doing similar stuff (more common than you would think). But you can still work on your project and make it better.

Create a CONTRIBUTING.md

In a similar fashion, the CONTRIBUTING.md file is designed to show how people can participate in a GitHub repo. When this file is present, GitHub will display a little note inviting people to learn more about contributing to your project. Users who click on that link will see the contents of CONTRIBUTING.md.

Again, this is a great opportunity to explain how people can participate. In this file you should provide simple step-by-step instructions for how prospective community members can clone and build the code, explore issues/features to work on, fork the code, contribute back their changes, and which communication channels they can use for help and support.

If something similar does exist, can your project make it better?

If something similar exists, your goals could be to make it more modular or more efficient. You could try implementing it in some other language or improve it in any other number of ways.

A great way to do so is to take a look at the issues for the existing repository. Try doing your research with existing solutions (if there are any) and find out what aspect of the project could possibly be improved. Your work could even be a derivative of the other project.

In my case, as I mentioned, I took inspiration from an interesting research paper I read (Fastformer: Additive Attention Can Be All You Need). I also discovered an official code implementation and a community implementation of the paper, both in PyTorch.

Label bugs as ‘Bitesize’

One of the most difficult areas for a new potential contributor to get started in is learning what they can work on to help with a project. Of course, the list of issues is often a good place to start, but many issues are riddled with context and nuance which can make this difficult.

A simple solution to this is to create a Bitesize label that you can apply to bugs that would be simple for beginners—this could include minor UI issues, string issues, translations fixes, and more. Simply label these bugs when you triage them and then provide a URL in your README.md and CONTRIBUTING.md files to point prospective contributors at the list to get started.

Conclusion

This article breaks down the process of creating an open source project on Github for users who have no prior experience.

0 Comments

No Comment.