-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
DOCS: include how to reproduce CI in PR template #17153
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DOCS: include how to reproduce CI in PR template #17153
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
General structure
I find this list rather intimidating (this is not a comment on your PR but on the list in general). I'm always put off if I have to read through lengthy PR instructions.
I propose to create subsections for different aspects of PR like this:
General:
- Code is Flake 8 compliant (run
flake8
on changed files to check) - ...
If new feature:
- New features are documented, with examples if plot related
- For major features add an entry to doc/users/next_whats_new/ (follow instructions in README.rst there)
If API changed:
- Documented in doc/api/api_changes_[VERSION] if API changed in a
backward-incompatible way (follow instructions in README.rst there)
That way a user with simple bug fix or documentation fix doesn't have to read the new feature and API changed sections.
.github/PULL_REQUEST_TEMPLATE.md
Outdated
[build](https://matplotlib.org/devel/documenting_mpl.html#building-the-docs) | ||
without error) | ||
- [ ] New documentation conforms to matplotlib style conventions. (If you have | ||
`flake8-docstrings` and `pydocstyle<4` installed, run |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can lift the restriction on pydocstyle<4
. This was introduced in #14710 because of https://gitlab.com/pycqa/flake8-docstrings/issues/36 but is likely not neccessary anymore.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That bug was fixed, but the latest versions (I think pydocstyle>5.0.1
) now crash on figure.py
, as per PyCQA/pydocstyle#437. 4.0
also crashes and I didn't feel like chasing versions around so I left it at the one that I knew already worked...
I agree that the list is pretty imposing. I agree that splitting it up into sections would do a lot to help ameliorate number of brain cells required to figure out which of the check boxes apply to a PR. We could even include a comment that lets people know they can delete sections that don't apply to them. I think the main thing that would make it less imposing would actually be changing the title. PR Checklist sounds like something that someone would be upset at me for messing up. Can't think of a good replacement right now but maybe something along the lines of "Useful PR Checks". |
For easy reading of the "rendered" version, here's my proposed PR template, after including @timhoffm's suggestions: PR SummarySummary would go here. Usually, only one or two of the check-box sections below would apply, and the rest could be omitted. PR ChecklistsFor new code:
For new documentation:
For new features:
For API changes:
|
ebbf32b
to
2ed0b55
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for putting this in & I wrote most of this language so I'm mostly critiquing my earlier work 🙃
.github/PULL_REQUEST_TEMPLATE.md
Outdated
For new documentation: | ||
|
||
- [ ] Documentation is sphinx and numpydoc compliant (the docs should [build](https://matplotlib.org/devel/documenting_mpl.html#building-the-docs) without error) | ||
- [ ] New documentation conforms to matplotlib style conventions. (If you have `flake8-docstrings` and `pydocstyle<4` installed, run `flake8 --docstring-convention=all` on changed files to check). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't need the new (for consistency w/ above - if it's in the PR it should conform to the conventions)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess I worry that users will try to submit a simple PR and think they have to clean up warnings from an entire file, instead of just making sure that the docs they add/touch follow the conventions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Although I guess it could be argued that if it fails flake8 --docstring-convention=all
with our .flake8
file, it should be fixed, since we already explicitly ignore all "known" errors.
.github/PULL_REQUEST_TEMPLATE.md
Outdated
|
||
- Do not create the PR out of master, but out of a separate branch. | ||
|
||
- The PR title should summarize the changes, for example "Raise ValueError on | ||
non-numeric input to set_xlim". Avoid non-descriptive titles such as | ||
non-numeric input to set_xlim". Avoid non-descriptive titles such as |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kind think maybe take out the descriptive pieces up top and replace w/ another checklist (folks seem to pay more attention to lists than to prose)
Pull Request
[] PR has descriptive name
[]PR has minimum of 1-2 sentence descriptive summary
[] optional:PR cross-links related issues
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So I included a "Meta" section. To be honest, I think it's a little clearer just as prose, especially since it makes the already imposing list of checklists even longer....but if we have better luck with the checkboxes I guess you gotta do what you know works....
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about making the "Meta" section bullet points? This is more like a reminder. I don't want to tick numerous boxes when making a PR. These things are easy to apply and there is no reason not to immediately do it (in contrast to e.g. writing good tests, where sometimes it's reasonable to open a PR without.)
Same would maybe apply to "New Documentation" section?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree that I don't want to be checking off boxes for every PR when it's just things like "did you fill in the summary".
If I do make them just bullet points, then I see no need for it to ever be rendered (reviewer knows about these, don't need the visual noise), so I've changed it to be commented out by default.
Pasted latest version below.
No description provided. |
PR SummaryPR ChecklistsNew code:
New documentation:
New features:
API changes:
|
.github/PULL_REQUEST_TEMPLATE.md
Outdated
<!-- | ||
Meta: | ||
|
||
- PR title summarizes the changes. (For example, prefer "Raise `ValueError` on non-numeric input to `set_xlim`" instead of "Addresses issue #8576"). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure how this long line will look. Is it better to hard-wrap after a fixed number of characters? (Also for other lines)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I think it makes sense to hard-wrap the comment lines. I played around with Github's current PR screen in dev mode and it has weird behavior on resizing but if we wrap at 79 characters we should be safe from having weird wrapping artifacts.
The checkbox lines interact funny with screen resizing because they're full of big "words" (e.g. doc/api/api_changes_[NEXT_VERSION]/README.rst
), so I'd vote we leave them as single lines and let the Github text box wrap them for us "naturally".
If Github ever loses its mind and adds a horizontal slider to these boxes then we can come back and wrap those lines in the Markdown.
.github/PULL_REQUEST_TEMPLATE.md
Outdated
<!-- | ||
Meta: | ||
|
||
- PR title descriptively summarizes the changes. (For example, prefer "Raise `ValueError` on non-numeric input to `set_xlim`" to "Addresses issue #8576"). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added some copyedits directly, but think since this is a bullet list now anyway:
- PR title summarizes the changes. (Example: "Raise
ValueError
on non-numeric inputset_xlim
" )- Please don't use non-descriptive titles such as "Addresses issue support 'markevery' in prop_cycle #8576"
- PR has at least a 1-2 sentence descriptive summary of how the PR implements the changes.
.github/PULL_REQUEST_TEMPLATE.md
Outdated
- [ ] Documented in `doc/api/api_changes_[NEXT_VERSION]` if API changed in a backward-incompatible way (follow instructions in `doc/api/api_changes_[NEXT_VERSION]/README.rst`) | ||
|
||
<!-- | ||
Meta: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd pull this to the top of the template since it's the first thing they should do.
Thanks for the patience and great iterative feedback guys, I think we're getting close! The organizational shift to have the section previously called "meta" at the top looks like it works really well, since it's now basically the first thing the user reads and avoids redundant language that way. Decided to make all checkboxes sentence fragments (previously there was mis-mash of full sentences and fragments). Happy to instead go to all full sentences if this way looks silly to you guys, but figured they should all be the same, and this way is much shorter. |
PR SummaryPR ChecklistsNew code:
New documentation:
New features:
API changes:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small typos and corrections.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm torn with the first and last section. While they provide useful and comforting information, this makes the template rather long, which I personally find discouraging.
The alternative would be to drastically shorten and just link
https://matplotlib.org/devdocs/devel/coding_guide.html#summary-for-pr-authors.
@timhoffm, I actually agree that ideally this template would contain just the checklist (with no prose at the end). The actual prompt could be short and just read
But in order for that to work, IMO, we would need to be able to link a single page of the dev docs, and effectively have the checklist there. Currently, this is split over two places:
I think centralizing these instructions is enough work for a separate PR, and we have made two very concrete improvements in this new version:
While I would love this PR to contain the shorter version of the template, pointing at the docs, I propose we merge this long version to get the benefits of the new additions, and when the docs have been centralized a bit (PR incoming), that PR can also shorten this template. |
f49eb24
to
6587344
Compare
Can you drop this either on |
e845229
to
d32f471
Compare
Pushed to my |
For example, one might try going here and clicking Create pull request. For me, the template is 8.5-9 scroll lengths long. If I resize the entry as tall as possible, it is 3 and bit pages. This may be a bit too long, even though every subsection is short. I would need to compare it to other's to get a feel for that. It's too bad GitHub doesn't have multiple PR templates like for issues. |
Co-Authored-By: Elliott Sales de Andrade <[email protected]>
d32f471
to
b2c6070
Compare
A lot of work went into this. I'm somewhat against it, versus having the short checklist and a link to the actual docs explaining all this. But if those who like it actually like it, please merge. If you don't actually like it, lets close it? |
Thanks for bringing this to my attention again @jklymak. I also think the bulk of the improvements that I'm starting to do here should go directly into the dev docs instead. Closing in favor of #18341, which accomplishes the original goal without all the bloat that grew here (which I should also pull out into a proper PR of the dev docs). |
PR Summary
Implement the suggestions to the PR checklist described in (https://discourse.matplotlib.org/t/how-to-engage-more-contributors-to-matplotlib/21059/11) and discussed in the last call.
Basically, gives users explicit instructions for how to "check" that each of the checkboxes is actually ready to check.
PR Checklist