Skip to content

Commit 3f0b702

Browse files
committed
contributing edit
1 parent bc65d19 commit 3f0b702

File tree

1 file changed

+57
-0
lines changed

1 file changed

+57
-0
lines changed

docs/source/pages/contributing.rst

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,60 @@ bug not currently referenced by an existing issue, or have an idea on
4343
how to improve a part of 2DECOMP&FFT, please open a new item on the issue
4444
tracker before opening a pull request.
4545

46+
# Contributing
47+
48+
1. You want to contribute but have no idea how ? Please refer to the [Get started](#get-started) section.
49+
2. You have identified a bug ? Please refer to the [Bug](#bug) section.
50+
3. You have improved a part of the code or have developed a new functionality ? Please refer to the [advanced](#advanced-contribution) section.
51+
52+
## Get started
53+
54+
The recommended strategy to contribute is to start with a [discussion](https://github.com/2decomp-fft/2decomp-fft/discussions) or to pick an existing issue.
55+
To modify or experiment with the code, fork the 2decomp github repository and commit changes in a dedicated branch of your fork.
56+
When the modification is ready for review, one can open a pull request as described in the [advanced](#advanced-contribution) section below.
57+
58+
## Bug
59+
60+
It appears that you have identified a bug in the 2decomp library.
61+
If you are not sure this is really a bug in the library, you should go to the [discussions](https://github.com/2decomp-fft/2decomp-fft/discussions) section and open a new discussion.
62+
Otherwise, follow the steps below.
63+
64+
Firstly, try to reproduce the error with a debug build of the library, a small problem size and a small number of MPI ranks.
65+
It makes bug-hunting much easier.
66+
Unfortunately, this is not always possible.
67+
Please note that for a debug build, the log contains all the environment variables.
68+
Use it to hunt the bug but think twice before sharing it as it can expose sensitive and personal information.
69+
At least, please try to reproduce the bug on another machine with another compiler.
70+
71+
Secondly, if you have modified the source code of the 2decomp library, you must reproduce the bug without the modifications in 2decomp.
72+
The development team can only provide support for sections of code available in the present repository.
73+
74+
Thirdly, you must provide a minimal working example.
75+
The program using 2decomp and exposing the bug should be relatively small.
76+
The development team will not provide support if the program exposing the bug is very long.
77+
The programs available in the examples section are a good starting point for a minimal working example, ideally you could contribute the minimal working example to the existing examples.
78+
79+
At this stage, you probably did your best to simplify the problem at hand.
80+
Open an issue and select the bug report template.
81+
Provide a meaningful title, do your best to complete all the sections of the template and provide the version of the compiler, the version of the MPI / FFT library, ...
82+
If you think you have a fix for the bug, please expose it inside the issue.
83+
It is recommended to wait for feedback before opening a pull request.
84+
85+
## Advanced contribution
86+
87+
One should read this section before opening a pull request.
88+
To fix a bug, please open an issue and use the bug report template first.
89+
To improve a part of the code or develop a new functionality, please open an issue and use the feature request template first.
90+
If you are not sure about your contribution, open a [discussion](https://github.com/2decomp-fft/2decomp-fft/discussions) first.
91+
This helps raise awareness of the work and prevents repeated effort from occurring.
92+
93+
The code in a pull-request should be formatted using the `fprettify` program.
94+
See the code sample in the `scripts` folder.
95+
96+
Pull requests must be focused, small, coherent and have a detailed description.
97+
The longer the pull request, the harder the review.
98+
Please empathise with your fellow contributors who are going to spend time reviewing your code.
99+
100+
As long as the pull request is open for discussion and not ready for merging, convert it to draft.
101+
Whenever it is ready for merging, convert it to a regular pull request.
102+
Please note that reviewers might push modifications directly to your branch or request changes.

0 commit comments

Comments
 (0)