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

Add PR review checklist #1192

Closed
wants to merge 4 commits into from
Closed

Conversation

arjunsavel
Copy link
Contributor

@arjunsavel arjunsavel commented Jun 18, 2020

Per hackathon 7/15 discussion, GH actions currently don't pass secrets necessary for bot comments to PRs made from forks. Will convert to draft for now, but hopefully there'll be some progress on this front w.r.t. GH actions functionality at some point!

Description

I'm adding a GitHub workflow file that provides a comment below each PR after it's opened.

Motivation and Context

This fixes #1169 by providing a checklist for reviewers to reference for every opened PR.

How Has This Been Tested?

I've run this successfully on one of my own repos.

Screenshots (if appropriate):

comment_PR
**Per hackathon 7/15 discussion, GH actions currently don't pass secrets necessary for bot comments to PRs made from forks. Will convert to draft for now, but hopefully there'll be some progress on this front w.r.t. GH actions functionality at some point!

Per hackathon 7/15 discussion, GH actions currently don't pass secrets necessary for bot comments to PRs made from forks. Will convert to draft for now, but hopefully there'll be some progress on this front w.r.t. GH actions functionality at some point!

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have assigned/requested two reviewers for this pull request.

@codecov
Copy link

codecov bot commented Jun 18, 2020

Codecov Report

Merging #1192 into master will increase coverage by 0.58%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1192      +/-   ##
==========================================
+ Coverage   77.13%   77.71%   +0.58%     
==========================================
  Files          89       91       +2     
  Lines        5551     5727     +176     
==========================================
+ Hits         4282     4451     +169     
- Misses       1269     1276       +7     
Impacted Files Coverage Δ
tardis/io/util.py 73.56% <0.00%> (ø)
tardis/analysis.py 0.00% <0.00%> (ø)
tardis/io/decay.py 89.65% <0.00%> (ø)
tardis/util/base.py 77.77% <0.00%> (ø)
tardis/stats/base.py 0.00% <0.00%> (ø)
tardis/io/__init__.py 100.00% <0.00%> (ø)
tardis/plasma/base.py 58.27% <0.00%> (ø)
tardis/_astropy_init.py 56.81% <0.00%> (ø)
tardis/io/model_reader.py 97.70% <0.00%> (ø)
tardis/io/parsers/csvy.py 89.74% <0.00%> (ø)
... and 56 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e95ca26...f51b8a9. Read the comment docs.

@arjunsavel
Copy link
Contributor Author

@harpolea — what items do you think would be sufficient for the PR checklist? I think I remember you discussing this, but can't quite remember!

@harpolea
Copy link
Contributor

@arjunsavel You can find the list that we came up with in the TARDIS google drive. I'll paste it here as well:

Before a PR is accepted, it must meet the following criteria:

  • Is the necessary information provided?
  • Is this a duplicate PR?
    • If a new PR is clearly a duplicate, ask how this PR is different from the original PR?
    • If this PR is about to be merged, close the original PR with a link to this new PR that solved the issue.
  • Does it pass existing tests and are new tests provided if required?
    • The test coverage should not decrease, and for new features should be at or very close to 100%.
  • Is the code properly documented?
    • If this modifies existing code, then the docs should be updated. If this adds a new feature, additional documentation should be created.
    • Sphinx and docstrings in the code (in numpydoc format)
  • Does this conform to PEP 8 and the TARDIS style guidelines?
    • TODO: write TARDIS style guidelines
  • Does the PR fix the problem it describes?
    • Make sure it doesn’t e.g. just fix the problem for a specific case
    • Is this the best way of fixing the problem?
  • Is the code tidy?
    • No unnecessary print lines or code comments

[ ] If this modifies existing code, then the docs should be updated. If this adds a new feature, additional documentation should be created. \n
[ ] Sphinx and docstrings in the code (in numpydoc format) \n
[ ] Does this conform to PEP 8 and the TARDIS style guidelines? \n
Copy link
Member

Choose a reason for hiding this comment

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

Where does "TARDIS style guidelines" live - can we add a link to them here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't think that we have these yet — currently an issue (#1170 ) and a PR (#1183 ). Would you recommend removing this line for now, waiting until we have a style guide to push this, or something else?

Copy link
Member

Choose a reason for hiding this comment

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

Yeah I think we can remove TARDIS style guidelines and perhaps put black code style (with black hyperlinked).

@arjunsavel
Copy link
Contributor Author

Also, the action is failing here, but it seems like this is a problem with GitHub Actions permissions for PRs from forks. This should be fixed once it's merged with master. I've gotten something similar working on one of my own repositories.

@arjunsavel arjunsavel marked this pull request as ready for review July 8, 2020 18:17
Copy link
Member

@jaladh-singhal jaladh-singhal left a comment

Choose a reason for hiding this comment

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

@arjunsavel This bot look really good to me. 👍

But I think we need to talk (next Wednesday) about what things we want to add/remove/modify from this, considering ideas we dropped in PR template document today. Besides we also need to lighten up the content in TARDIS PR template since many things will be covered by this bot's checklist.

.github/workflows/PR_reviews.yml Outdated Show resolved Hide resolved
@jaladh-singhal
Copy link
Member

@epassaro @Jordi5 I would encourage you to look at this - if the bot brings up the checklist, IMO we can remove the checklist altogether from PR template which will help to not mistaken them as to-dos by GH and will also make PR template simpler as other examples we saw today. Let me know what do you guys think?

Co-authored-by: Jaladh Singhal <jaladhsinghal@gmail.com>
@arjunsavel
Copy link
Contributor Author

Per hackathon 7/15 discussion, GH actions currently don't pass secrets necessary for bot comments to PRs made from forks. Will convert to draft for now, but hopefully there'll be some progress on this front w.r.t. GH actions functionality at some point!

@marxwillia
Copy link
Contributor

@aribalam This would be a good PR for you to work on during the bonding period.

@aribalam
Copy link
Contributor

@marxwillia Right on it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add PR review checklist
9 participants