Skip to content
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

[WIP] Added new PR template. #1010

Merged
merged 12 commits into from
Jan 22, 2020
Merged

Conversation

percygautam
Copy link
Contributor

Added a new PR template.

@percygautam
Copy link
Contributor Author

@OriolAbril Kindly check if something needs to be changed or added.

Copy link
Member

@OriolAbril OriolAbril left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like a lot the matplotlib template, I would make some changes to make it a little more similar.

I think my key points can be summarized in: PR should be informative yet not scary for novices while also being complete yet not too much of an overhead for contributors. Therefore I would include the links in a comment (like it is done in matplotlib's template) and in the checklist section I would try to use more concise and clear points (e.g. part or all of the pull request checklist (see also next paragraph)).

Having said that, I had not thought about having several templates until I have seen you change type section and now I really like the idea. How do you feel about creating 3 templates? They could have a common skeleton and then their checklists could diverge.

Documentation

In docs improvements, it generally is important to know numpydoc style, whereas unit tests or pylint are not really relevant.

Bug fix

Here documentation may not be relevant, whereas a unit test checking the issue does not appear again is.

New feature/enhancement

This will generally need both tests and docs

Note 1: I also like the first line of xarray template:

<!-- Feel free to remove check-list items aren't relevant to your change -->

Note 2: I think (we can merge like this and see what happens) that the folder should be named PULL_REQUEST_TEMPLATE.

@percygautam
Copy link
Contributor Author

@OriolAbril I think it's a good idea. I haven't yet seen any other organization yet having separate templates for pull request. I found this guide here, the folder should be named PULL_REQUEST_TEMPLATE.
Also, the commented guides and links will remove much hassle for contributors, and at the same time helps the new contributors.
I'll create the skeleton template first then diverge it into three sub-branches.

Copy link
Member

@OriolAbril OriolAbril left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some comments that generally apply to all templates. This looks really good, just trying to find the balance between completeness and simplicity.

.github/PULL_REQUEST_TEMPLATE/bug-fix.md Outdated Show resolved Hide resolved
.github/PULL_REQUEST_TEMPLATE/bug-fix.md Outdated Show resolved Hide resolved
.github/PULL_REQUEST_TEMPLATE/bug-fix.md Outdated Show resolved Hide resolved
.github/PULL_REQUEST_TEMPLATE/bug-fix.md Outdated Show resolved Hide resolved
.github/PULL_REQUEST_TEMPLATE/bug-fix.md Show resolved Hide resolved
.github/PULL_REQUEST_TEMPLATE/bug-fix.md Outdated Show resolved Hide resolved
Copy link
Member

@OriolAbril OriolAbril left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some minor comments. Thanks for all the work, this looks great and keeps getting better

.github/PULL_REQUEST_TEMPLATE/bug-fix.md Show resolved Hide resolved
.github/PULL_REQUEST_TEMPLATE/bug-fix.md Outdated Show resolved Hide resolved
PR format (described below)?
- [ ] Has added unit tests to prevent issue recurrence( using [pytest fixture pattern](
(https://docs.pytest.org/en/latest/fixture.html#fixture))?
- [ ] Is code style correct (are you using pylint, black)?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(follows pylint, black guidelines)

.github/PULL_REQUEST_TEMPLATE/bug-fix.md Outdated Show resolved Hide resolved

- [ ] Does this PR follow the [official](https://github.com/arviz-devs/arviz/blob/master/CONTRIBUTING.md#pull-request-checklist)
PR format?
- [ ] Has added unit tests to prevent issue recurrence( using [pytest fixture pattern](
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix parentheses

Copy link
Contributor

@aloctavodia aloctavodia Jan 17, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo: Does this PR follows...

I found the second point a little bit hard to read (maybe because I am not a native speaker). Could we use a more direct way to say it, maybe something like.

Does the PR include new or updated tests to prevent issue recurrence?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will be " Does this PR follow.....". After using does, the 's' after the verb is not used (confirmed by my editor).
And, I have changed the second point as @aloctavodia said.

PR format?
- [ ] Has added unit tests to prevent issue recurrence( using [pytest fixture pattern](
(https://docs.pytest.org/en/latest/fixture.html#fixture))?
- [ ] Is code style correct (follows pylint, black guidelines?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also parentheses and maybe "pylint and black", sorry my initial suggestion was the comma

- [ ] Is code style correct (follows pylint, black guidelines?

<!--
Also, please consider reading the contributing guidelines and code of conduct carefully before submitting the PR. It is available at
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They are available at

And I would use bullet points to ease copy pasting the links

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, makes sense.


- [ ] Does this PR follow the [official](https://github.com/arviz-devs/arviz/blob/master/CONTRIBUTING.md#pull-request-checklist)
PR format?
- [ ] Has added unit tests to prevent issue recurrence( using [pytest fixture pattern](
Copy link
Contributor

@aloctavodia aloctavodia Jan 17, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo: Does this PR follows...

I found the second point a little bit hard to read (maybe because I am not a native speaker). Could we use a more direct way to say it, maybe something like.

Does the PR include new or updated tests to prevent issue recurrence?

- [ ] Has added/updated unit tests where appropriate( using [pytest fixture pattern](
(https://docs.pytest.org/en/latest/fixture.html#fixture))?
- [ ] Is code style correct (follows pylint, black guidelines)?
- [ ] Has added documentation for new feature/functionality?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggested changes:

Included a sample plot to visually illustrate your changes? (only for plot-related functions)
Is the new feature properly documented with an example?

PR format?
- [ ] Included a sample plot to visually illustrate your changes?
- [ ] Do all the added functions and methods have docstrings?
- [ ] Has added/updated unit tests where appropriate( using [pytest fixture pattern](
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe we can change it to:

Does the PR include new or updated tests to cover the new feature?

Copy link
Member

@OriolAbril OriolAbril left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM


- [ ] Does the PR follow [official](https://github.com/arviz-devs/arviz/blob/master/CONTRIBUTING.md#pull-request-checklist)
PR format?
- [ ] Included a sample plot to visually illustrate your changes? (only for plot-related functions)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is a sample plot included to visually... ? This past at the beginning in the sentence sounds strange

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now that you mention it, it does sound strange. I'll change it.


<!--
Also, please consider reading the contributing guidelines and code of conduct carefully before submitting the PR. They are available at
- https://github.com/arviz-devs/arviz/blob/master/CONTRIBUTING.md and
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would remove the and at the end

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay

@OriolAbril
Copy link
Member

We completely forgot about the changelog, I guess it will be a good thing to put a check about this in the checklist, especially now that it is new and we are not used to using it.

@percygautam
Copy link
Contributor Author

I also think it will be a good idea. I am adding a sample changelog check in the checklist for discussion.

Copy link
Member

@OriolAbril OriolAbril left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding the changelog check.

- [ ] Does the PR include new or updated tests to prevent issue recurrence (using [pytest fixture pattern](
https://docs.pytest.org/en/latest/fixture.html#fixture))?
- [ ] Is your code style correct (follows pylint and black guidelines)?
- [ ] Added the change in [change log](https://github.com/arviz-devs/arviz/blob/master/CHANGELOG.md) in correct format.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In order to make the most out of having 3 PR templates, I would use something like Is fix listed in the [Maintenance and fixes](https://github.com/arviz-devs/arviz/blob/master/CHANGELOG.md#maintenance-and-fixes) section of the changelog?.

Note that using the #maintenance-and-fixes will always link to the first occurrence of "Maintenance and fixes" (the second is actually #maintenance-and-fixes-1 and so on). Unless there were some typo in the changelog section title the link will always point to the Unrelease section of the changelog. A similar thing can be done with the other sections and PR templates.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@OriolAbril Okay, Should we also specify a format to add changes to changelog?

Comment on lines 27 to 28
- [ ] Is fix listed in the [Maintenance and fixes](https://github.com/arviz-devs/arviz/blob/master/CHANGELOG.md#maintenance-and-fixes)
section of the changelog?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here this should refer to the Documentation subsection: https://github.com/arviz-devs/arviz/blob/master/CHANGELOG.md#documentation instead of the maintenance and fixes.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@OriolAbril Yes, I understand. Sorry, I have not seen the structure of changelog.md before.

Comment on lines 32 to 33
- [ ] Is fix listed in the [Maintenance and fixes](https://github.com/arviz-devs/arviz/blob/master/CHANGELOG.md#maintenance-and-fixes)
section of the changelog?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here this should refer to the New features subsection: https://github.com/arviz-devs/arviz/blob/master/CHANGELOG.md#new-features instead of the maintenance and fixes.

@OriolAbril
Copy link
Member

I think it is ready to merge

@aloctavodia aloctavodia merged commit 285ed3d into arviz-devs:master Jan 22, 2020
@aloctavodia
Copy link
Contributor

Thanks @percygautam!

@percygautam percygautam deleted the pr_template branch January 22, 2020 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants