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

Allow PR template to catch incomplete tasks #686

Merged
merged 24 commits into from
Mar 11, 2022
Merged

Conversation

cbkerr
Copy link
Member

@cbkerr cbkerr commented Feb 22, 2022

Final checklist:

Description of bug fix

This makes all checkboxes required by adding an "or" to the ones that were previously under a separate heading of "if necessary".

test of relative link

I propose creating a label for possibly breaking changes.

This PR uses the new template before reviews

Motivation and Context

glotzerlab/signac-flow/pull/508 was merged with unchecked boxes. It will be easier to catch this if we don't use checkboxes as radio buttons or otherwise optional items.

Use checkboxes as checklists that must be checked
@cbkerr cbkerr requested review from a team as code owners February 22, 2022 18:33
@cbkerr cbkerr requested review from vyasr and andkerr and removed request for a team February 22, 2022 18:33
@cbkerr cbkerr requested review from csadorf and mikemhenry and removed request for vyasr February 22, 2022 18:36
@codecov
Copy link

codecov bot commented Feb 22, 2022

Codecov Report

Merging #686 (68c0137) into master (a5937cb) will not change coverage.
The diff coverage is n/a.

❗ Current head 68c0137 differs from pull request most recent head 055f7c7. Consider uploading reports for the commit 055f7c7 to get more accurate results

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #686   +/-   ##
=======================================
  Coverage   78.54%   78.54%           
=======================================
  Files          65       65           
  Lines        7141     7141           
  Branches     1565     1565           
=======================================
  Hits         5609     5609           
  Misses       1228     1228           
  Partials      304      304           

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 a5937cb...055f7c7. Read the comment docs.

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

@bdice bdice left a comment

Choose a reason for hiding this comment

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

Comments attached. Overall I would be happy to see this document streamlined — I think less content is better than more in the template. Large blocks of instructions are often ignored, in my experience with creating PRs on other projects and seeing PRs from new contributors on projects I maintain. Maybe we can outsource more content to the CONTRIBUTING document.

.github/PULL_REQUEST_TEMPLATE.md Outdated Show resolved Hide resolved
.github/PULL_REQUEST_TEMPLATE.md Outdated Show resolved Hide resolved
.github/PULL_REQUEST_TEMPLATE.md Outdated Show resolved Hide resolved
.github/PULL_REQUEST_TEMPLATE.md Outdated Show resolved Hide resolved
.github/PULL_REQUEST_TEMPLATE.md Outdated Show resolved Hide resolved
@bdice bdice removed the request for review from andkerr February 27, 2022 18:35
Copy link
Contributor

@csadorf csadorf left a comment

Choose a reason for hiding this comment

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

I agree with @bdice 's comments. Please address those and then re-request review from me. Thank you.

Copy link
Contributor

@csadorf csadorf left a comment

Choose a reason for hiding this comment

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

I have one minor suggestion, but overall this is fine.

I still feel like the list is overall maybe a bit too long. Lack of testing is automatically controlled by codecov for example. Code style is automatically checked by linters and autoformatters. How would you feel about dropping all items that should be automatically enforced? @bdice Also interested in your opinion here.

.github/PULL_REQUEST_TEMPLATE.md Outdated Show resolved Hide resolved
.github/PULL_REQUEST_TEMPLATE.md Outdated Show resolved Hide resolved
@cbkerr
Copy link
Member Author

cbkerr commented Mar 4, 2022

Code style is automatically checked by linters and autoformatters.

I like getting rid of the code style check, since that is part of the code guidelines

Lack of testing is automatically controlled by codecov for example

I think having the box for tests would help remind me to include tests while I'm starting the PR as opposed to when reviews are nearly done.

.github/PULL_REQUEST_TEMPLATE.md Outdated Show resolved Hide resolved
.github/PULL_REQUEST_TEMPLATE.md Outdated Show resolved Hide resolved
.github/PULL_REQUEST_TEMPLATE.md Outdated Show resolved Hide resolved
.github/PULL_REQUEST_TEMPLATE.md Outdated Show resolved Hide resolved
.github/PULL_REQUEST_TEMPLATE.md Outdated Show resolved Hide resolved
@bdice
Copy link
Member

bdice commented Mar 4, 2022

I still feel like the list is overall maybe a bit too long. Lack of testing is automatically controlled by codecov for example.

Code coverage isn't really a metric of whether code is tested adequately. I wouldn't rely on codecov alone, since it is very prone to noise and doesn't really indicate whether the code has bugs -- only that it executes. Removing a line of documentation decreases net coverage, while splitting a single line of code into multiple lines sometimes increases coverage...

Code style is automatically checked by linters and autoformatters. How would you feel about dropping all items that should be automatically enforced?

Code style can be removed from the checklist, that is sufficiently enforced by our CI at this point.

@cbkerr
Copy link
Member Author

cbkerr commented Mar 9, 2022

I think this is ready for final review (even though not all is checked off). I updated the PR description with the new checklist.
Do I need to update the changelog?

@cbkerr cbkerr requested a review from bdice March 9, 2022 23:21
@bdice
Copy link
Member

bdice commented Mar 9, 2022

Do I need to update the changelog?

Nope, this kind of thing isn't put in the changelog (that's also a funny question, in a "meta" way 😉).

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

@bdice bdice left a comment

Choose a reason for hiding this comment

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

I approve. This is (after many iterations and great patience by all involved) an improvement over the current PR template! Thanks @cbkerr. The final form of this PR will need to be copied to other signac projects. Note that some templates may be different, like signac-docs. Similarly, signac-dashboard doesn't currently track contributors in the same way as signac and signac-flow (I have used git shortlog -sne > contributors.txt at release time, for simplicity). Do whatever makes the most sense to you for those cases.

@bdice
Copy link
Member

bdice commented Mar 11, 2022

It looks like we have a test failure related to pytest-xdist. It looks like worker 0 collected some tests for MongoDB that were not collected by worker 1, and one of those tests failed. 😕 I guess we have a few paths forward:

  • Disable pytest-xdist
  • Only run signac tests in parallel and run synced collections tests separately
  • Ignore this failure and hope it's infrequent

@bdice bdice requested a review from csadorf March 11, 2022 01:15
@bdice bdice dismissed csadorf’s stale review March 11, 2022 01:16

csadorf is on vacation and this has enough reviews.

@bdice bdice merged commit 050de42 into master Mar 11, 2022
@bdice bdice deleted the fix/update-pr-template branch March 11, 2022 01:16
@vyasr
Copy link
Contributor

vyasr commented Mar 11, 2022

The two workers collecting different threads is a symptom, not the problem. If you look at the failure, it's in the code that actually decides whether or not to run MongoDB tests by testing whether a MongoDB server can be accessed. The problem is almost certainly coming from a race condition between the two processes in performing the test write to the same MongoDB server. The brute force solution is to replace the except clause with a blanket except Exception. Worst case we just don't run MongoDB tests. If we want to be a little safer to avoid failing in serial contexts, we could detect whether or not we're running with pytest-xdist before deciding whether to allow arbitrary exceptions through.

@b-butler b-butler added this to the v1.8.0 milestone Sep 19, 2022
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.

6 participants