Skip to content

Commit 01e97c2

Browse files
committed
Merge branch 'main' into wrf
2 parents 696758e + 51f0e98 commit 01e97c2

File tree

3 files changed

+116
-32
lines changed

3 files changed

+116
-32
lines changed

.github/actions/spelling/allow.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,7 @@ santis
258258
sbatch
259259
scalapack
260260
screenshot
261+
screenshots
261262
slepc
262263
slurm
263264
smartphone

docs/contributing/index.md

Lines changed: 108 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ This means that everybody, CSCS staff and the CSCS user community can contribute
88

99
We use the GitHub fork and pull request model for development:
1010

11-
* First create a fork of the [main GitHub repository](https://github.com/eth-cscs/cscs-docs).
11+
* 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).
1212
* 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).
1313

1414
Clone your fork repository on your PC/laptop:
@@ -19,46 +19,83 @@ cd cscs-docs
1919
# create a branch for your changes (here we are fixing the ssh docs)
2020
git switch -c 'fix/ssh-alias'
2121
# ... make your edits ...
22-
# add and commit your changes
23-
git add <files>
24-
git commit -m 'update the ssh docs with aliases for all user lab vclusters'
25-
git push origin 'fix/ssh-alias'
2622
```
27-
Then navigate to GitHub, and create a pull request.
2823

29-
The `serve` script in the root path of the repository can be used to view the docs locally:
24+
Review your edits checking the [Guidelines][ref-contributing-guidelines] section below.
25+
26+
!!! note
27+
Note that a simple editor markdown preview may not render all the features of the documentation.
28+
29+
To properly review the docs locally, the `serve` script in the root path of the repository can be used as shown below:
3030
```bash
3131
./serve
3232
...
3333
INFO - [08:33:34] Serving on http://127.0.0.1:8000/
3434
```
35-
This generates the documentation locally, which can be viewed using a local link, which is `http://127.0.0.1:8000/` by default.
36-
The documentation will be rebuilt and the webpage reloaded when changed files are saved.
3735

