|
| 1 | +# Contributing to the Fortran Package Manager |
| 2 | + |
| 3 | +Thank you for considering contributing to the Fortran Package Manager (*fpm*). |
| 4 | +Please review and follow these guidelines to make the contribution process |
| 5 | +simple and effective for all involved. It will help communicate that you |
| 6 | +respect the time of the community developers. In return, the community will |
| 7 | +help address your problem, evaluate changes, and guide you through your pull |
| 8 | +requests. |
| 9 | + |
| 10 | +By contributing to *fpm*, you certify that you own or are allowed to share the |
| 11 | +content of your contribution under the |
| 12 | +[fpm license](https://github.com/fortran-lang/fpm/blob/master/LICENSE). |
| 13 | + |
| 14 | +* [Style](#style) |
| 15 | +* [Reporting a bug](#reporting-a-bug) |
| 16 | +* [Suggesting a feature](#suggesting-a-feature) |
| 17 | +* [Workflow](#workflow) |
| 18 | +* [General guidelines](#general-guidelines) |
| 19 | +* [For new contributors](#for-new-contributors) |
| 20 | + |
| 21 | +## Style |
| 22 | + |
| 23 | +Please follow the |
| 24 | +[Fortran stdlib style guide](https://github.com/fortran-lang/stdlib/blob/master/STYLE_GUIDE.md) |
| 25 | +for any Fortran code that you contribute. |
| 26 | +This allows us to focus on substance rather than style. |
| 27 | + |
| 28 | +## Reporting a bug |
| 29 | + |
| 30 | +A bug is a *demonstrable problem* caused by the code in this repository. |
| 31 | +Good bug reports are extremely valuable to us—thank you! |
| 32 | + |
| 33 | +Before opening a bug report: |
| 34 | + |
| 35 | +1. Check if the issue has already been reported |
| 36 | + ([issues](https://github.com/fortran-lang/fpm/issues)). |
| 37 | +2. Check if it is still an issue or it has been fixed? |
| 38 | + Try to reproduce it with the latest version from the master branch. |
| 39 | +3. Isolate the problem and create a minimal test case. |
| 40 | + |
| 41 | +A good bug report should include all information needed to reproduce the bug. |
| 42 | +Please be as detailed as possible: |
| 43 | + |
| 44 | +1. Which version of *fpm* are you using? Please be specific. |
| 45 | +2. What are the steps to reproduce the issue? |
| 46 | +3. What is the expected outcome? |
| 47 | +4. What happens instead? |
| 48 | + |
| 49 | +This information will help the community diagnose the issue quickly and with |
| 50 | +minimal back-and-forth. |
| 51 | + |
| 52 | +## Suggesting a feature |
| 53 | + |
| 54 | +Before suggesting a new feature, take a moment to find out if it fits the scope |
| 55 | +of the project, or if it has already been discussed. It is up to you to provide |
| 56 | +a strong argument to convince the community of the benefits of this feature. |
| 57 | +Please provide as much detail and context as possible. If applicable, include a |
| 58 | +mocked-up snippet of what the output or behavior would look like with this |
| 59 | +feature implemented. “Crazy”, out-of-the-box ideas are especially welcome. |
| 60 | +It’s quite possible that we are not considering an unusually creative solution. |
| 61 | + |
| 62 | +## Workflow |
| 63 | + |
| 64 | +*fpm* is a community project. There is no one single person making final |
| 65 | +decisions. This is the workflow that we follow: |
| 66 | + |
| 67 | +1. Open a [new issue](https://github.com/fortran-lang/fpm/issues/new) to |
| 68 | + describe a bug or propose a new feature. |
| 69 | + Refer to the earlier sections on how to write a good bug report or feature |
| 70 | + request. |
| 71 | +2. Discuss with the community and reach majority consensus about what should be |
| 72 | + done about the bug or feature request. |
| 73 | + We define “majority” loosely as 80%. |
| 74 | + This means that at least 4 of 5 people engaged in the discussion should be |
| 75 | + able to agree on the next step. |
| 76 | + This allows us to have the community mostly agree while not getting stuck if |
| 77 | + one person disagrees. |
| 78 | + At this stage, the scope of the fix/feature, its behavior, and API if |
| 79 | + applicable should be defined. |
| 80 | + Only when you have community concensus on these items you should proceed to |
| 81 | + writing code and opening a PR. |
| 82 | + **When actively working on code towards a PR, please assign yourself to the |
| 83 | + issue on GitHub.** |
| 84 | + This is good collaborative practice to avoid duplicated effort and also |
| 85 | + inform others what you are currently working on. |
| 86 | +3. Open a new Pull Request (PR) with your contribution. |
| 87 | + The body of the PR should at least include a bullet-point summary of the |
| 88 | + changes, and a detailed description is encouraged. |
| 89 | + If the PR completely addresses the issue you opened in step 1, include in |
| 90 | + the PR description the following line: `Fixes #<issue-number>`. |
| 91 | +4. Request reviewers to your PR. |
| 92 | + For small bug fixes or documentation improvements, 1 to 2 reviewers is |
| 93 | + sufficient. |
| 94 | + For implementation of bigger features, request 3 to 4 or more reviewers. |
| 95 | + Ideally, request reviewers that participated in step 2. |
| 96 | +5. If your PR implements a feature that adds or changes the behavior of *fpm*, |
| 97 | + your PR must also include appropriate changes to the documentation. |
| 98 | + |
| 99 | +This workflow can evolve and change over time as we learn how best to work |
| 100 | +together. If you have an idea on how to improve the workflow itself, please |
| 101 | +open an issue and we’ll discuss it. |
| 102 | + |
| 103 | +## General guidelines |
| 104 | + |
| 105 | +* A PR should implement *only one* feature or bug fix. |
| 106 | +* Do not commit changes to files that are irrelevant to your feature or bug fix. |
| 107 | +* Smaller PRs are better than large PRs, and will lead to a shorter review and |
| 108 | + merge cycle |
| 109 | +* Add tests for your feature or bug fix to be sure that it stays functional and useful |
| 110 | +* Be open to constructive criticism and requests for improving your code. |
| 111 | +* Again, please follow the |
| 112 | + [Fortran stdlib style guide](https://github.com/fortran-lang/stdlib/blob/master/STYLE_GUIDE.md). |
| 113 | + |
| 114 | +## For new contributors |
| 115 | + |
| 116 | +If you have never created a pull request before, welcome :tada:. |
| 117 | +You can learn how from |
| 118 | +[this great tutorial](https://egghead.io/series/how-to-contribute-to-an-open-source-project-on-github). |
| 119 | + |
| 120 | +Don’t know where to start? |
| 121 | +You can start by looking through the list of |
| 122 | +[open issues](https://github.com/fortran-lang/fpm/issues). |
0 commit comments