A README is a text file (often .md
or .rst
) that introduces and explains a project. The README is often the first document a user or develop will encounter when first learning about your package. Consequently, it needs to contain information that will allow them to:
There are other useful items that you can include to increase user/developer trust (i.e. badges) or improve the learning curve to get started or get questions answered.
The README should always be in the top level directory of the package directory. This is where someone who is new to your package will start out and code hosting services such as GitHub will automatically look for your README and render it as HTML.
The template you used to create your first package alread includes a README ; however, in R you can use usethis::use_readme_md()
to automatically create a README.md
file if ones does not already exist.
A simple way to structure your README is as follows:
When looking through open source projects it is very common to see badges at the top of the README such as:
Badges like these are not required but often add a level of confidence and professionalism to a package. If you do add badges to your README the ones that are most informative include:
There are many other badges you can include.
Here are some places where you can access/reference common badges you can use in your packages:
A simple README can go a long way. Here are some great resources to learn more about producing great READMEs and also some fantastic examples:
The following is an example of a README you could use for our pet R package:
This results in a README that displays as this in Github:
The following is an example of a README you could use for our pet Python package:
This results in a README that displays as this in Github:
Identify 3 things in the above packages’ READMEs that you think is very helpful as a newcomer to that package.
Identify 3 things in the above packages’ READMEs that you think could be improved to help newcomers to that package.
Using what you’ve learned improve upon your package’s README. Be sure to do this in a feature branch and perform a pull request to the develop but have at least 2 other classmates review your pull request.