Software documentation

Software
Author

Esther Plomp

Published

August 28, 2022

How should you provide adequate documentation with your code to make it understandable for reusers?

In-code documentation

Comments video by Barbara Vreede

README

A README file is a text file that provides information about an open source software project, including details on how to install and use the software, as well as any dependencies or prerequisites that are required. A README file is often the first thing that users will see when they encounter an open source project, and it is an important tool for helping users understand and use the software.

A README file should contain the following information:

  1. A brief overview of the project, including its purpose and main features.

  2. Installation/usage instructions, including any dependencies or prerequisites that are required.

  3. License information

  4. Recommended citation (see Software Citation)

When the software is a bigger or on-going project, also include the following information:

  1. Contributing guidelines, if the project is open to contributions from the community.

  2. A list of any known issues or bugs, along with any workarounds or fixes that are available.

  3. Contact information for the project maintainers or developers, in case users have questions or need support.

README video by Barbara Vreede

examples:

A template to make good README.md

CodeMeta creates a minimal metadata schema for research software and code.

Reusable code

  1. List dependencies/variables on top
  2. Using a ‘main’ code calling other codes to make it more readable
  3. Add in comments at the start about what the code does, and what in/outputs are expected
  4. Use functions
  5. Make tests for the functions

Toot by Danielle Navarro @djnavarro@fosstodon.org: Just once in my life I would like to start learning a new tool and encounter structured documentation written to help a new user learn how it works, rather than a disorganised assortment of random thoughts the developer had while writing the code

More information