3836
!!! note
3937
To run the serve script, you need to first install [uv](https://docs.astral.sh/uv/getting-started/installation/).
4038

41-
To build the docs in a `site` sub-directory:
39+
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.
40+
41+
After your first review, commit and push your changes
4242
```bash
43-
./serve build
43+
git add <files>
44+
git commit -m 'update the ssh docs with aliases for all user lab vclusters'
45+
git push origin 'fix/ssh-alias'
4446
```
4547

48+
Then navigate to GitHub, and create a pull request.
49+
4650
!!! tip
4751
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.
4852

4953
## Review process
5054

51-
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.
55+
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.
5256

53-
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.
57+
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.
5458

55-
If the documentation that you write or update might affect multiple stakeholders, ping them for a review.
56-
If you don't get a timely reply, ask the documentation owners for a review or for permission to merge.
59+
If you think your documentation update could affect specific stakeholders, ping them for a review.
60+
The same applies if you are not getting get a timely reply for your pull request.
61+
You can get some hints of whom to contact by looking at [CODEOWNERS](https://github.com/eth-cscs/cscs-docs/blob/main/.github/CODEOWNERS).
5762

5863
!!! note
5964
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.
6065
We will start simple, and add more formality as needed.
6166

67+
### Spell checker
68+
69+
A spell checker workflow runs on all PRs to help catch simple typos.
70+
If the spell checker finds words that it considers misspelled, it will add a comment like [this](https://github.com/eth-cscs/cscs-docs/pull/193#issuecomment-3056795496) to the PR, listing the words that it finds misspelled.
71+
72+
The spell checker isn't always right and can be configured to ignore words.
73+
Most frequently technical terms, project names, etc. will not be in the dictionaries.
74+
There are three files used to configure words that get ignored:
75+
76+
- `.github/actions/spelling/allow.txt`:
77+
This is the main file for whitelisting words.
78+
Each line of the file contains a word that is ignored by the spell checker.
79+
All lowercase words are matched with any capitalization, while words containing at least one uppercase letter are matched with the given capitalization.
80+
Using the capitalized word is useful if you always want to ensure the same spelling, e.g. for names.
81+
<!--begin no spell check-->
82+
- `.github/actions/spelling/patterns.txt`:
83+
This file is used to ignore words that match a given regular expression.
84+
This file is useful to ignore e.g. URLs or markdown references.
85+
Words that have unusual capitalization may also need to be added to this file to make sure they are ignored.
86+
For example, "FirecREST" is normally recognized as two words: "Firec" and "REST", and adding "FirecREST" to `allow.txt` will not ignore the word.
87+
In this case it can be ignored by adding it to `patterns.txt`
88+
<!--end no spell check-->
89+
- `.github/actions/spelling/block-delimiters.txt`:
90+
This file can be used to ignore words between begin- and end markers.
91+
For example, code blocks starting and ending with `` ``` `` are ignored from spell checking as they often contain unusual words not in dictionaries.
92+
If adding words to `allow.txt` or `patterns.txt`, or ignoring blocks with `block-delimiters.list`, is not sufficient, you can as a last resort use the HTML comments `<!--begin no spell check-->` and `<!--end no spell check-->` to ignore spell checking for a larger block of text.
93+
The comments will not be rendered in the final documentation.
94+
95+
Additionally, the file `.github/actions/spelling/only.txt` contains a list of regular expressions used to match which files to check.
96+
Only markdown files under the `docs` directory are checked.
97+
98+
[](){#ref-contributing-guidelines}
6299
## Guidelines
63100

64101
### Links
@@ -90,11 +127,11 @@ Instead, we advocate adding unique references to sections.
90127

91128
=== "adding a reference"
92129

93-
Add a reference above the item, in this case we want to link to the section with the title `## The Fast Server`:
130+
Add a reference above the item, in this case we want to link to the section with the title `## The fast server`:
94131

95132
```
96-
[](){#ref-servers-fast}
97-
## Fast Server
133+
[](){#ref-fast-server}
134+
## Fast server
98135
```
99136

100137
Use the `[](){#}` syntax to define the reference/anchor.
@@ -107,7 +144,7 @@ Instead, we advocate adding unique references to sections.
107144
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):
108145

109146
```
110-
[the fast server][ref-servers-fast]
147+
[the fast server][ref-fast-server]
111148
```
112149

113150
The benefits of this approach are that the link won't break if
@@ -117,18 +154,60 @@ The benefits of this approach are that the link won't break if
117154

118155
### Images
119156

157+
> A picture is worth a thousand words
158+
159+
We encourage the usage of images to improve clarity and understanding. You can use **screenshots** or **diagrams**.
160+
120161
Images are stored in the `docs/images` directory.
121162

122-
* there are sub-directories in the `docs/images` path - create a new sub-directory for your images if appropriate
123-
* choose image and path names that make sense - `screenshot.png` is not a great file name. Neither is `PX-202502025-imgx.png`.
163+
* create a new sub-directory for your images if appropriate
164+
* choose a path and file name that hint what the image is about - neither `screenshot.png` nor `PX-202502025-imgx.png` are great names.
124165

125-
!!! tip
126-
When providing a screenshot, do you need to show the whole screen, or just part of one window?
166+
!!! warning
167+
Keep the size of your images to a minimum because we want to keep an overall lightweight repository.
127168

128-
Cropping the image will decrease file size, and might also draw the readers attention to the most relevant information.
129169

130-
!!! tip
131-
Do you need a screenshot, or can a text description also work?
170+
#### Screenshots
171+
172+
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.
173+
174+
Often, screenshots can quickly become obsolete, so you may want to complement (or maybe even replace) some with text descriptions.
175+
176+
#### Diagrams
177+
178+
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.
179+
180+
??? "Example"
181+
182+
=== "Source"
183+
184+
````text
185+
```mermaid
186+
graph TD;
187+
Image(Will image add value?);
188+
Image--NO-->T(keep text only);
189+
Image--YES-->SD(What image is needed?)
190+
SD--Screenshot-->S(keep it lean)
191+
SD--Diagram-->D(keep it maintainable)
192+
D--Default-->M(Mermaid)
193+
D--Custom-->DR(Draw.io)
194+
```
195+
````
196+
197+
=== "Rendered"
198+
199+
```mermaid
200+
graph TD;
201+
Image(Will image add value?);
202+
Image--NO-->T(keep text only);
203+
Image--YES-->SD(What image is needed?)
204+
SD--Screenshot-->S(keep it lean)
205+
SD--Diagram-->D(keep it maintainable)
206+
D--Default-->M(Mermaid)
207+
D--Custom-->DR(Draw.io)
208+
```
209+
210+
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.
132211

133212
### Text formatting
134213

@@ -194,7 +273,7 @@ At the top of each page there is an "edit" icon :material-pencil:, which will op
194273
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.
195274

196275
!!! tip
197-
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.
276+
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.
198277

199278
!!! note
200279
Use the default option **Create a new branch for this commit and start a pull request**.
@@ -231,10 +310,10 @@ They stand out better from the main text, and can be collapsed by default if nee
231310
!!! example "Example one"
232311
This is an example.
233312
The title of the example uses [sentence case](https://en.wikipedia.org/wiki/Letter_case#Sentence_case).
234-
313+
235314
??? note "Collapsed note"
236315
This note is collapsed, because it uses `???`.
237-
316+
238317
If an admonition is collapsed by default, it should have a title.
239318

240319
We provide some custom admonitions.

docs/services/cicd.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -463,6 +463,7 @@ If you want only specific artifacts in your job, you should have a look at [depe
463463

464464
There is also a building block in the templates, name `.dynamic-image-name`, which you can use to get rid for most of the boilerplate.
465465
It is important to note that this building block will export the dynamic name under the hardcoded name `BASE_IMAGE` in the `dotenv` file.
466+
The variable `DOCKER_TAG`, containing the tag of the image, is also exported in the `dotenv` file.
466467
The jobs would look something like this:
467468
```yaml
468469
build base:
@@ -485,6 +486,9 @@ build software:
485486
`build base` is using additionally the building block `.dynamic-image-name`, while `build software` is unchanged.
486487
Have a look at the definition of the block `.dynamic-image-name` in the file [.ci-ext.yml](https://gitlab.com/cscs-ci/recipes/-/blob/master/templates/v2/.ci-ext.yml) for further notes.
487488

489+
!!! example "GT4Py example"
490+
An example using `.dynamic-image-name` in action can be found in the [gt4py repository](https://github.com/GridTools/gt4py/tree/main/ci).
491+
488492
### Image cleanup
489493
Images pushed to [CSCS_REGISTRY_PATH](#ci-variables) are cleaned daily according to the following rules:
490494

@@ -1319,15 +1323,15 @@ This runner is a thin wrapper over the [f7t-controller](#f7t-controller).
13191323
The machine where ReFrame is running does not have to be a powerful machine, hence it does not make sense to start the main ReFrame process from a compute node.
13201324
It makes more sense to start the ReFrame process on a cloud machine and submit the compute jobs through FirecREST to the actual cluster.
13211325

1322-
The easiest way to use the FirecREST scheduler of ReFrame is to use the configuration files that are provided in the alps branch of the [CSCS Reframe tests repository](https://github.com/eth-cscs/cscs-reframe-tests).
1326+
The easiest way to use the FirecREST scheduler of ReFrame is to use the configuration files that are provided in the main branch of the [CSCS Reframe tests repository](https://github.com/eth-cscs/cscs-reframe-tests).
13231327
In case you want to run ReFrame for a system that is not already available in this directory, please open a ticket to the Service Desk and we will add it or help you update one of the existing ones.
13241328

13251329
Something you should be aware of when running with this scheduler is that ReFrame will not have direct access to the filesystem of the cluster so the stage directory will need to be kept in sync through FirecREST.
13261330
It is recommended to try to clean the stage directory whenever possible with the [`postrun_cmds`](https://reframe-hpc.readthedocs.io/en/stable/regression_test_api.html#reframe.core.pipeline.RegressionTest.postrun_cmds) and [`postbuild_cmds`](https://reframe-hpc.readthedocs.io/en/stable/regression_test_api.html#reframe.core.pipeline.RegressionTest.postbuild_cmds) and to avoid [autodetection of the processor](https://reframe-hpc.readthedocs.io/en/stable/config_reference.html#config.systems.partitions.processor) in each run.
13271331
Normally ReFrame stores these files in `~/.reframe/topology/{system}-{part}/processor.json`, but you get a "clean" runner every time.
13281332
You could either add them in the configuration files or store the files in the first run and copy them to the right directory before ReFrame runs.
13291333

1330-
Finally, you can find some more information [in the repository](https://github.com/eth-cscs/cscs-reframe-tests/blob/alps/config/systems-firecrest/README.md).
1334+
Finally, you can find some more information [in the repository](https://github.com/eth-cscs/cscs-reframe-tests/blob/main/config/systems-firecrest/README.md).
13311335

13321336
The default command that is executed is
13331337
```console
@@ -1355,7 +1359,7 @@ The path to the checks that is passed to `reframe` through `-c`.
13551359
```yaml
13561360
job:
13571361
before_script:
1358-
- git clone -b alps https://github.com/eth-cscs/cscs-reframe-tests
1362+
- git clone https://github.com/eth-cscs/cscs-reframe-tests
13591363
- pip install -r cscs-reframe-tests/config/utilities/requirements.txt
13601364
- sed -i -e "s/account=csstaff/account=$CSCS_CI_DEFAULT_SLURM_ACCOUNT/" cscs-reframe-tests/config/systems-firecrest/eiger.py
13611365
variables:

0 commit comments

Comments
 (0)