Skip to content

Commit

Permalink
Merge pull request #140 from esciencecenter-digital-skills/documentat…
Browse files Browse the repository at this point in the history
…ion-module-dbodor

Documentation module
  • Loading branch information
JaroCamphuijsen authored Oct 2, 2024
2 parents dfadf5b + 380743b commit fcaf31b
Show file tree
Hide file tree
Showing 6 changed files with 56 additions and 68 deletions.
15 changes: 0 additions & 15 deletions modules/documentation/ex_readme.md

This file was deleted.

40 changes: 19 additions & 21 deletions modules/documentation/ex_suitability.md
Original file line number Diff line number Diff line change
@@ -1,39 +1,33 @@
---
title: What is suitable documentation?
title: Suitable documentation
type: exercise
order: 4
---

# What is suitable documentation?
# What is suitable documentation for "your" project?

## Step 1: Choose a software project
As a group, consider the project that you worked on for your homework assignment.

Choose a software project for this exercise, preferably one you are familiar with.

If you don't have a project in mind, you can use one of the following:
## Type(s) of documentation

- [ESMValTool](https://research-software-directory.org/software/esmvaltool)
- [LitStudy](https://research-software-directory.org/software/litstudy)
- [Haddock](https://research-software-directory.org/software/haddock3)
- [worcs](https://cjvanlissa.github.io/worcs/index.html)
- [democracy-topic-modelling](https://research-software-directory.org/software/democracy-topic-modelling)
*Which type of of documentation currently exists? Is there anything missing/do you think anything is a bit over the top?*

## Step 2: Discuss type(s) of documentation

*Look at the software repository or page in the Research Software Directory*

- Is documentation for this project important? Why?
- How would you describe a useful documentation for this project?
- How can you motivate your colleagues to contribute to the documentation?

*What type of documentation seems appropriate to you?*
It is not necessary to dive too deep into the codebase/repository for this. Answer based on what you can see

- README
- Tutorial(s)
- In-code documentation
- API reference
- Overview of components
- User documentation
- Developer documentation
- Deployment documentation

*Which content would you include?*
The following (non-exhaustive) list of documentation items:

## Documentation contents

*Which of the following piees of information are/should be included, and where?*

- Purpose
- Authors
Expand All @@ -47,3 +41,7 @@ The following (non-exhaustive) list of documentation items:
- How you want to be asked questions (mailing list or forum or chat or issue tracker)
- Possibly a FAQ section
- Contribution guide

## Motivation

*How would you motivate your colleagues/researchers to contribute to the documentation?*
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: When to use which documentation?
title: Levels of documentation
type: exercise
order: 4
order: 3
---

# When to use which documentation?
Expand All @@ -13,9 +13,9 @@ two basic examples of how you can use the software.
2. A tutorial: 'Finding unusual patterns in daily average temperatures using WeatherMap'.
3. In-code documentation: Comments in her code that explain why she made certain implementation choices.
5. API reference: Detailed description of each function/class of WeatherMap.
6. Overview of components: A detailed overview of each component in the software
7. User documentation: Extensive documentation on how users can use each of the functionalities of WeatherMap
8. Naming: Logical names for functions, modules and classes so that it is immediately clear what the corresponding piece of code does
6. Overview of components: A detailed overview of each component in the software.
7. User documentation: Extensive documentation on how users can use each of the functionalities of WeatherMap.
8. Naming: Logical names for functions, modules, and classes so that it is immediately clear what the corresponding piece of code does.


For the following scenarios, which forms of documentation would you suggest Joanne to incorporate in her project:
Expand All @@ -32,4 +32,3 @@ and finds it important that when she moves on to a different job that the softwa
## Scenario C:
Joanne and her colleagues spend half of their time updating and improving WeatherMap.
They have a large community of users around the globe that depend on WeatherMap for their research.

9 changes: 6 additions & 3 deletions modules/documentation/reading.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,15 @@ order: 5

## Reusability requires good documentation

<https://book.the-turing-way.org/reproducible-research/code-reuse/code-reuse-overview>
- https://book.the-turing-way.org/reproducible-research/code-reuse/code-reuse-overview

## README
The README file is usually the first thing users/collaborators see when visiting your GitHub repository.
Use it to communicate important information about your project! For many smaller or mid-size projects, this is enough documentation.

<https://makeareadme.com>
- https://makeareadme.com>
- https://gist.github.com/jxson/1784669

## Popular tools foor building more complex documentation

<https://coderefinery.github.io/documentation/tools>
- https://coderefinery.github.io/documentation/tools
47 changes: 25 additions & 22 deletions modules/documentation/slides_documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ author: Luisa Orozco, Barbara Vreede, Jaro Camphuijsen, Carlos Martinez, Max Pau
## What is documentation?

- Provides context for your work
- Allows your collaborators and future you to understand what has been done and why
- Allows your collaborators **and future you** to understand what has been done and why

===

Expand All @@ -25,26 +25,27 @@ author: Luisa Orozco, Barbara Vreede, Jaro Camphuijsen, Carlos Martinez, Max Pau
## Why document software?

Make your software reusable:

- A user should be able to run your software in the same way as you do now
- A user should be able to install your software
- A contributor should be able to add or improve code
- A contributor should be able to add to, improve, or fix code

===

<!-- .slide: data-state="standard" -->

## Documentation types
## Documentation purpose types

Documentation can have different purposes:

User documentation
- Purpose: What does the software do?
- How can it be used: provide examples
- **User documentation**: What does the software do? How can it be used?
<!-- .element: class="fragment" data-fragment-index="1" -->

Developer documentation
- How can your software be modified or extended?
- **Developer documentation**: How can your software be modified or extended?
<!-- .element: class="fragment" data-fragment-index="2" -->

Deployment documentation
- Hardware and software requirements
- **Deployment documentation**: What hardware and software requirements are there?
<!-- .element: class="fragment" data-fragment-index="3" -->

===

Expand Down Expand Up @@ -98,7 +99,7 @@ Note:
In-code documentation:

+ Makes code more understandable
+ Explains decisions we made
+ Explains decisions that were made

===

Expand Down Expand Up @@ -196,24 +197,26 @@ They follow a standardized syntax.

## Tools

+ **Sphinx** (documentation generator)
+ **Sphinx** / **mkdocs** (documentation generator)
- creates nicely-formatted HTML pages out of .md or .rst files
- programming language independent
+ **Github pages** (deploy your documentation)
- set up inside your GitHub repository
- automatically deploys your Sphinx-generated documentation
- automatically deploys documentation generated above

===

<!-- .slide: data-state="standard" -->

## Take-home message

+ Depending on the purpose and state of the project documentation needs to meet different criteria.
+ Documentation can take different shapes:
+ Readable code
+ In-code comments
+ Docstrings
+ README files
+ Tutorials/notebooks
+ Documentation is a vital part of a project, and should be kept and created alongside the corresponding code.
Documentation is a vital part of a project, and should be kept and created alongside the corresponding code.

Depending on the purpose and state of the project documentation needs to meet different criteria.

Documentation can take different shapes:
+ Readable code
+ In-code comments
+ Docstrings
+ README files
+ Tutorials/notebooks
2 changes: 1 addition & 1 deletion modules/documentation/types-of-documentation.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Types of documentation
type: reading
order: 3
order: 2
---

# Types of documentation and when to use them
Expand Down

0 comments on commit fcaf31b

Please sign in to comment.