CONTRIBUTING.md 3.29 KB
Newer Older
Romain Bignon's avatar
Romain Bignon committed
1 2 3
How to contribute
=================

4 5 6 7 8 9 10 11 12 13
Whenever you start working on a bug or an issue, please mention it in the
corresponding issue on this repo. If there is not an already opened issue for
this bug, please open a MR as soon as possible (with the `WIP:` prefix
mentionning it is a work in progress) to let others know you are working on
this module and fixing things.

This way, everyone is aware of the changes you are making and this avoid doing
a lot of duplicate work.


Romain Bignon's avatar
Romain Bignon committed
14 15 16
Write a patch
-------------

17
Help yourself with the [documentation](http://docs.weboob.org/).
Romain Bignon's avatar
Romain Bignon committed
18

19 20
Find an opened issue on [this website](https://git.weboob.org/weboob/devel/issues),
or write your own bugfix or feature. Then, once it is necessary, commit with:
Romain Bignon's avatar
Romain Bignon committed
21

22
    $ git commit -a
Romain Bignon's avatar
Romain Bignon committed
23

24 25 26
Do not forget to write a helpful commit message. If you are fixing a bug in a
specific module, the first line of your commit message should read
`[module_name] Description of the fix`.
Romain Bignon's avatar
Romain Bignon committed
27

28

Romain Bignon's avatar
Romain Bignon committed
29 30 31
Check your patch
----------------

32
You can run these scripts to be sure your patch doesn't break anything:
Romain Bignon's avatar
Romain Bignon committed
33

34 35 36
    $ tools/pyflakes.sh
    $ tools/weboob_lint.sh
    $ tools/run_tests.sh yourmodulename  # or without yourmodulename to test everything
Romain Bignon's avatar
Romain Bignon committed
37

38
Perhaps you should also write or fix tests. These tests are automatically run by
39
[Gitlab CI](https://git.weboob.org/weboob/devel/pipelines) at each commit and merge requests.
Romain Bignon's avatar
Romain Bignon committed
40

41

42 43
Create a merge request or send a patch
--------------------------------------
Romain Bignon's avatar
Romain Bignon committed
44

45 46 47
The easiest way to send your patch is to create a fork on [the Weboob
Gitlab](https://git.weboob.org) and create a merge request from there.
This way, the code review process is easier and continuous integration is run
48
automatically (see previous section).
Romain Bignon's avatar
Romain Bignon committed
49

50
If you prefer good old email patches, just use
Romain Bignon's avatar
Romain Bignon committed
51

52
    $ git format-patch -n -s origin
Romain Bignon's avatar
Romain Bignon committed
53

54
Then, send them with this command:
Romain Bignon's avatar
Romain Bignon committed
55

56
    $ git send-email --to=weboob@weboob.org *.patch
Romain Bignon's avatar
Romain Bignon committed
57

58
You can also send the files by yourself if you haven't any configured MTA on your system.
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75


Notes on merging a merge request
--------------------------------

Few people (members of the [Weboob group on this
repo](https://git.weboob.org/groups/weboob/group_members)) have the right to
merge a MR.

Anyone is welcome to review and comment pending merge requests. A merge
request should in principle have at least two reviewers before getting merged.

Weboob `devel` repo should keep an history as linear as possible. Then,
merging a merge request should be done locally, with prior rebasing upon the
`master` branch and take care of using the `-ff-only` merge option. Merge
requests should **NOT** be merged through the Gitlab UI, which would result in
an extra "merge" commit.
76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92


Getting your contribution accepted
----------------------------------

All contributions are welcome and will only be judged on a technical and legal merit.
Contributing does not require endorsing views of any other contributor,
or supporting the project in any way.

Rejected contributions are not personal; further contributions will be considered.

It is discouraged to inquire about any contributor opinions or
identity characteristics as they should not have any influence on the quality
of the contribution. It is also possible to contribute anonymously.

If provided, icons are preferred to be parodic or humorous in nature for
legal reasons, however there are no restrictions on the quality or style of humor.