Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
## Documentation
### Doc Sprints
To ensure the best documentation of our code we meet on a weekly base for a code sprint to document everything we have
coded throughout the week and haven't been able to document properly yet. The meeting takes place in the meeting room
at 1pm. Cookies may be provided.
### General Notions about Documentation
- Don't document a language's specifics, e.g. operators.\
*Example:* Use of `=>` in the XQuery expression `replace("qbc", "q", "b") => substring(1, 2)` MUST NOT be explained in
a comment.
- It is best to use a language's structure to document.
- Write the best documentation you can.
- Documentation and variable language is American English.
- Docs should be as close to the code as possible.\
This refers both to the documentation in a repository and in the code itself, e.g. inline documentation.
- Every code repository MUST have:
- a README.md file according to [this template](https://gist.github.com/PurpleBooth/109311bb0361f32d87a2) that
contains
- link to original repository (if the software is forked or otherwise based on preexisting software)
- short introduction on what the repository is about
- a guide how to get the software running (if makes sense)
- link to demo instance
- example or demo installation
- link to license file
- contribution guide
- link to style guide
- link to bug tracker/project management system
- known issues
- badges to CI status
- a LICENSE file
### Developer Documentation
#### Software Architecture
Each software project should be documented using an architecture diagram that helps understanding its basic
functionality (even though using tools to generate diagrams such as UML class diagrams doesn't seem to be possible in
every case).\
*Examples:*
- [Generating call graphs in eXist-db](https://gitlab.gwdg.de/SADE/SADE/tree/develop/modules/callgraph)
Call diagrams can be useful to follow code and service calls and should be existing for every API method.
#### API Documentation
- The docs should comprise used parameters, author and @since annotations
- [Example for Java](https://lab.sub.uni-goettingen.de/self-updating-docs.html)
- Links to callers must not be listed in the documentation, because this info will be deprecated soon. It is strongly
recommended to use call stacks of tools like Eclipse (Java) and/or Call Graph Module (SADE).
- Document REST-APIs using [OpenAPI](https://github.com/OAI/OpenAPI-Specification) if possible.
OpenAPI docs should be located at `/doc/api` on servers.
We currently use OpenAPI for RESTXQ and JAX-RS service endpoints.
##### OpenAPI for RESTXQ
For documenting RESTXQ APIs in our eXist-db systems we use the [OpenAPI4RESTXQ](https://gitlab.gwdg.de/subugoe/openapi4restxq)
application.
It simply has to be installed in eXist-db and configured according to the [instructions](https://gitlab.gwdg.de/subugoe/openapi4restxq#use).
##### OpenAPI for CXF Java JAXRS Applications
We have not yet finished the OpenAPI documentation of our Java services, but a few tests with the [OPenAPI Feature of Apache CXF](https://cxf.apache.org/docs/openapifeature.html) have already been implemented.
The outcome of this OpenAPI documentation shall be the automated generation of API doc, to be written directly IN THE CODE as Java Annotation, using the @Operation annotation, see [example](https://github.com/apache/cxf/blob/master/distribution/src/main/release/samples/jax_rs/description_openapi_v3_spring/src/main/java/demo/jaxrs/openapi/server/Sample.java#L65) and then to be read and directly be used from within a HTML page. A automatic generation of a [OpenAPI JSON file](https://dev.textgridlab.org/1.0/tgsearch-public/info/openapi.json) should be possible to use it with a [Swagger UI HTML page frontend](https://dev.textgridlab.org/1.0/tgsearch-public/info/api-docs/?url=/1.0/tgsearch-public/info/openapi.json). The question is, if we deliver that page with every service or deploy a central Swagger UI service for all the documentation. For every service endpoint such a OpenAPI doc could be provided, such as already done for [TG-search](https://dev.textgridlab.org/1.0/tgsearch-public).
We also can combine this OpenAPI doc with our existing Sphinx API documentation (such as the [TG-search Sphinx API documentation](https://textgridlab.org/doc/services/submodules/tg-search/docs/index.html) as you can find [here](https://sphinxcontrib-openapi.readthedocs.io)).
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
#### CESSDA's Software Maturity Levels in RDD (CA1.3)
##### MUST
`MUST` be SML2, which is defined as follows:
> There is external documentation that describes public API functionality and is sufficient to be used by an
experienced developer. If available, source code is consistently and clearly commented. Source code naming conventions
are adhered to and consistent.
##### Actions to Be Taken in RDD
- provide a fully documented public API, e.g. by using OpenAPI
- naming conventions still have to be discussed --> style guide?
- reference to style guide used in the CONTRIBUTING/README file?
### Admin Documentation
- The docs should comprise how to install the software, how to run and/or restart it, how to test the installation,
...
#### CESSDA's Software Maturity Levels in RDD (CA1.2)
##### MUST
`MUST` be SML3, which is defined as follows:
> There is a deployment and configuration manual that can guide an experienced operational user through deployment,
management and configuration of the software. Exception and failure messages are explained, but descriptions of
solutions are not available. Documentation is consistent with current version of the software.
##### Actions to Be Taken in RDD
- deployment: short deployment descriptions can be provided in the README, more detailed explanations should be kept
separately (such as INSTALL(.md), linked from README)
- exception and failure messages are described in doc strings/function annotations
- function documentation should be generated automatically and made available/searchable in the web (such as
readthedocs, javadoc html, etc. pp.)
### Server Documentation
This type of documentation is provided and maintained in our DARIAH wiki space.\
We have a template encompassing all information necessary: To create a wiki page for a new server navigate to the FE
Server list, select "..." right beside the "Create" button and search for "FE-Server".
### User Documentation
This may encompass:
- how to use the software and APIs, FAQs, walkthroughs, ...
- guided tour (Bootstrap Tour) as user documentation
- for SADE portal usage (such as Fontane, BdN, Architrave)
- for complex Digital Editions
- screencasts
#### CESSDA's Software Maturity Levels in RDD (CA1.1)
##### MUST
`MUST` be SML2, which is defined as follows:
> There is external documentation that is accessible and sufficient for an expert user to configure and use the
software for the user’s individual needs. Terminology and methodology is not explained.
##### Actions to Be Taken in RDD
- a README(.md) has to be available in the source code repository (cf. [General Notions about
Documentation](#general-notions-about-documentation))
##### SHOULD
`SHOULD` be SML3, which is defined as follows:
> There is a user manual that can guide a reasonably skilled user through use and customisation of the software to the
user’s individual requirements. Documentation is consistent with current version of the software.
##### Actions to Be Taken in RDD
- a more detailed explanation is available for the user at some place (such as user guide in wikis, etc. pp.)
- docs should also be provided in a `docs` directory in the source code repository
- docs are revised regularly during our doc sprints