CONTRIBUTING.md 2.35 KB
Newer Older
1
2
# Contributions to pygwinc

Jameson Graef Rollins's avatar
Jameson Graef Rollins committed
3
4
The pygwinc project welcomes your contributions.  Our policy is that
all contributions should be peer-reviewed.  To facilitate the review,
5
6
7
8
please do not commit your work to this repository directly.  Instead,
please fork the repository and create a [merge
request](https://git.ligo.org/gwinc/pygwinc/-/merge_requests/new)
against the main pygwinc master branch.
9

10
11
12
13
14
15
16
17
18
When submitting code for merge, please follow good coding practice.
Respect the existing coding style, which for `pygwinc` is standard
[PEP8](https://www.python.org/dev/peps/pep-0008/) (with some
exceptions).  Make individual commits as logically distinct and atomic
as possible, and provide a complete, descriptive log of the changes
(including a top summary line).  Review efficiency follows code
legibility.

`pygwinc` comes with a validation command that can compare budgets
19
20
21
from the current code against those produced from different versions
in git (by default it compares against the current HEAD).  The command
can be run with:
Jameson Graef Rollins's avatar
Jameson Graef Rollins committed
22
23
24
```shell
$ python3 -m gwinc.test
```
25
26
27
28
29
30
Use the '--plot' or '--report' options to produce visual comparisons
of the noise differences.  The comparison can be done against an
arbitrary commit using the '--git-ref' option.  Traces for referenced
commits are cached, which speeds up subsequent comparison runs
significantly.

31
32
33
34
Once you submit your merge request a special CI job will determine if
there are budgets differences between your code and the master branch.
If there are, explicit approval from reviewers will be required before
your changes can be merged (see "approving noise" below).
35
36


37
## For reviewers: approving noise curve changes
38
39

As discussed above, merge requests that generate noise changes will
40
41
42
43
44
45
46
47
48
49
cause a pipeline failure in the `review:noise_change_approval` CI job.
The job will generate a report comparing the new noise traces against
those from master, which can be found under the 'View exposed
artifacts' menu item in the pipeline report.  Once you have reviewed
the report and the code, and understand and accept the noise changes,
click the 'Approve' button in the MR.  Once sufficient approval has
been given, `review:noise_change_approval` job can be re-run, which
should now pick up that approval has been given and allow the pipeline
to succeed.  Once the pipeline succeeds the merge request can be
merged.  Click the 'Merge' button to finally merge the code.