TheAlgorithms / Python

All Algorithms implemented in Python
https://thealgorithms.github.io/Python/
MIT License
194.41k stars 45.65k forks source link

Hacktoberfest flooded this repository with pull requests #3609

Closed amaank404 closed 3 years ago

amaank404 commented 4 years ago

If possible can we all please focus on pull request and close the unnecessary ones

amaank404 commented 4 years ago

dear maintainers, if possible please check this issue out.

@cclauss @dhruvmanila

cclauss commented 4 years ago

https://github.com/TheAlgorithms/Python/issues/2510#issuecomment-701540969

We should have a GitHub Action that autocloses PRs that do not have tests.

Criteria:

  1. Search Python code for ">>>" and
  2. Search Python filenames for test_.py or _test.py

If both of those tests fail then the Action should autoclose the PR with a note pointing the contributor to CONTRIBUTING.md.

amaank404 commented 4 years ago

Oh. I did not know that. Bye! Have a great day ahead.

dhruvmanila commented 4 years ago

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.

cclauss commented 4 years ago

any other conditions where auto-closing a PR

No annotations (type hints). I believe that this would require inspect or ast.

amaank404 commented 4 years ago

Auto-labelling is a great idea, it highly simplifies the complete process of reviewing.

amaank404 commented 4 years ago

I was also thinking about this #3239, Any suggestions?

poyea commented 4 years ago

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.

poyea commented 4 years ago

@xcodz-dot There're some updates this year: https://hacktoberfest.digitalocean.com/hacktoberfest-update

amaank404 commented 4 years ago

Ok, thanks for letting me know. I logged into hactoberfest on 1st October and the article was released on 3rd October

ronnydw commented 4 years ago

#2510 (comment)

We should have a GitHub Action that autocloses PRs that do not have tests.

Criteria:

  1. Search Python code for ">>>" and
  2. Search Python filenames for test_.py or _test.py

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.

cclauss commented 4 years ago

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.

amaank404 commented 4 years ago

https://github.com/actions/stale I found this, anyone who can implement it for PRs?

dhruvmanila commented 4 years ago

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.

amaank404 commented 4 years ago

You are right but we need a action for PR (stale is implemented for issues only), #3707.

dhruvmanila commented 4 years ago

Um, no. https://github.com/TheAlgorithms/Python/blob/master/.github/workflows/stale.yml It is implemented both for PR and issues.

amaank404 commented 4 years ago

Whoops! thanks for letting me know. 😄

amaank404 commented 4 years ago

Please close these PRs

3741 #3737 (they are duplicates of #3743) Those three PR's are made by the same person @agpeshal

NumberPiOso commented 4 years ago

Is there any way we can help you with the pull requests ?

cclauss commented 4 years ago

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!

sudoShikhar commented 4 years ago

@xcodz-dot Please help me with my PR #3706 Its been 8 days, pending for review. Am i missing on something?

cclauss commented 4 years ago

Hacktoberfest 2020 stats: started with 30 open PRs, ended with 521.

sudoShikhar commented 4 years ago

Hacktoberfest 2020 stats: started with 30 open PRs, ended with 521.

I'd love to help up clear out the load of work!!

amaank404 commented 4 years ago

Try suggesting changes, review PRs, mention maintainers (not me) if it is good to go. Thanks.

sudoShikhar commented 4 years ago

Try suggesting changes, review PRs, mention maintainers (not me) if it is good to go. Thanks.

On it.

mrmaxguns commented 4 years ago

What is to be done to the pull requests whose authors have not followed the contribution guidelines and/or the code has invalid syntax?

amaank404 commented 4 years ago

@mrmaxguns, you can suggest changes, write messages regarding their checklist

dhruvmanila commented 4 years ago

Some stats regarding the Hacktoberfest: 🔢

mrmaxguns commented 4 years ago

This is troubling considering the contribution guidelines are very detailed.

cclauss commented 4 years ago

Oh, I do not agree. I think our high standards is what led to a lot of these PRs being considered spam. I see a ton of repos who take in any code without running any tests without requiring doctests, type hints, no plagerism. Those repos are useless but a ton of folks get free tee-shirts. I am really happy that we have high standards and that we do not dumb down our approach for Hacktoberfest.

mrmaxguns commented 4 years ago

I agree. What I meant to say was that people should pay attention to the contribution guidelines before submitting a pull request so that it is easier for people to give them feedback.

cclauss commented 4 years ago

In a perfect world...

dhruvmanila commented 4 years ago

That is why we are trying to set up a bot in this repository so that the bot takes care of the lower-level stuff for us to focus on the actual algorithm. :)

prashantdoshi28 commented 4 years ago

Hi all, I have a question regarding PRs.

Do we follow rule of 1 concept per PR sort of thing here or is it ok if a PR has multiple unrelated codes ?

If we don't allow such PRs, do we have any flag to mark them so maintainers can reject those straight away?

Thanks :)

dhruvmanila commented 4 years ago

We have a label Multiple Algorithms Not Allowed in black :)

prashantdoshi28 commented 4 years ago

Another question, may sound dumb, but is there any documentation of labels we use, for example,

Multiple Algorithms Not Allowed : PR should be limited to single functionality only, multiple unrelated code in a PR not allowed.

If there is no such documentation, I can add it to repo, let me know.

Thanks :)

dhruvmanila commented 4 years ago

Only members can add or update the labels. Thanks for the suggestion!

amaank404 commented 3 years ago

According to the rate of PR Reviews, I think this might take upto 130 days to bring back numbers to near 10.

cclauss commented 3 years ago

Yeah but at least we will be prepared for the next Hacktoberfest.

amaank404 commented 3 years ago

Possibly, If any of you guys could suggest them an idea

https://github.com/TheAlgorithms/Java/issues/1929

amaank404 commented 3 years ago

I am sure that pull requests are getting closed beacause of stale rather than our reviews. Although that's good :smile:

amaank404 commented 3 years ago

time to close this

cclauss commented 3 years ago

Yes. At least until 02 Oct. 2021.