CONTRIBUTING.md 3.67 KB
Newer Older
Gloria Corti's avatar
Gloria Corti committed
1
2
# Contributions to the Gauss GitLab project

3
4
When you contribute new or modified code to Gauss ensure to start by getting a copy of the package(s) you need to modify **from the branch you 
intend this code to be for**. 
Gloria Corti's avatar
Gloria Corti committed
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
Due to the fact that the majority of people contributing code will want it to be deployed in Sim09, and you should specify this branch for 
your pull and merge requests. 

For example if you want to contribute a new generator levels cut for Sim09, once you have your satellite project, you can just check out the 
package from the Sim09 branch
```
git lb-checkout Gauss/Sim09 Gen/GenCuts
```
You can then work on the changes you want to make and commit them to your local copy as much as you want.
You do not need to put entries in the release notes of the package any more but you should put meaningful message when you commit to your local 
copy as they will be propagated to the remote repository.

Once you are happy with your changes you can push them to a branch in the Gauss remote repository.
It is recommended you create a Jira task in the LHCBGAUSS Jira (LHCBGAUSS-NNNN in the example below) with a short description of the issue 
before pushing to the remote Gauss repository, and we suggest
you do so early on in the process as we can provide general suggestions and comments before hand.

22
It is suggested that the name of the branch you commit your code is related to what it is for e.g:
Gloria Corti's avatar
Gloria Corti committed
23
```
24
git lb-push Gauss WhatTheCodeIsFor
Gloria Corti's avatar
Gloria Corti committed
25
26
27
28
```

Once the branch has been pushed to the repository other people can look at the code and contribute to the development by using the same branch.

29
30
When you are ready for the code to be tested and reviewed you have to **create a merge request**.
Please put a meaningull tile and the Jira ticket in the description,
Gloria Corti's avatar
Gloria Corti committed
31
32
33
34
35
e.g. this refers to / closes / see / details in LHCBGAUSS-NNNN
This will introduce a direct link between the Jira task and the merge request that will later be carried on in the release notes 
and web documentation.

When creating the merge request you need to first *select the branch you want this to be applied to*. The default is master so be sure to change
36
37
38
39
it to `Sim09` if you need to. 
In case you want the code is for master but you want it to be propagated to `Sim09` or vice-versa either add a comment to this extent into the merge request 
or select the label ~ToSim09 or ~ToMaster.
The Gauss manager will take care of the rest and keep you in the loop.
Gloria Corti's avatar
Gloria Corti committed
40
41

# Testing and reviewing the code you submitted
42
43
In order to test the code provided for new releases we have various nightly slots and for Gauss we have additional dedicated nightly slots.   
For a MR to be picked up in the nightly the corresponding label has to be selected.   
Gloria Corti's avatar
Gloria Corti committed
44
The whole up-to-date list with an explanation can be found in lhcb/Gauss#12
Gloria Corti's avatar
Gloria Corti committed
45

46
47
Gauss in lhcb-sim09 and lhcb-sim09-cmake is built from the head of the Sim09 GitLab branch + the selected MR
while the one in the other slots is built from master.
Gloria Corti's avatar
Gloria Corti committed
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62

In case the code of the merge request does not compile it will be exclude from future builds until a fix is provided.

The person asking for a merge request should verify that the code provides the expected results by running Gauss from the corresponding 
nightly build, e.g. for Sim09 by doing:
```
lb-run --nightly lhcb-sim09 Gauss/Sim09 gaudirun.py MyOptions.py
```
In parallel someone will be asked to review the code to ensure someone else an idea of what it does and it fits within the Gauss framework 
and the underlying LHCb and Gaudi software.

If changes to the code are necessary due to compilation problems, unexpected test results, review comments, they should be introduce in the 
branch in which the code has been submitted (LHCBGAUSS-NNNN.WhatTheCodeIsFor in the example above)