|
| 1 | +Contributing to Raqcoin Core |
| 2 | +============================ |
| 3 | + |
| 4 | +The Raqcoin Core project operates an open contributor model where anyone is |
| 5 | +welcome to contribute towards development in the form of peer review, testing |
| 6 | +and patches. This document explains the practical process and guidelines for |
| 7 | +contributing. |
| 8 | + |
| 9 | +Getting Started |
| 10 | +--------------- |
| 11 | + |
| 12 | +New contributors are very welcome and needed. |
| 13 | + |
| 14 | +Reviewing and testing is highly valued and the most effective way you can contribute |
| 15 | +as a new contributor. It also will teach you much more about the code and |
| 16 | +process than opening pull requests. |
| 17 | + |
| 18 | +Before you start contributing, familiarize yourself with the Raqcoin Core build |
| 19 | +system and tests. Refer to the documentation in the repository on how to build |
| 20 | +Raqcoin Core and how to run the unit tests. |
| 21 | + |
| 22 | +There are many open issues of varying difficulty waiting to be fixed. |
| 23 | +If you're looking for somewhere to start contributing, check out the |
| 24 | +[good first issue](https://github.com/RAQ-coin/Raqcoin/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22) |
| 25 | +list or changes that are |
| 26 | +[up for grabs](https://github.com/RAQ-coin/Raqcoin/issues?utf8=%E2%9C%93&q=label%3A%22Up+for+grabs%22). |
| 27 | +Some of them might no longer be applicable. So if you are interested, but |
| 28 | +unsure, you might want to leave a comment on the issue first. |
| 29 | + |
| 30 | +### Good First Issue Label |
| 31 | + |
| 32 | +The purpose of the `good first issue` label is to highlight which issues are |
| 33 | +suitable for a new contributor without a deep understanding of the codebase. |
| 34 | + |
| 35 | +However, good first issues can be solved by anyone. If they remain unsolved |
| 36 | +for a longer time, a frequent contributor might address them. |
| 37 | + |
| 38 | +You do not need to request permission to start working on an issue. However, |
| 39 | +you are encouraged to leave a comment if you are planning to work on it. This |
| 40 | +will help other contributors monitor which issues are actively being addressed |
| 41 | +and is also an effective way to request assistance if and when you need it. |
| 42 | + |
| 43 | +Communication Channels |
| 44 | +---------------------- |
| 45 | + |
| 46 | +Most communication about Raqcoin Core development happens on GitHub Issues and Pull Requests. |
| 47 | + |
| 48 | +Contributor Workflow |
| 49 | +-------------------- |
| 50 | + |
| 51 | +The codebase is maintained using the "contributor workflow" where everyone |
| 52 | +without exception contributes patch proposals using "pull requests" (PRs). This |
| 53 | +facilitates social contribution, easy testing and peer review. |
| 54 | + |
| 55 | +To contribute a patch, the workflow is as follows: |
| 56 | + |
| 57 | + 1. Fork repository |
| 58 | + 1. Create topic branch |
| 59 | + 1. Commit patches |
| 60 | + 1. Push changes to your fork |
| 61 | + 1. Create pull request |
| 62 | + |
| 63 | +The project coding conventions in [doc/coding.md](doc/coding.md) must be followed. |
| 64 | + |
| 65 | +### Committing Patches |
| 66 | + |
| 67 | +In general, commits should be atomic and diffs should be easy to read. For this reason, do not mix any formatting |
| 68 | +fixes or code moves with actual code changes. |
| 69 | + |
| 70 | +Make sure each individual commit is hygienic: that it builds successfully on its |
| 71 | +own without warnings, errors, regressions, or test failures. |
| 72 | +This means tests must be updated in the same commit that changes the behavior. |
| 73 | + |
| 74 | +Commit messages should be verbose by default consisting of a short subject line |
| 75 | +(50 chars max), a blank line and detailed explanatory text as separate |
| 76 | +paragraph(s), unless the title alone is self-explanatory. |
| 77 | + |
| 78 | +### Creating the Pull Request |
| 79 | + |
| 80 | +The title of the pull request should be prefixed by the component or area that |
| 81 | +the pull request affects. Valid areas as: |
| 82 | + |
| 83 | + - `consensus` for changes to consensus critical code |
| 84 | + - `doc` for changes to the documentation |
| 85 | + - `qt` or `gui` for changes to the GUI |
| 86 | + - `mining` for changes to the mining code |
| 87 | + - `net` or `p2p` for changes to the peer-to-peer network code |
| 88 | + - `refactor` for structural changes that do not change behavior |
| 89 | + - `test` or `ci` for changes to the unit tests, QA tests or CI code |
| 90 | + - `util` or `lib` for changes to the utils or libraries |
| 91 | + - `wallet` for changes to the wallet code |
| 92 | + - `build` for changes to the build system |
| 93 | + |
| 94 | +The body of the pull request should contain sufficient description of *what* the |
| 95 | +patch does, and even more importantly, *why*, with justification and reasoning. |
| 96 | + |
| 97 | +### Work in Progress Changes and Requests for Comments |
| 98 | + |
| 99 | +If a pull request is not to be considered for merging (yet), please |
| 100 | +prefix the title with [WIP] or use Task Lists |
| 101 | +in the body of the pull request to indicate tasks are pending. |
| 102 | + |
| 103 | +### Address Feedback |
| 104 | + |
| 105 | +At this stage, one should expect comments and review from other contributors. You |
| 106 | +can add more commits to your pull request by committing them locally and pushing |
| 107 | +to your fork. |
| 108 | + |
| 109 | +You are expected to reply to any review comments before your pull request is |
| 110 | +merged. You may update the code or reject the feedback if you do not agree with |
| 111 | +it, but you should express so in a reply. If there is outstanding feedback and |
| 112 | +you are not actively working on it, your pull request may be closed. |
| 113 | + |
| 114 | +Pull Request Philosophy |
| 115 | +----------------------- |
| 116 | + |
| 117 | +Patchsets should always be focused. For example, a pull request could add a |
| 118 | +feature, fix a bug, or refactor code; but not a mixture. Please also avoid super |
| 119 | +pull requests which attempt to do too much, are overly large, or overly complex |
| 120 | +as this makes review difficult. |
| 121 | + |
| 122 | +### Features |
| 123 | + |
| 124 | +When adding a new feature, thought must be given to the long term technical debt |
| 125 | +and maintenance that feature may require after inclusion. Before proposing a new |
| 126 | +feature that will require maintenance, please consider if you are willing to |
| 127 | +maintain it (including bug fixing). |
| 128 | + |
| 129 | +### Refactoring |
| 130 | + |
| 131 | +Refactoring is a necessary part of any software project's evolution. |
| 132 | +Refactoring PRs must not change the behaviour of code within the pull request (bugs must be preserved as is). |
| 133 | + |
| 134 | +"Decision Making" Process |
| 135 | +------------------------- |
| 136 | + |
| 137 | +Whether a pull request is merged into Raqcoin Core rests with the project maintainers. |
| 138 | + |
| 139 | +Maintainers will take into consideration if a patch is in line with the general |
| 140 | +principles of the project; meets the minimum standards for inclusion; and will |
| 141 | +judge the general consensus of contributors. |
| 142 | + |
| 143 | +In general, all pull requests must: |
| 144 | + |
| 145 | + - Have a clear use case, fix a demonstrable bug or serve the greater good of |
| 146 | + the project; |
| 147 | + - Be reviewed; |
| 148 | + - Have unit tests, where appropriate; |
| 149 | + - Follow code style guidelines ([doc/coding.md](doc/coding.md)); |
| 150 | + - Not break the existing test suite; |
| 151 | + |
| 152 | +Patches that change Raqcoin consensus rules are considerably more involved than |
| 153 | +normal because they affect the entire ecosystem. |
| 154 | + |
| 155 | +Copyright |
| 156 | +--------- |
| 157 | + |
| 158 | +Raqcoin Core is released under the terms of the GNU GPL v. 3 license. |
| 159 | +See [COPYING](COPYING) for more information or https://www.gnu.org/licenses/gpl-3.0.en.html. |
0 commit comments