Skip to content

Commit e97ceec

Browse files
author
Michele Mesiti
committed
tools: table with comparison
to be discussed. The table tries to summarise, but too much summarisation might just result in ambiguous/debatable/wrong statements
1 parent c04a287 commit e97ceec

1 file changed

Lines changed: 136 additions & 60 deletions

File tree

content/tools.md

Lines changed: 136 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,84 @@
1111

1212
---
1313

14-
## In-code documentation
14+
## Documentation Tools: comparison
15+
16+
```{list-table} Comparison of the tools for documentation we have discussed so far
17+
:widths: 20 10 10 10 10 10 10 15
18+
:header-rows: 1
19+
:stub-columns: 1
20+
21+
* - Type
22+
- Convenient
23+
- Easy
24+
- Maintainabile
25+
- Searchable
26+
- Readable
27+
- LLM-friendly
28+
- Notes
29+
* - in-code doc
30+
- ✅✅
31+
- 🟨
32+
- ✅🟨
33+
- 🟨
34+
- ❌
35+
- ✅🟨
36+
- ❌for users
37+
* - README
38+
- ✅
39+
- ✅
40+
- ✅🟨
41+
- 🟨
42+
- ✅
43+
- ✅
44+
- typically enough
45+
* - HTML Generators
46+
- 🟨
47+
- ❌
48+
- ✅🟨
49+
- ✅
50+
- ❌
51+
- ✅✅
52+
- powerful
53+
* - Wikis
54+
- 🟨
55+
- ✅
56+
- ❌❌
57+
- ✅
58+
- ✅
59+
- ❌
60+
- ✅for non-programmers
61+
* - Latex
62+
- 🟨(?)
63+
- ❌
64+
- ❌🟨
65+
- 🟨
66+
- ✅ (?)
67+
- ❌
68+
- ✅Physics/Math,
69+
❌copy/paste
70+
* - Jupyter
71+
- 🟨
72+
- 🟨/❌
73+
- ✅✅
74+
- 🟨 (?)
75+
- ✅
76+
- 🟨
77+
- ✅ validation tooling
78+
```
79+
80+
What do we mean?
81+
- **Convenience**: for programmers who live in code.
82+
- **Easiness**: how easy is is to contribute and set up?
83+
- **Maintainability** is good for those tools that can be version-controlled along with the code.
84+
It is even better if it is easy to check automatically that the information is correct
85+
(*does the output of a snippet of code match what is shown in the docs?*)
86+
- **Searchability:** How easy is it to find the information we need?
87+
- **Readability**: Can the documentation be rendered in a way that makes it easy to read?
88+
- **LLM-friendliness**: how easy is to feed this documentation to an LLM?
89+
90+
91+
### In-code documentation
1592

1693
- Comments, function docstrings, ...
1794
- Advantages
@@ -24,8 +101,7 @@
24101
For a closer look at this see the {ref}`in-code-documentation` episode.
25102

26103
---
27-
28-
## README files
104+
### README files
29105

30106
- Advantages
31107
- Versioned (goes with the code development)
@@ -39,44 +115,31 @@ For a closer look at this see the {ref}`writing-readme-files` episode.
39115

40116
---
41117

