|
| 1 | +.. _bug_triaging: |
| 2 | + |
| 3 | +Bug triaging and issue curation |
| 4 | +================================ |
| 5 | + |
| 6 | +The `issue tracker <https://github.com/scikit-learn/scikit-learn/issues>`_ |
| 7 | +is important to the communication in the project: it helps |
| 8 | +developers identify major projects to work on, as well as to discuss |
| 9 | +priorities. For this reason, it is important to curate it, adding labels |
| 10 | +to issues and closing issues that are not necessary. |
| 11 | + |
| 12 | +Working on issues to improve them |
| 13 | +-------------------------------------- |
| 14 | + |
| 15 | +Improving issues increases their chances of being successfully resolved. |
| 16 | +Guidelines on submitting good issues can be found :ref:`here |
| 17 | +<filing_bugs>`. A third party can give useful feedback or even add |
| 18 | +comments on the issue, while core-developpers or members of the triage |
| 19 | +team can edit the issue description and title. |
| 20 | + |
| 21 | +The following actions are typically useful: |
| 22 | + |
| 23 | + - documenting issues that are missing elements to reproduce the problem |
| 24 | + such as code samples |
| 25 | + |
| 26 | + - correcting incorrect use of code formatting |
| 27 | + |
| 28 | + - making sure that the title and description are explicit about the |
| 29 | + problem to be solved |
| 30 | + |
| 31 | + - linking to related issues or discussions while briefly describing how |
| 32 | + they are related, for instance "See also #xyz for a similar attempt |
| 33 | + at this" or "See also #xyz where the same thing happened in |
| 34 | + SomeEstimator" provides context and helps the discussion. |
| 35 | + |
| 36 | +.. topic:: Fruitful discussions |
| 37 | + |
| 38 | + Online discussions may be harder than it seems at first glance, in |
| 39 | + particular given that a person new to open-source may have a very |
| 40 | + different understanding of the process than a seasonned maintainer. |
| 41 | + |
| 42 | + Overall, it is useful to stay positive and assume good will. `The |
| 43 | + following article |
| 44 | + <http://gael-varoquaux.info/programming/technical-discussions-are-hard-a-few-tips.html>`_ |
| 45 | + explores how to lead online discussions in the context of open source. |
| 46 | + |
| 47 | +Triaging operations for members of the core and triage teams |
| 48 | +------------------------------------------------------------- |
| 49 | + |
| 50 | +In addition to the above, members of the core team and the triage team |
| 51 | +can do the following important tasks: |
| 52 | + |
| 53 | +- Update labels for issues and PRs |
| 54 | + |
| 55 | +- Follow up on stalled PRs, to see if they must be relabeled as |
| 56 | + stalled and needing help (this is typically very important in the context |
| 57 | + of sprints, where the risk is to create many unfinished PRs) |
| 58 | + |
| 59 | +- Triage issues: |
| 60 | + |
| 61 | + - **close usage questions** and politely point the reporter to use |
| 62 | + Stack Overflow instead. |
| 63 | + |
| 64 | + - **close duplicate issues**, but only after checking that they are |
| 65 | + indeed duplicate. Ideally, the original submitter moves the |
| 66 | + discussion to the older, duplicate issue |
| 67 | + |
| 68 | + - **close issues that cannot be replicated**, after leaving time (at |
| 69 | + least a week) to add extra information |
| 70 | + |
| 71 | +:ref:`Saved replies <saved_replies>` are useful to gain time and yet be |
| 72 | +welcoming and polite when triaging. |
| 73 | + |
| 74 | + |
| 75 | +.. topic:: Closing issues: a tough call |
| 76 | + |
| 77 | + When uncertain on whether an issue should be closed or not, it is |
| 78 | + best to strive for consensus with the original poster, and possibly |
| 79 | + to seek relevant expertise. However, when the issue is a usage |
| 80 | + question, or when it has been considered as unclear for many years it |
| 81 | + should be closed. |
| 82 | + |
| 83 | +A typical workflow for triaging issues |
| 84 | +---------------------------------------- |
| 85 | + |
| 86 | +The following workflow [*]_ is a good way to approach issue triaging: |
| 87 | + |
| 88 | +1. Thank the reporter for opening an issue |
| 89 | + |
| 90 | + The issue tracker is many people’s first interaction with the |
| 91 | + scikit-learn project itself, beyond just using the library. As such, |
| 92 | + we want it to be a welcoming, pleasant experience. |
| 93 | + |
| 94 | +2. Is this a usage question? If so close it with a polite message |
| 95 | + (:ref:`here is an example <saved_replies>`). |
| 96 | + |
| 97 | +3. Is the necessary information provided? |
| 98 | + |
| 99 | + If crucial information (like the version of scikit-learn used), is |
| 100 | + missing feel free to ask for that and label the issue with "Needs |
| 101 | + info". |
| 102 | + |
| 103 | +4. Is this a duplicate issue? |
| 104 | + |
| 105 | + We have many open issues. If a new issue seems to be a duplicate, |
| 106 | + point to the original issue. If it is a clear duplicate, or consensus |
| 107 | + is that it is redundant, close it. Make sure to still thank the |
| 108 | + reporter, and encourage them to chime in on the original issue, and |
| 109 | + perhaps try to fix it. |
| 110 | + |
| 111 | + If the new issue provides relevant information, such as a better or |
| 112 | + slightly different example, add it to the original issue as a comment |
| 113 | + or an edit to the original post. |
| 114 | + |
| 115 | + |
| 116 | +5. Make sure that the title accurately reflects the issue. Edit it |
| 117 | + yourself if it's not clear. |
| 118 | + |
| 119 | +6. Is the issue minimal and reproducible? |
| 120 | + |
| 121 | + For bug reports, we ask that the reporter provide a minimal |
| 122 | + reproducible example. See |
| 123 | + https://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports |
| 124 | + for a good explanation. If the example is not reproducible, or if |
| 125 | + it's clearly not minimal, feel free to ask the reporter if they can |
| 126 | + provide and example or simplify the provided one. Do acknowledge that |
| 127 | + writing minimal reproducible examples is hard work. If the reporter |
| 128 | + is struggling, you can try to write one yourself. |
| 129 | + |
| 130 | + If a reproducible example is provided, but you see a simplification, |
| 131 | + edit the original post with your simpler reproducible example. |
| 132 | + |
| 133 | +4. If a reproducible example can't be provided, add the “Bug: triage” |
| 134 | + label. |
| 135 | + |
| 136 | +5. Add the relevant labels, such as "Documentation" when the issue is |
| 137 | + about documentation, "Bug" if it is clearly a bug, "Enhancement" if it |
| 138 | + is an enhancement request, ... |
| 139 | + |
| 140 | + If the issue is clearly defined and the fix seems relatively |
| 141 | + straightforward, label the issue as “Good first issue”. |
| 142 | + |
| 143 | + An additional useful step can be to tag the corresponding module e.g. |
| 144 | + `sklearn.linear_models` when relevant. |
| 145 | + |
| 146 | +.. [*] Adapted from the pandas project https://dev.pandas.io/docs/development/maintaining.html |
0 commit comments