You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Updating contributing guide:
- Change order in "Getting started" section to promote self-review
before push
- Clarify Review Process section, confusing use of owner term?
- Images: screenshots vs diagrams, promoting diagrams as code :)
Fun facts worth noting:
- The contributing guide for updating the contributing guide is the same
contributing guide
- Some contributions to the contributing guide could eventually be both
a violation and an improvement of the guide
---------
Co-authored-by: Mikael Simberg <[email protected]>
Co-authored-by: Ben Cumming <[email protected]>
Copy file name to clipboardExpand all lines: docs/contributing/index.md
+77-29Lines changed: 77 additions & 29 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ This means that everybody, CSCS staff and the CSCS user community can contribute
7
7
8
8
We use the GitHub fork and pull request model for development:
9
9
10
-
* First create a fork of the [main GitHub repository](https://github.com/eth-cscs/cscs-docs).
10
+
* First create a [fork](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo) of the [main GitHub repository](https://github.com/eth-cscs/cscs-docs).
11
11
* Make all proposed changes in branches on your fork - don't make branches on the main repository (we reserve the right to block creating branches on the main repository).
12
12
13
13
Clone your fork repository on your PC/laptop:
@@ -18,46 +18,52 @@ cd cscs-docs
18
18
# create a branch for your changes (here we are fixing the ssh docs)
19
19
git switch -c 'fix/ssh-alias'
20
20
# ... make your edits ...
21
-
# add and commit your changes
22
-
git add <files>
23
-
git commit -m 'update the ssh docs with aliases for all user lab vclusters'
24
-
git push origin 'fix/ssh-alias'
25
21
```
26
-
Then navigate to GitHub, and create a pull request.
27
22
28
-
The `serve` script in the root path of the repository can be used to view the docs locally:
23
+
Review your edits checking the [Guidelines][ref-contributing-guidelines] section below.
24
+
25
+
!!! note
26
+
Note that a simple editor markdown preview may not render all the features of the documentation.
27
+
28
+
To properly review the docs locally, the `serve` script in the root path of the repository can be used as shown below:
29
29
```bash
30
30
./serve
31
31
...
32
32
INFO - [08:33:34] Serving on http://127.0.0.1:8000/
33
33
```
34
-
This generates the documentation locally, which can be viewed using a local link, which is `http://127.0.0.1:8000/` by default.
35
-
The documentation will be rebuilt and the webpage reloaded when changed files are saved.
36
34
37
35
!!! note
38
36
To run the serve script, you need to first install [uv](https://docs.astral.sh/uv/getting-started/installation/).
39
37
40
-
To build the docs in a `site` sub-directory:
38
+
You can now open your browser at the address shown above (`http://127.0.0.1:8000/`). The documentation will be automatically rebuilt and the webpage reloaded on each file change you save.
39
+
40
+
After your first review, commit and push your changes
41
41
```bash
42
-
./serve build
42
+
git add <files>
43
+
git commit -m 'update the ssh docs with aliases for all user lab vclusters'
44
+
git push origin 'fix/ssh-alias'
43
45
```
44
46
47
+
Then navigate to GitHub, and create a pull request.
48
+
45
49
!!! tip
46
50
If you've already created a fork repository, make sure to [keep it synced](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork) to the main CSCS repository before making further change.
47
51
48
52
## Review process
49
53
50
-
Documentation is owned by everybody - so don't be afraid to jump in and make changes or fixes where you see that there is something missing or outdated.
54
+
Documentation is maintained by everybody - so don't be afraid to jump in and make changes or fixes where you see the need or the potential.
51
55
52
-
If you plan to make large changes or contributions, please discuss them with the documentation owners beforehand, to make sure that the documentation will fit into the larger documentation structure.
56
+
If you plan to make significant changes, please discuss them with an [issue](https://github.com/eth-cscs/cscs-docs/issues)beforehand, to ensure the changes will fit into the larger documentation structure.
53
57
54
-
If the documentation that you write or update might affect multiple stakeholders, ping them for a review.
55
-
If you don't get a timely reply, ask the documentation owners for a review or for permission to merge.
58
+
If you think your documentation update could affect specific stakeholders, ping them for a review.
59
+
The same applies if you are not getting get a timely reply for your pull request.
60
+
You can get some hints of whom to contact by looking at [CODEOWNERS](https://github.com/eth-cscs/cscs-docs/blob/main/.github/CODEOWNERS).
56
61
57
62
!!! note
58
63
To minimise the overhead of the contributing to the documentation and speed up "time-to-published-docs" we do not have a formal review process.
59
64
We will start simple, and add more formality as needed.
60
65
66
+
[](){#ref-contributing-guidelines}
61
67
## Guidelines
62
68
63
69
### Links
@@ -89,11 +95,11 @@ Instead, we advocate adding unique references to sections.
89
95
90
96
=== "adding a reference"
91
97
92
-
Add a reference above the item, in this case we want to link to the section with the title `## The Fast Server`:
98
+
Add a reference above the item, in this case we want to link to the section with the title `## The fast server`:
93
99
94
100
```
95
-
[](){#ref-servers-fast}
96
-
## Fast Server
101
+
[](){#ref-fast-server}
102
+
## Fast server
97
103
```
98
104
99
105
Use the `[](){#}` syntax to define the reference/anchor.
@@ -106,7 +112,7 @@ Instead, we advocate adding unique references to sections.
106
112
In any other file in the project, use the `[][]` syntax to refer to the link (note that this link type uses square braces, instead of the usual parenthesis):
107
113
108
114
```
109
-
[the fast server][ref-servers-fast]
115
+
[the fast server][ref-fast-server]
110
116
```
111
117
112
118
The benefits of this approach are that the link won't break if
@@ -116,18 +122,60 @@ The benefits of this approach are that the link won't break if
116
122
117
123
### Images
118
124
125
+
> A picture is worth a thousand words
126
+
127
+
We encourage the usage of images to improve clarity and understanding. You can use **screenshots** or **diagrams**.
128
+
119
129
Images are stored in the `docs/images` directory.
120
130
121
-
*there are sub-directories in the `docs/images` path - create a new sub-directory for your images if appropriate
122
-
* choose image and path names that make sense - `screenshot.png` is not a great file name. Neither is `PX-202502025-imgx.png`.
131
+
* create a new sub-directory for your images if appropriate
132
+
* choose a path and file name that hint what the image is about - neither `screenshot.png` nor `PX-202502025-imgx.png` are great names.
123
133
124
-
!!! tip
125
-
When providing a screenshot, do you need to show the whole screen, or just part of one window?
134
+
!!! warning
135
+
Keep the size of your images to a minimum because we want to keep an overall lightweight repository.
126
136
127
-
Cropping the image will decrease file size, and might also draw the readers attention to the most relevant information.
128
137
129
-
!!! tip
130
-
Do you need a screenshot, or can a text description also work?
138
+
#### Screenshots
139
+
140
+
Screenshots can help readers follow steps on guides. Think if you need to show the whole screen or just part of one window. Cropping the image will decrease file size, and might also draw the readers attention to the most relevant information.
141
+
142
+
Often, screenshots can quickly become obsolete, so you may want to complement (or maybe even replace) some with text descriptions.
143
+
144
+
#### Diagrams
145
+
146
+
Diagrams can help readers understand more abstract concepts like processes or architectures. We suggest you use [mermaid](https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/creating-diagrams#creating-mermaid-diagrams). Such format makes diagrams easy to maintain and removes the need to commit image files in the repository.
147
+
148
+
??? "Example"
149
+
150
+
=== "Source"
151
+
152
+
````text
153
+
```mermaid
154
+
graph TD;
155
+
Image(Will image add value?);
156
+
Image--NO-->T(keep text only);
157
+
Image--YES-->SD(What image is needed?)
158
+
SD--Screenshot-->S(keep it lean)
159
+
SD--Diagram-->D(keep it maintainable)
160
+
D--Default-->M(Mermaid)
161
+
D--Custom-->DR(Draw.io)
162
+
```
163
+
````
164
+
165
+
=== "Rendered"
166
+
167
+
```mermaid
168
+
graph TD;
169
+
Image(Will image add value?);
170
+
Image--NO-->T(keep text only);
171
+
Image--YES-->SD(What image is needed?)
172
+
SD--Screenshot-->S(keep it lean)
173
+
SD--Diagram-->D(keep it maintainable)
174
+
D--Default-->M(Mermaid)
175
+
D--Custom-->DR(Draw.io)
176
+
```
177
+
178
+
If you need more hand-crafted diagrams, we suggest you use [draw.io](https://www.drawio.com/). Make sure you export the png with the [source inside](https://www.drawio.com/doc/faq/export-to-png), typically a `file.drawio.png`, so it can be extended in the future as needed.
131
179
132
180
### Text formatting
133
181
@@ -193,7 +241,7 @@ At the top of each page there is an "edit" icon :material-pencil:, which will op
193
241
Once your changes are ready, click on the "Commit changes..." button in the top right hand corner of the editor, and add at least a description commit message.
194
242
195
243
!!! tip
196
-
See [the GitLab official guide on editing files](https://docs.github.com/en/repositories/working-with-files/managing-files/editing-files) for a step-by-step walkthrough.
244
+
See [the GitHub official guide on editing files](https://docs.github.com/en/repositories/working-with-files/managing-files/editing-files) for a step-by-step walkthrough.
197
245
198
246
!!! note
199
247
Use the default option **Create a new branch for this commit and start a pull request**.
@@ -230,10 +278,10 @@ They stand out better from the main text, and can be collapsed by default if nee
230
278
!!! example "Example one"
231
279
This is an example.
232
280
The title of the example uses [sentence case](https://en.wikipedia.org/wiki/Letter_case#Sentence_case).
233
-
281
+
234
282
??? note "Collapsed note"
235
283
This note is collapsed, because it uses `???`.
236
-
284
+
237
285
If an admonition is collapsed by default, it should have a title.
0 commit comments