42-
## Plain Text formats: reStructuredText and Markdown
43-
44-
```markdown
45-
# This is a section in Markdown This is a section in RST
46-
========================
47-
48-
## This is a subsection This is a subsection
49-
--------------------
50-
51-
Nothing special needed for Nothing special needed for
52-
a normal paragraph. a normal paragraph.
118+
### Wikis
53119

54-
::
120+
- Popular solutions (but many others exist):
121+
- [MediaWiki](https://www.mediawiki.org)
122+
- [Dokuwiki](https://www.dokuwiki.org)
123+
- Advantage
124+
- Barrier to write and edit is low
125+
- Disadvantages
126+
- Typically disconnected from source code repository (**reproducibility**)
127+
- Difficult to serve multiple versions
128+
- Difficult to check out a specific old version
129+
- Typically needs to be hosted and maintained
55130

56-
This is a code block This is a code block
57131

58132

59-
**Bold** and *emphasized*. **Bold** and *emphasized*.
60133

61-
A list: A list:
62-
- this is an item - this is an item
63-
- another item - another item
134+
---
64135

65-
There is more: images, There is more: images,
66-
tables, links, ... tables, links, ...
67-
```
68-
69-
- Two of the most popular lightweight markup languages.
70-
- reStructuredText (RST) has more features than Markdown but the choice is a matter of taste.
71-
- There are (unfortunately) [many flavors of Markdown](https://github.com/jgm/CommonMark/wiki/Markdown-Flavors).
72-
- Motivation to stick to a standard text-based format: **They make it easier to move the documentation to other tools
73-
which also expect a standard format, as the project/organization grows**.
74-
- We use [MyST](https://myst-parser.readthedocs.io/en/latest/)
75-
flavored Markdown in the {ref}`sphinx` episode and the
76-
{ref}`gh-pages` example.
77-
- Nice resource to learn Markdown: [Learn Markdown in 60 seconds](https://commonmark.org/help/)
78-
- [Pandoc](https://pandoc.org/) can convert between MD and RST (and many other formats).
136+
### LaTeX/PDF
79137

138+
- Advantage
139+
- Popular and familiar in the physics and mathematics community
140+
- Disadvantages
141+
- PDF format is not ideal for copy-pasting of examples
142+
- Possible, but not trivial to automate rebuilding documentation after every Git push
80143

81144

82145
---
@@ -95,7 +158,7 @@ These tools offer some or all of these features:
95158
(if you can download )
96159
- **Validation**: check that the code snipped in the documentation
97160
match the real behaviour of the code.
98-
- **Continous checks**: regenerate automatically every time you save, so that you can catch errors early
161+
- **Continuous checks**: regenerate automatically every time you save, so that you can catch errors early
99162

100163
````{tabs}
101164
```{group-tab} Python
@@ -129,7 +192,7 @@ These tools offer some or all of these features:
129192
- Uses RMarkdown and a LaTeX-like syntax
130193
- **Search:**
131194
- client-side (Javascript that runs in browser - fuse.js)
132-
- also typically avaiable in RStudio
195+
- also typically available in RStudio
133196
134197
Long-Form Documentation for R is typically contained in [vignettes](https://r-pkgs.org/vignettes.html).
135198
@@ -192,12 +255,8 @@ These tools offer some or all of these features:
192255
```
193256
````
194257

195-
```{discussion}
196-
197-
Do you know an awesome tool or feature that should be in this list?
198-
Let us know! (Open a PR)
258+
---
199259

200-
```
201260

202261
## Hosting Documentation on the Web
203262

@@ -210,37 +269,54 @@ GitHub, GitLab, and Bitbucket make it possible to serve HTML pages:
210269
and can be [connected](https://docs.readthedocs.com/platform/latest/reference/git-integration.htm)
211270
to common software forges.
212271

272+
273+
274+
```{discussion}
275+
276+
Do you know an awesome tool or feature that should be in this list?
277+
Let us know! (Open a PR)
278+
279+
```
280+
213281
---
214282

215-
## Wikis
283+
### Plain Text formats: reStructuredText and Markdown
216284

217-
- Popular solutions (but many others exist):
218-
- [MediaWiki](https://www.mediawiki.org)
219-
- [Dokuwiki](https://www.dokuwiki.org)
220-
- Advantage
221-
- Barrier to write and edit is low
222-
- Disadvantages
223-
- Typically disconnected from source code repository (**reproducibility**)
224-
- Difficult to serve multiple versions
225-
- Difficult to check out a specific old version
226-
- Typically needs to be hosted and maintained
285+
```markdown
286+
# This is a section in Markdown This is a section in RST
287+
========================
227288

289+
## This is a subsection This is a subsection
290+
--------------------
228291

292+
Nothing special needed for Nothing special needed for
293+
a normal paragraph. a normal paragraph.
229294

295+
::
230296

231-
---
297+
This is a code block This is a code block
232298

233-
## LaTeX/PDF
234299

235-
- Advantage
236-
- Popular and familiar in the physics and mathematics community
237-
- Disadvantages
238-
- PDF format is not ideal for copy-pasting of examples
239-
- Possible, but not trivial to automate rebuilding documentation after every Git push
300+
**Bold** and *emphasized*. **Bold** and *emphasized*.
240301

302+
A list: A list:
303+
- this is an item - this is an item
304+
- another item - another item
241305

306+
There is more: images, There is more: images,
307+
tables, links, ... tables, links, ...
308+
```
242309

243-
---
310+
- Two of the most popular lightweight markup languages.
311+
- reStructuredText (RST) has more features than Markdown but the choice is a matter of taste.
312+
- There are (unfortunately) [many flavors of Markdown](https://github.com/jgm/CommonMark/wiki/Markdown-Flavors).
313+
- Motivation to stick to a standard text-based format: **They make it easier to move the documentation to other tools
314+
which also expect a standard format, as the project/organization grows**.
315+
- We use [MyST](https://myst-parser.readthedocs.io/en/latest/)
316+
flavored Markdown in the {ref}`sphinx` episode and the
317+
{ref}`gh-pages` example.
318+
- Nice resource to learn Markdown: [Learn Markdown in 60 seconds](https://commonmark.org/help/)
319+
- [Pandoc](https://pandoc.org/) can convert between MD and RST (and many other formats).
244320

245321

246322
```{keypoints}

0 commit comments

Comments
 (0)