-
-
Notifications
You must be signed in to change notification settings - Fork 5k
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
MAINT: Label new PRs with relevant languages and modules #16870
Conversation
Maintainers and some contributors might be interested in browsing PRs based on the languages they modify. The "Cython", "Fortran" and "C/C++" exist to do so, but have to be manually added during triage work. This commit add a GitHub workflow to automatically label Pull Requests with the "Cython", "Fortran" and "C/C++" labels if they modify files whose names match one of the associated defined globs. The setup is inspired from scikit-learn's, which relies on @thomasjpfan's work. Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
Thanks @jjerphan. I had done that and we actually removed it after testing it out. The reason was that it was running after every commit and sometimes going agains manual updates. Like you would add a label and it would remove it (or the other way around). It was based on an official action (they have a few bug reports and even some PRs about that, but the action is abandoned). Does this action do something else? I am personally happy to reconsider something like that. |
We just had our community meeting and the reception was positive. Provided the action does not remove any manual update of the labels from a maintainer. To the proposed configuration, I would add filters to add the label for the modules too. These are the tedious ones that should not require much thinking. |
Based on scikit-learn's setup and scipy#14677. The the 'any' for `scipy.sparse` has been changed to 'all' for a correct (I think) labeling. Co-authored-by: Pamphile Roy <roy.pamphile@gmail.com> Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good, thanks for the update @jjerphan. @thomasjpfan could you review this since it's your extension?
On my side I only have one comment about merging the two config files to only have a single job.
Co-authored-by: Pamphile Roy <roy.pamphile@gmail.com> Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My take on this is 👍 Since I was involved in the previous work, I will let another maintainer have a look and merge if they also agree.
Again, thank you both for your help!
Following the @thomasjpfan's remark in #16870 (comment), |
Ideally yes an official action sounds nice. But as I said before, this action's maintenance is not ideal (maybe this is changing as a release was recently made). This is what we used and there was some sync problem-still not resolved, see actions/labeler#113. So if your PR works, I prefer to go with it instead. And I know Thomas would support this better 😉 I would plan to merge this on Friday unless there are more comments/concerns. |
Alright, let's try this out. Thanks everyone 🙇 |
Thank you! IIRC, maintainer can run a script to update Pull Requests that were created before the merge of this PR. @thomasjpfan: SciPy's maintainers are interested running it and if this does not necessitate too much search, do you still have the script you have used for scikit-learn to update Pull Requests? |
Don't worry, I am not sure that would fly as we are pretty conservative and cautious. |
@jjerphan there might be an issue with the labeller. I can see that it was never run even on PR made by maintainers where we don't need to accept workflows to run first. |
Thanks for following-up. In this case, I think it is be sensible trying to change the It is a bit documented on this piece of documentation about I think we can try replacing |
I would suggest to test this out in a personal fork. |
Reference issue
Rework of #14677
Relates to #14709 and #14967
What does this implement/fix?
Maintainers and some contributors might be interested in browsing PRs based on the languages they modify or modules they modify.
The "Cython", "Fortran" and "C/C++", as well as labels for each modules exist to do so, but have to be manually added during triage work.
This commit adds a GitHub workflow to automatically label Pull Requests based on file they modify. The workflow is only run once when the PRs, allowing adapting the labels manually then if needed.
The setup is inspired from scikit-learn's, which relies on @thomasjpfan's project:
thomasjpfan/labeler
.Additional information
I have defined globs based on the pattern I saw in the code base.
Yet, there might be better patterns.
Also this setup can be extended to label PRs based on the sub-modules they modify.
Moreover it is possible to run a script to label existing Pull Requests.
This PR is inspired from scikit-learn/scikit-learn#19850.
cc @tupui, @rgommers