Hacktoberfest flooded this repository with pull requests
If possible can we all please focus on pull request and close the unnecessary ones
dear maintainers, if possible please check this issue out.
@cclauss @dhruvmanila
https://github.com/TheAlgorithms/Python/issues/2510#issuecomment-701540969
We should have a GitHub Action that autocloses PRs that do not have tests.
Criteria:
- Search Python code for "
>>>" and - Search Python filenames for test_*.py or *_test.py
- https://docs.pytest.org/en/stable/goodpractices.html#conventions-for-python-test-discovery
If both of those tests fail then the Action should autoclose the PR with a note pointing the contributor to CONTRIBUTING.md.
Oh. I did not know that. Bye! Have a great day ahead.
Sorry I've been a bit busy, lot of things going on. This seems like a good idea, I will get onto it. One more thing we should do is use labels extensively. This will give a short summary of what is happening in a given PR and it will become the first point of contact between a maintainer and a user.
- [x] Script for auto-closing PR which do not contain tests (any other conditions where auto-closing a PR would help?)
- [x] Auto-label PRs?: tests are failing (I have already written a script for this using PyGithub library), merge-conflicts (search auto label merge conflicts) ...,
- [ ] Write a note for maintainers about the importance of labels
- [ ] IDEA for Project Euler PRs: As we don't want to be flooded with PRs for beginner level problems, I restricted to not submit problems that exist in this repository. Users still do that so make a script which will close them.
any other conditions where auto-closing a PR
No annotations (type hints). I believe that this would require inspect or ast.
Auto-labelling is a great idea, it highly simplifies the complete process of reviewing.
I was also thinking about this #3239, Any suggestions?
I see 10 open implementations for Problem 50 of Project Euler.
My opinion is for hacktoberfest-accepted, we may make it a bit lenient. I'm not sure if closing PRs with hacktoberfest-accepted tagged sounds logical or not.
@xcodz-dot There're some updates this year: https://hacktoberfest.digitalocean.com/hacktoberfest-update
Ok, thanks for letting me know. I logged into hactoberfest on 1st October and the article was released on 3rd October
We should have a GitHub Action that autocloses PRs that do not have tests.
Criteria:
Search Python code for "
>>>" andSearch Python filenames for test_*.py or *_test.py
- https://docs.pytest.org/en/stable/goodpractices.html#conventions-for-python-test-discovery
If both of those tests fail then the Action should autoclose the PR with a note pointing the contributor to CONTRIBUTING.md.
Please also include unittest and perhaps pytest. doctest are not the most beautiful way to add test code: http://www.rohitschauhan.com/index.php/2018/07/05/python-relative-benefits-of-pytest-unittest-nose-and-doctest/#:~:text=Pytest%20provides%20essentially%20the%20same,very%20easy%20to%20do%20so.
They are included in 2. above. Our automated testing uses pytest, not nose or unittest. Tests that follow pytest discovery rules will ensure that those PRs are not autoclosed.
Doctests are not pretty but they are more simple for first-time contributors to understand. Contributors are free to chose either kind of test but we do not need to confuse contributors but explaining both.
https://github.com/actions/stale I found this, anyone who can implement it for PRs?
This has already been implemented but the number of days before an issue becomes stale is 30 so it takes time to see the difference.
You are right but we need a action for PR (stale is implemented for issues only), #3707.
Um, no. https://github.com/TheAlgorithms/Python/blob/master/.github/workflows/stale.yml It is implemented both for PR and issues.
Whoops! thanks for letting me know. 😄
Please close these PRs #3741 #3737 (they are duplicates of #3743) Those three PR's are made by the same person @agpeshal
Is there any way we can help you with the pull requests ?
Anyone can review any pull request on any repo on GitHub.
Look at PRs that have passing tests and then near the top of the pull request click Files changed and read thru the changes... Are they clear? Are they an improvement? Are there tests? Do those tests cover a sensable set of cases (large numbers, small numbers, zero, negative numbers, integers, floating-point numbers, strings, empty strings, lists, tuples, dicts, etc.)? Are there type hints on all function parameters and return values?
When you have had a good read through the changes, click the Review changes button at the upper right and call 'em like you see 'em. Positive reviews will give maintainers confidence that you have read through the contribution and believe that it would help to improve the repo. Other comments can help the contributor to improve their work so that it is easier for visitors to read and easier for maintainers to review. Thx!