|
| 1 | + |
| 2 | +.. _bug_triaging: |
| 3 | + |
| 4 | +Bug triaging and issue curation |
| 5 | +=============================== |
| 6 | + |
| 7 | +The `issue tracker <https://github.com/matplotlib/matplotlib/issues>`_ |
| 8 | +is important to communication in the project because it serves as the |
| 9 | +centralized location for making feature requests, reporting bugs, |
| 10 | +identifying major projects to work on, and discussing priorities. For |
| 11 | +this reason, it is important to curate the issue list, adding labels |
| 12 | +to issues and closing issues that are resolved or unresolvable. |
| 13 | + |
| 14 | +Triaging issues does not require any particular expertise in the |
| 15 | +internals of Matplotlib, is extremely valuable to the project, and we |
| 16 | +welcome anyone to participate in issue triage! However, people who |
| 17 | +are not part of the Matplotlib organization do not have `permissions |
| 18 | +to change milestones, add labels, or close issue |
| 19 | +<https://docs.github.com/en/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization>`_. |
| 20 | +If you do not have enough GitHub permissions do something (e.g. add a |
| 21 | +label, close an issue), please leave a comment tagging |
| 22 | +``@matplotlib/triageteam`` with your recommendations! |
| 23 | + |
| 24 | +Working on issues to improve them |
| 25 | +--------------------------------- |
| 26 | + |
| 27 | +Improving issues increases their chances of being successfully resolved. |
| 28 | +Guidelines on submitting good issues can be found :ref:`here |
| 29 | +<submitting-a-bug-report>`. |
| 30 | +A third party can give useful feedback or even add |
| 31 | +comments on the issue. |
| 32 | +The following actions are typically useful: |
| 33 | + |
| 34 | + - documenting issues that are missing elements to reproduce the problem |
| 35 | + such as code samples |
| 36 | + |
| 37 | + - suggesting better use of code formatting (e.g. triple back ticks in the |
| 38 | + markdown). |
| 39 | + |
| 40 | + - suggesting to reformulate the title and description to make them more |
| 41 | + explicit about the problem to be solved |
| 42 | + |
| 43 | + - linking to related issues or discussions while briefly describing |
| 44 | + how they are related, for instance "See also #xyz for a similar |
| 45 | + attempt at this" or "See also #xyz where the same thing was |
| 46 | + reported" provides context and helps the discussion |
| 47 | + |
| 48 | + - verifying that the issue is reproducible |
| 49 | + |
| 50 | + - classify the issue as a feature request, a long standing bug or a |
| 51 | + regression |
| 52 | + |
| 53 | +.. topic:: Fruitful discussions |
| 54 | + |
| 55 | + Online discussions may be harder than it seems at first glance, in |
| 56 | + particular given that a person new to open-source may have a very |
| 57 | + different understanding of the process than a seasoned maintainer. |
| 58 | + |
| 59 | + Overall, it is useful to stay positive and assume good will. `The |
| 60 | + following article |
| 61 | + <http://gael-varoquaux.info/programming/technical-discussions-are-hard-a-few-tips.html>`_ |
| 62 | + explores how to lead online discussions in the context of open source. |
| 63 | + |
| 64 | + |
| 65 | +Triage Team |
| 66 | +----------- |
| 67 | + |
| 68 | + |
| 69 | +If you would like to join the triage team: |
| 70 | + |
| 71 | +1. Correctly triage 2-3 issues. |
| 72 | +2. Ask someone on the `triage team |
| 73 | + <https://github.com/orgs/matplotlib/teams/triageteam>`_ (publicly |
| 74 | + or privately) to recommend you to the triage team . If you worked |
| 75 | + with someone on the issue triaged, they would be a good person to |
| 76 | + ask. |
| 77 | +3. Responsibly exercise your new power! |
| 78 | + |
| 79 | +Anyone with commit or triage rights may also nominate a user to be |
| 80 | +invited to join the triage team. |
| 81 | + |
| 82 | + |
| 83 | + |
| 84 | +Triaging operations for members of the core and triage teams |
| 85 | +------------------------------------------------------------ |
| 86 | + |
| 87 | +In addition to the above, members of the core team and the triage team |
| 88 | +can do the following important tasks: |
| 89 | + |
| 90 | +- Update labels for issues and PRs: see the list of `available github |
| 91 | + labels <https://github.com/matplotlib/matplotlib/labels>`_. |
| 92 | + |
| 93 | +- Triage issues: |
| 94 | + |
| 95 | + - **reproduce the issue**, if the posted code is a bug label the issue |
| 96 | + with "status: confirmed bug". |
| 97 | + |
| 98 | + - **identify regressions**, determine if the reported bug used to |
| 99 | + work as expected in a recent version of Matplotlib and if so |
| 100 | + determine the last working version. Regressions should be |
| 101 | + milestoned for the next bug-fix release and may be labeled as |
| 102 | + "Release critical". |
| 103 | + |
| 104 | + - **close usage questions** and politely point the reporter to use |
| 105 | + `discourse <https://discourse.matplotlib.org>`_ or Stack Overflow |
| 106 | + instead and label as "community support". |
| 107 | + |
| 108 | + - **close duplicate issues**, after checking that they are |
| 109 | + indeed duplicate. Ideally, the original submitter moves the |
| 110 | + discussion to the older, duplicate issue |
| 111 | + |
| 112 | + - **close issues that cannot be replicated**, after leaving time (at |
| 113 | + least a week) to add extra information |
| 114 | + |
| 115 | + |
| 116 | + |
| 117 | +.. topic:: Closing issues: a tough call |
| 118 | + |
| 119 | + When uncertain on whether an issue should be closed or not, it is |
| 120 | + best to strive for consensus with the original poster, and possibly |
| 121 | + to seek relevant expertise. However, when the issue is a usage |
| 122 | + question or has been considered as unclear for many years, then it |
| 123 | + should be closed. |
| 124 | + |
| 125 | + |
| 126 | +A typical workflow for triaging issues |
| 127 | +-------------------------------------- |
| 128 | + |
| 129 | +The following workflow [1]_ is a good way to approach issue triaging: |
| 130 | + |
| 131 | +#. Thank the reporter for opening an issue |
| 132 | + |
| 133 | + The issue tracker is many people’s first interaction with the |
| 134 | + Matplotlib project itself, beyond just using the library. As such, |
| 135 | + we want it to be a welcoming, pleasant experience. |
| 136 | + |
| 137 | +#. Is this a usage question? If so close it with a polite message. |
| 138 | + |
| 139 | +#. Is the necessary information provided? |
| 140 | + |
| 141 | + Check that the poster has filled in the issue template. If crucial |
| 142 | + information (the version of Python, the version of Matplotlib used, |
| 143 | + the OS, and the backend), is missing politely ask the original |
| 144 | + poster to provide the information. |
| 145 | + |
| 146 | +#. Is the issue minimal and reproducible? |
| 147 | + |
| 148 | + For bug reports, we ask that the reporter provide a minimal |
| 149 | + reproducible example. See `this useful post |
| 150 | + <https://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports>`_ |
| 151 | + by Matthew Rocklin for a good explanation. If the example is not |
| 152 | + reproducible, or if it's clearly not minimal, feel free to ask the reporter |
| 153 | + if they can provide an example or simplify the provided one. |
| 154 | + Do acknowledge that writing minimal reproducible examples is hard work. |
| 155 | + If the reporter is struggling, you can try to write one yourself. |
| 156 | + |
| 157 | + If a reproducible example is provided, but you see a simplification, |
| 158 | + add your simpler reproducible example. |
| 159 | + |
| 160 | + If you can not reproduce the issue, please report that along with your |
| 161 | + OS, Python, and Matplotlib versions. |
| 162 | + |
| 163 | + If we need more information from either this or the previous step |
| 164 | + please label the issue with "status: needs clarification". |
| 165 | + |
| 166 | +#. Is this a regression? |
| 167 | + |
| 168 | + While we strive for a bug-free library, regressions are the highest |
| 169 | + priority. If we have broken user-code that *used to* work, we should |
| 170 | + fix that in the next patch release! |
| 171 | + |
| 172 | + Try to determine when the regression happened by running the |
| 173 | + reproduction code against older versions of Matplotlib. This can |
| 174 | + be done by released versions of Matplotlib (to get the version it |
| 175 | + last worked in) or by using `git bisect |
| 176 | + <https://git-scm.com/docs/git-bisect>`_ to find the first commit |
| 177 | + where it was broken. |
| 178 | + |
| 179 | + |
| 180 | +#. Is this a duplicate issue? |
| 181 | + |
| 182 | + We have many open issues. If a new issue seems to be a duplicate, |
| 183 | + point to the original issue. If it is a clear duplicate, or consensus |
| 184 | + is that it is redundant, close it. Make sure to still thank the |
| 185 | + reporter, and encourage them to chime in on the original issue, and |
| 186 | + perhaps try to fix it. |
| 187 | + |
| 188 | + If the new issue provides relevant information, such as a better or |
| 189 | + slightly different example, add it to the original issue as a comment |
| 190 | + or an edit to the original post. |
| 191 | + |
| 192 | + Label the closed issue with "status: duplicate" |
| 193 | + |
| 194 | +#. Make sure that the title accurately reflects the issue. If you have the |
| 195 | + necessary permissions edit it yourself if it's not clear. |
| 196 | + |
| 197 | +#. Add the relevant labels, such as "Documentation" when the issue is |
| 198 | + about documentation, "Bug" if it is clearly a bug, "New feature" if it |
| 199 | + is a new feature request, ... |
| 200 | + |
| 201 | + If the issue is clearly defined and the fix seems relatively |
| 202 | + straightforward, label the issue as “Good first issue” (and |
| 203 | + possibly a description of the fix or a hint as to where in the |
| 204 | + code base to look to get started). |
| 205 | + |
| 206 | + An additional useful step can be to tag the corresponding module e.g. |
| 207 | + the "GUI/Qt" label when relevant. |
| 208 | + |
| 209 | + |
| 210 | +.. [1] Adapted from the pandas project `maintainers guide |
| 211 | + <https://dev.pandas.io/docs/development/maintaining.html>`_ and |
| 212 | + `the scikit-learn project |
| 213 | + <https://scikit-learn.org/dev/developers/bug_triaging.html>`_ . |
| 214 | +
|
| 215 | +
|
| 216 | +Working on PRs to help review |
| 217 | +------------------------------ |
| 218 | + |
| 219 | +Reviewing code is also encouraged. Contributors and users are welcome to |
| 220 | +participate to the review process following our :ref:`review guidelines |
| 221 | +<pr-guidelines>`. |
| 222 | + |
| 223 | +Acknowledgments |
| 224 | +--------------- |
| 225 | + |
| 226 | +This page is lightly adapted from `the sckit-learn project |
| 227 | +<https://scikit-learn.org/dev/developers/bug_triaging.html>`_ . |
0 commit comments