Modern Github Badges For Open Source Repositories

Sulstice
5 min readMar 5, 2022

--

Badges have been around on Github for a long time, but how to use them correctly is often misunderstood. So in my experience here is my standard for something more “Professionally” Open Source. I will use my GlobalChem as the representative.

The license badge, choosing your license isn’t as easy as you think it is. Know what you are choosing before you pick it. I choose Mozilla Public License because it encourages modifications to the lists to be continued to be open source. MIT wouldn’t provide that and for me this particular project requires it. Always include it, because it is necessary for people that work in the open source legal field that use the software.

[![License: MPL 2.0](https://img.shields.io/badge/License-MPL%202.0-brightgreen.svg)](https://opensource.org/licenses/MPL-2.0)

Documentation is important and I actually place this badge further in my repository in the README. So it doesn’t get lost in the badges and it is “clickable”.

[![Documentation](https://img.shields.io/badge/GitBook-Docu-lightblue)](https://sulstice.gitbook.io/globalchem-your-chemical-graph-network/)

I put a website badge for quick folk that just want to explain something pretty with a visualizer as to what is going on. It is good for marketing but nothing else haha. The real meat is in the code. But a good badge to have.

[![Website shields.io](https://img.shields.io/website-up-down-green-red/http/shields.io.svg)](http://www.chemicalgraphtheory.com)

I put the Python version, but just ones I know have been thoroughly tested. I am confident that it runs in Python 3.6, be honest about that.

![Python](https://img.shields.io/badge/python-3.6-blue.svg)

I use the travis continuous integration (CI) platform for open source testing. It is free for public Github repositories. And it’s imperative for the users to have some confidence there are tests. My tests actually do let me know when deployment or the functionality is unstable. If you write good tests, this badge is actually the most useful one.

[![Build Status](https://app.travis-ci.com/Sulstice/global-chem.svg?branch=master)](https://app.travis-ci.com/Sulstice/global-chem)

Similarly, I have coverage of how much code I have tested. Some people strive for the 99%, but I am one lone developer, you can only do so much. Again, be honest. I use coveralls to report the tests, again free for open source.

[![Coverage Status](https://coveralls.io/repos/github/Sulstice/global-chem/badge.svg?branch=master)](https://coveralls.io/github/Sulstice/global-chem?branch=master)

This particular repository is essentially a makeshift graph database and I am hoping it grows in size. I would like folk to know how large the dataset is before they download the full thing.

![Repo Size](https://img.shields.io/github/repo-size/Sulstice/global-chem)

The distribution package is really important for me, I am updating this regularly and I need to know what versions are being tracked and stable. I often forget because there is a lot of software in the world. I use python’s distribution PyPi for packaging and it keeps track for me what dist package is being released.

[![PyPI version](https://badge.fury.io/py/global-chem.svg)](https://badge.fury.io/py/global-chem)

A DOI is important if you want to mark your repository with some unique identifier. Zenodo is probably your best in open source. It is important to back your work with some official link especially in the open source world. I DOI everything so it also has a reference point if used in an academic paper.

[![DOI](https://zenodo.org/badge/259046250.svg)](https://zenodo.org/badge/latestdoi/259046250)

This is just because I want people to know I am friendly and welcome feedback. I work hard.

[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)

I have a certain way I like to write code, and I try to keep it in that way. PEP8 standards best align with my own so I put this badge for anyone contributing loosely follow those guidelines. I’m hoping this badge encourages developers there is some standard set in and not just loose code.

[![PEP8](https://img.shields.io/badge/code%20style-pep8-orange.svg)](https://www.python.org/dev/peps/pep-0008/)

I use FOSSA, to keep track of any additional dependencies that I have with my extensions package and their respective licensing. I need to cover my bases and make sure I don’t infringe on anyone. Software can be delicate place to navigate especially open source. FOSSA will scan each dependency and notify you with confidence. This helps when you have 340 python package dependencies in the extensions..

[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2FSulstice%2Fglobal-chem.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2FSulstice%2Fglobal-chem?ref=badge_shield)

This is for the business in me. You should know the level of your own software and your own versioning model. I released the version 1.0.0 and a more stable release 1.5.2. I am well aware where my own software stands in development so I classify it as such with a maturity model so the public knows it’s still prototyping.

[![Maturity badge - level 2](https://img.shields.io/badge/Maturity-Level%202%20--%20First%20Release-yellowgreen.svg)](https://github.com/tophat/getting-started/blob/master/scorecard.md)

The last one is because I am proud of this metric and it comes from pepy. Helps me convince my advisor that this is worth it.

[![Downloads](https://pepy.tech/badge/global-chem)](https://pepy.tech/project/global-chem)

And that’s my full list for an official open source project.

--

--

Sulstice
Sulstice

No responses yet