Skip to content

Commit 994fb6c

Browse files
authored
Update contributing page with new tutorial structure rules
As discussed in precice/tutorials#228 and partially implemented in precice/tutorials#459 Also updates minor aspects in the whole page (and introduces an intentional typo).
1 parent 4a42e67 commit 994fb6c

File tree

1 file changed

+32
-19
lines changed

1 file changed

+32
-19
lines changed

pages/community/community-contribute-to-precice.md

+32-19
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Do you enjoy improving whatever you can? Did you find a bug in preCICE or one of
1515
## Contributing documentation
1616

1717
You (yes, you) have already found something that can be improved in this website:
18-
maybe an unclear part, maybe a broken link, maybe even a small typo.
18+
maybe an unclear part, maybe a broken link, maybe even a small tyypo.
1919
Click the `Edit me` button at the top of the respective page to see
2020
the source file of the page. You can then click `Edit this file`
2121
and submit your changes as a [Pull Request on GitHub](https://docs.github.com/en/free-pro-team@latest/github/collaborating-with-issues-and-pull-requests/about-pull-requests).
@@ -25,9 +25,6 @@ and merge them as soon as possible.
2525
These pages are written in [Markdown](https://guides.github.com/features/mastering-markdown/) (a very easy language)
2626
and we also have a [cheatsheet](docs-meta-cheatsheet.html) specifically for this website.
2727

28-
We [migrated](docs-meta-migration-guide.html) our documentation from multiple different sources to this website in December 2020
29-
and some topics may still be incomplete. This is a perfect opportunity to contribute!
30-
3128
## Reporting issues
3229

3330
After discussing a problem in one of our [community channels](community-channels.html), we may conclude that this is a bug
@@ -71,23 +68,26 @@ First time working with Git? Watch a [short lecture on the GitHub workflow](http
7168
Our tutorials generally follow a file structure similar to this:
7269

7370
```bash
74-
- <tutorial>/ # e.g. perpendicular-flap/
75-
- README.md # description of the case
76-
- precice.config.xml # a works-with-all preCICE configuration file
77-
- clean-tutorial.sh # a symbolic link (see ../tools/)
78-
- <visualization scripts> # gnuplot or simple Python scripts
79-
- images/ # any images used by the documentation
80-
- <participant1-solver1>/ # e.g. fluid-openfoam/
81-
- run.sh # a short script to run the solver1 case
82-
- clean.sh # a short script to clean the solver1 case
71+
- <tutorial>/ # e.g. perpendicular-flap/
72+
- README.md # description of the case
73+
- precice.config.xml # a works-with-all preCICE configuration file
74+
- clean-tutorial.sh # a symbolic link (see ../tools/)
75+
- <visualization scripts> # gnuplot or simple Python scripts
76+
- images/ # any images used by the documentation
77+
- solver-<code> # any configurable, tutorial-specific code, e.g., solver-fenics
78+
- <participant1-solver1>/ # e.g. fluid-openfoam/
79+
- run.sh # a short script to run the solver1 case
80+
- clean.sh # a short script to clean the solver1 case
8381
- <the solver1 files>
84-
- <participant2-solver2>/ # e.g. solid-dealii/
82+
- <participant2-solver2>/ # e.g. solid-dealii/
8583
- run.sh
8684
- clean.sh
8785
- <the solver2 files>
86+
- reference-results/ # results from different case combinations, used for regression tests
87+
- <case_combination>.tar.gz # Git LFS objects, generated from GitHub Actions
8888
```
8989

90-
Your case may already fit into one of the existing tutorials. If not, feel free to start a new one!
90+
Your case may already fit into one of the existing tutorials. If not, feel free to start a new one! A new case typically needs a new preCICE configuration file.
9191

9292
### Guidelines and hints
9393

@@ -98,15 +98,28 @@ Your case may already fit into one of the existing tutorials. If not, feel free
9898
- Which versions of preCICE, adapters, and solvers have you tried?
9999
- If it is a solver we don't already support, how can we get it?
100100
- How should the results look like? A screenshot would be very helpful.
101-
- In the `README.md` file, document the scenario setup, the dependencies, how to run it, how to visualize the results, and an example picture or video of the results. Follow the general structure in the existing tutorials. Don't forget to adapt the `permalink:` field in the beginning of the file.
102-
- The run scripts (`run.sh`) should be very short. You can probably reuse some of the scripts we already provide.
103-
- For the `clean.sh` script, you can use the functions provided in `tools/cleaning-tools.sh`
101+
- In the `README.md` file, following the general structure of the existing tutorials, document:
102+
- the scenario setup,
103+
- the dependencies,
104+
- how to run the tutorial,
105+
- how to visualize the results, and
106+
- an example picture or video of the results.
107+
- Don't forget to adapt the `permalink:` field in the beginning of the file.
108+
- The run scripts (`run.sh`) should be very short.
109+
- Try to reuse the scripts we already provide in `tools/` and in other tutorials.
110+
- The run script itself must be executable for a default case without any arguments.
111+
- Optional arguments can include `-parallel`, or anything that triggers a special case.
112+
- For the `clean.sh` script, you can use the functions provided in `tools/cleaning-tools.sh`
104113
- If there is already a `precice-config.xml` for the case you are simulating, please use the same one (or contribute changes to that). We want that all solvers that can simulate a given case use the same preCICE configuration file.
105-
- If you add a complete new tutorial case, the case also needs to be added to the [tutorials sidebar](https://github.com/precice/precice.github.io/blob/master/_data/sidebars/tutorial_sidebar.yml) on the [tutorials website section](tutorials.html). Please open a pull request to the [website repository](https://github.com/precice/precice.github.io). Please note that we will only merge this one with the next release of the tutorials, such that the list of tutorial cases on the website does not deviate from the list of released tutorial cases.
114+
115+
{% note %}
116+
If you add a complete new tutorial case, the case also needs to be added to the [tutorials sidebar](https://github.com/precice/precice.github.io/blob/master/_data/sidebars/tutorial_sidebar.yml) on the [tutorials website section](tutorials.html). Please open a pull request to the [website repository](https://github.com/precice/precice.github.io). Please note that we will only merge this one with the next release of the tutorials, such that the list of tutorial cases on the website does not deviate from the list of released tutorial cases.
117+
{% endnote %}
106118

107119
### Naming conventions
108120

109121
- Directories use `-` to separate words, not `_`, and only use lowercase.
122+
- We use `_` for separating case combinations, e.g., in the reference results: `fluid-openfoam_solid-calculix.tar.gz`.
110123
- Data and mesh names should start with uppercase and use `-` as separator.
111124
- Data names are in singular, e.g. `Stress`, `Heat-Flux`.
112125
- Mesh names start with the participant/domain name, e.g. `Fluid-Mesh`.

0 commit comments

Comments
 (0)