Skip to content

Commit a8c239d

Browse files
committed
first draft of contributing guide
1 parent 8368eb3 commit a8c239d

File tree

6 files changed

+109
-5
lines changed

6 files changed

+109
-5
lines changed

docs/access/ssh.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ ssh -A [email protected]
174174
ssh daint.cscs.ch
175175
```
176176

177+
[](){#ref-ssh-faq}
177178
## Frequently encountered issues
178179

179180
??? warning "too many authentification failures"

docs/contributing/index.md

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
# Contributing
2+
3+
This documentation is developed using the [Material for MkDocs](https://squidfunk.github.io/mkdocs-material/) framework, and the source code for the docs is publicly available on [GitHub](https://github.com/eth-cscs/cscs-docs).
4+
This means that everybody, CSCS staff and the CSCS user community can contribute to the documentation.
5+
6+
## Getting Started
7+
8+
We use the GitHub fork and pull request model for development:
9+
10+
* First create a fork of the [main GitHub repository](https://github.com/eth-cscs/cscs-docs).
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+
13+
Clone your fork repository on your PC/laptop:
14+
```bash
15+
# clone your fork of the repository
16+
> git clone [email protected]:${githubusername}/cscs-docs.git
17+
> cd cscs-docs
18+
> git switch -c 'fix/ssh-alias'
19+
# ... make your edits ...
20+
# add and commit your changes
21+
> git add <files>
22+
> git commit -m 'update the ssh docs with alisases for all user lab vclusters'
23+
> git push origin 'fix/ssh-alias'
24+
```
25+
Then navigate to GitHub, and create a pull request.
26+
27+
The `serve` script in the root path of the repository can be used to view the docs locally:`
28+
```
29+
> ./serve
30+
...
31+
INFO - [08:33:34] Serving on http://127.0.0.1:8000/
32+
```
33+
This generates the documentation locally, which can be viewed using a local link, which is `http://127.0.0.1:8000/` by default.
34+
The documentation will be rebuilt and the webpage reloaded when changed files are saved.
35+
36+
!!! note
37+
To run the serve script, you need to first install [uv](https://docs.astral.sh/uv/getting-started/installation/).
38+
39+
To build the docs in a `site` sub-directory:
40+
```bash
41+
./serve build
42+
```
43+
## Review Process
44+
45+
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.
46+
47+
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.
48+
49+
If the documentation that you write or update might affect multiple stakeholders, ping them for a review.
50+
If you don't get a timely reply, ask the documentation owners for a review or for permission to merge.
51+
52+
!!! note
53+
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.
54+
We will start simple, and add more formality as needed.
55+
56+
## Guidelines
57+
58+
### Frequently Asked Questions
59+
60+
The documentation does not have a FAQ section, because questions are best answered by the documentation, not in a separate section.
61+
Integrating information into the main documentation requires some care to identify where the information needs to go, and edit the documentation around it.
62+
Adding the information to a FAQ is easier, but the result is information about a topic distributed betwen the docs and FAQ questions, which ultimately makes the documentation harder to search.
63+
64+
FAQ content, such as lists of most frequently encountered error messages, is still very useful in many contexts.
65+
If you want to add such content, create a section at the bottom of a topic page, for example this section on the [SSH documentation page][ref-ssh-faq].
66+
67+
### Images
68+
69+
Images are stored in the `docs/images` directory.
70+
71+
* there are sub-directories in the `docs/images` path - create a new sub-directory for your images if appropriate
72+
* choose image and path names that make sense - `screenshot.png` is not a great file name. Neither is `PX-202502025-imgx.png`.
73+
74+
!!! tip
75+
When providing a screenshot, do you need to show the whole screen, or just part of one window?
76+
77+
Cropping the image will decrease file size, and might also draw the readers attention to the most relevant information.
78+
79+
!!! tip
80+
Do you need a screenshot, or can a text description also work?
81+
82+
## Small Contributions
83+
84+
Small changes that only modify the contents of a single file, for example to fix some typos or add some clarifying detail to an example, it is possible to quickly create a pull request directly in the browser.
85+
86+
At the top of each page there is an "edit" icon :material-pencil:, which will open the markdown source for the page in the GitHub text editor.
87+
88+
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.
89+
90+
!!! note
91+
You will need to keep the default option **Create a new branch for this commit and start a pull request**.
92+
93+
* if the change is small and you are CSCS staff, you can merge the PR immediately
94+
* all other changes can be

docs/index.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,14 @@ If you can't find the information that you need in the documentation, help is av
7474

7575
[:octicons-arrow-right-24: CSCS User Slack](https://cscs-users.slack.com/)
7676

77+
<div class="grid cards" markdown>
78+
- :fontawesome-solid-hammer: __Contribute__
79+
80+
The source for the documentation is hosted on GitHub.
81+
82+
[:octicons-arrow-right-24: Contribute to the docs ](contributing/index.md)
83+
</div>
84+
7785
</div>
7886

7987
## Tools and Services
@@ -82,7 +90,6 @@ If you can't find the information that you need in the documentation, help is av
8290
Provide some links to the "how" documentation here.
8391

8492
<div class="grid cards" markdown>
85-
8693
- :fontawesome-solid-hammer: __Tools__
8794

8895
CSCS provides tools and software on Alps.
@@ -94,6 +101,5 @@ If you can't find the information that you need in the documentation, help is av
94101
Guides on how to build and install software from source using uenv and containers
95102

96103
[:octicons-arrow-right-24: Building and Installing Software](build-install/index.md)
97-
98104
</div>
99105

docs/software/sciapps/namd.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88

99
!!! note "User Environments"
1010

11-
[CP2K] is provided on [ALPS](#ref-alps-platforms) via [User Environments](#ref-tool-uenv) (UENVs). Please have a look at
12-
the [User Environments documentation](#ref-tool-uenv) for more information about UENVs and how to use them.
11+
[NAMD] is provided on [ALPS][ref-alps-platforms] as a uenv.
12+
Please have a look at the [uenv documentation][ref-tool-uenv] for more information about UENVs and how to use them.
1313

1414
[NAMD] is provided in two flavours on [CSCS] systems:
1515

docs/tools/container-engine.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Use Slurm in the cluster login node to start the Ubuntu environment that was jus
4444
$ srun --environment=ubuntu --pty bash
4545
```
4646

47-
Since the `ubuntu.toml` file is located in the [EDF search path](#edf-search-path), the filename can be passed to the option without the file extension.
47+
Since the `ubuntu.toml` file is located in the [EDF search path][ref-ce-edf-search-path], the filename can be passed to the option without the file extension.
4848

4949
!!! example "launching a containerized environment"
5050
The above terminal snippet demonstrates how to launch a containerized environment using Slurm with the `--environment` option.

mkdocs.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,9 @@ nav:
8585
- 'Code of Conduct': policies/code-of-conduct.md
8686
- 'UserLab Support Policy': policies/support.md
8787
- 'Slack Code of Conduct': policies/slack.md
88+
- 'Contributing':
89+
- contributing/index.md
90+
8891
theme:
8992
name: material
9093
language: en

0 commit comments

Comments
 (0)