Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation module #140

Merged
merged 6 commits into from
Oct 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DaniBodor these three types of documentation that were mentioned here, are more or less three high level categories of documentation divided by the audience. The things you added seem to me to be a collection of 1) different formats/implementations of documentation [README, in-code docs, API ref/docstrings (could also add a web page to this list and a printed paper/book] and 2) a shape/narrative type [tutorial, overview of components, story/narrative]. I think it might be confusing to put them all in one list, but I do like the idea of looking at these different aspects of audience/implementation/shape. For example, you could have a tutorial that describes how to deploy the software written down in a README file, or you could have an overview of components and descriptions on how to use them written down in comments in the code (not the best user documentation, I agree). What do you think about this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had put different "levels" of documentation into this list on purpose. Apart from the three high level ones, all the others are also part of the previous exercise as well as part of the "types of documentation" tab, so there should be plenty of info around.
I see how it could be confusing, but in my mind not so much so that it is preventative. I'm happy to change it though, if you disagree.

- 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
Loading