Skip to content

DOC Clean up the PR checklist - #34239

Merged
lesteve merged 31 commits into
scikit-learn:mainfrom
AnneBeyer:doc_update_pr_checklist
Jul 20, 2026
Merged

lesteve merged 31 commits into
scikit-learn:mainfrom
AnneBeyer:doc_update_pr_checklist

Conversation

@AnneBeyer

@AnneBeyer AnneBeyer commented Jun 10, 2026 •

Copy link
Copy Markdown
Member

Reference Issues/PRs

This plan has been around for a while and it came up again recently here: #34211 (comment)

What does this implement/fix? Explain your changes.

The current version contains too many details and is not very concise. This is an attempt to change that.
I created two different "paths" for contributing code or documentation, and tried to reorder the previous points into BEFORE, WHEN and AFTER opening a PR. The diff is quite large, so it probably makes more sense to look at the rendered docs.

The formulations can still be improved, and there are still some things left to do (see comments below), but I would like to get some feedback on the general structure.

WDYT? @StefanieSenger @virchan @DeaMariaLeon (also tagging @lucyleeow and @lesteve just for reference)

First time contributor introduction

AI usage disclosure

I used AI assistance for:

Any other comments?

Comment thread doc/developers/contributing.rst Resolved
Comment thread doc/developers/contributing.rst Resolved
Comment thread doc/developers/contributing.rst Resolved
Comment thread doc/developers/contributing.rst Outdated

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

If I'm not mistaken, CI complains if codecov decreases from main, so it actually requires 100% for new code.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

And in another place in this document, we write we require 90% coverage.
What do you think about removing this entirely from here? People will see it when they check the CI and see not all tests have passed.

Comment thread doc/developers/contributing.rst Resolved
Comment thread doc/developers/contributing.rst Resolved

@StefanieSenger StefanieSenger left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yes, that restructuring definitely improves readability. I'm happy about how this goes.

Comment thread doc/developers/contributing.rst Resolved
Comment thread doc/developers/contributing.rst Resolved
Comment thread doc/developers/contributing.rst Resolved
Comment thread doc/developers/contributing.rst Resolved
Comment thread doc/developers/contributing.rst Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

And in another place in this document, we write we require 90% coverage.
What do you think about removing this entirely from here? People will see it when they check the CI and see not all tests have passed.

Comment thread doc/developers/contributing.rst Outdated
Comment on lines 616 to 628

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Now that we recommend pre-commit, having information on mypy here may not be very important anymore. I would remove it as well.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I removed the parts on coverage and mypy here, but I'm not sure if this kind of information should be kept somewhere for (new) maintainers? I would leave this for another follow-up, though.

@AnneBeyer AnneBeyer added this to Labs Jun 10, 2026
@github-project-automation github-project-automation Bot moved this to Todo in Labs Jun 10, 2026
@AnneBeyer AnneBeyer moved this from Todo to In progress in Labs Jun 10, 2026
@scikit-learn scikit-learn deleted a comment from github-actions Bot Jun 11, 2026

@lisaleemcb lisaleemcb left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Small wording suggestions

Comment thread doc/developers/contributing.rst Resolved
Comment thread doc/developers/contributing.rst Resolved
Comment thread doc/developers/contributing.rst Resolved
@AnneBeyer

Copy link
Copy Markdown
Member Author

Small wording suggestions

Thank you, @lisaleemcb! I think these are all valid improvements, but could you open a separate PR for those? I would like to keep this PR focused on things related to the PR checklist as much as possible, as the diff is already quite large.

@github-actions github-actions Bot added the CI:Linter failure The linter CI is failing on this PR label Jun 15, 2026
@github-actions github-actions Bot removed the CI:Linter failure The linter CI is failing on this PR label Jun 22, 2026

.. _coding-guidelines:

Coding guidelines

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Something for a follow-up:
The Coding Guidelines are currently part of Developing scikit-learn estimators, but I'd think they rather deserve an own page/section inside the contribution guidelines.
They also contain a subsection about sklearn.utils, which gives some details here and then links to doc/developers/utilities.rst for more details. This could probably be combined into one at some point.

@AnneBeyer

Copy link
Copy Markdown
Member Author

I think now everything that is left are pointers to follow-ups.
@virchan and @FrancoisPgm, are you ok with the changes that came after your approval?
@jeremiedbb, would you like to have another look as well?

@AnneBeyer

Copy link
Copy Markdown
Member Author

Two things I also learned on the way:

  • bold now defaults to strong in HTML to decouple it from the visual only impact, so screen readers can add emphasis for those text spans (which is not the same as a structural entity, but makes a difference nonetheless).
  • All caps should also be avoided because some screen readers can interpret it as acronyms and will read it out letter by letter.

@DeaMariaLeon

Copy link
Copy Markdown
Member

bold now defaults to strong in HTML

I don't agree but that's fine.

@AnneBeyer

AnneBeyer commented Jul 18, 2026 •

Copy link
Copy Markdown
Member Author

bold now defaults to strong in HTML

I don't agree

Why? This line from doc/developers/contributing.rst

**Before** opening a PR, make sure that:

is formatted like this in the generated doc/_build/html/stable/developers/contributing.html

<p><strong>Before</strong> opening a PR, make sure that:</p>

@AnneBeyer

Copy link
Copy Markdown
Member Author

If you are participating in the EuroPython/EuroScipy Sprint, we're happy to hear your thoughts on the new version of the PR checklist proposed here. Here is the direct link to see the new version.

@DeaMariaLeon

DeaMariaLeon commented Jul 18, 2026 •

Copy link
Copy Markdown
Member

bold now defaults to strong in HTML

I don't agree

Why? This line from doc/developers/contributing.rst

**Before** opening a PR, make sure that:

is formatted like this in the generated doc/_build/html/stable/developers/contributing.html

<p><strong>Before</strong> opening a PR, make sure that:</p>

That is a reStructuredText Markup Specification/docutils convention. Not an HTML default or change.
EDIT: in HTML one is <strong> and another one is <b>, they remain two distinct elements and they don't default to the other.

@DeaMariaLeon

Copy link
Copy Markdown
Member

This is relevant Now, how do screen readers support such semantics?

And:
I always was under the impression that if I add emphasis to a piece of text in HTML by adding an em or a strong element, this emphasis would also be indicated to screen reader users in some way. For example, by a change of the tone of voice, much like if you are reading a text out aloud and add emphasis to a certain word by speaking slightly louder.
It turns out that this is not the case at all. As Steve Faulkner recently documented (again), none of the most commonly used screen readers like VoiceOver, JAWS, or NVDA convey the text semantics of those elements to users. And they also don’t expose em or strong element role semantics in the accessibility tree.
From: https://matthiasott.com/notes/screen-readers-semantics-strong-em

Comment thread doc/developers/contributing.rst Resolved
Comment thread doc/developers/contributing.rst Resolved
Comment thread doc/developers/contributing.rst Resolved

@lesteve lesteve left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I had a quick look at it and it seems a significant improvement already, so I will set auto-merge.

In an ideal world, I would make it even shorter 1 but I am not sure how easy/achievable this is, so let's merge this improvement already.

Not sure I am a huge fan of the "doc PR" vs "code PR" tabs but let's not delay this much further 😉. My main arguments is that tabs are easy to miss + I would not mind adding two special subsections "Specific points for doc PRs", "Specific points for code PRs". Probably you have thought of this and did not go this way for likely good reasons too 😉.

Footnotes

  1. for example inclusion criteria is not relevant for 99.9% of external contributors' PRs. Similarly, adding benchmarks are not relevant for the vast majority of PRs. ↩

@lesteve
lesteve enabled auto-merge (squash) July 20, 2026 12:18
auto-merge was automatically disabled July 20, 2026 13:50

Head branch was pushed to by a user without write access

@lesteve

lesteve commented Jul 20, 2026

Copy link
Copy Markdown
Member

Thanks for the PR and fixing my mistakes with GitHub suggestions, let's merge this one then!

Feel free to open follow-up PRs for other improvements that were mentioned and that I may have missed.

@lesteve
lesteve merged commit e241756 into scikit-learn:main Jul 20, 2026
33 checks passed
@github-project-automation github-project-automation Bot moved this from PR waiting for reviews to Done in Labs Jul 20, 2026
prady0t pushed a commit to prady0t/scikit-learn that referenced this pull request Sep 2, 2026
Co-authored-by: Stefanie Senger <[email protected]>
Co-authored-by: Jérémie du Boisberranger <[email protected]>
Co-authored-by: Loïc Estève <[email protected]>
@AnneBeyer
AnneBeyer deleted the doc_update_pr_checklist branch September 2, 2026 09:29
@jeremiedbb jeremiedbb mentioned this pull request Sep 8, 2026
14 tasks done
jeremiedbb added a commit to jeremiedbb/scikit-learn that referenced this pull request Sep 9, 2026
Co-authored-by: Stefanie Senger <[email protected]>
Co-authored-by: Jérémie du Boisberranger <[email protected]>
Co-authored-by: Loïc Estève <[email protected]>
jeremiedbb added a commit to jeremiedbb/scikit-learn that referenced this pull request Sep 9, 2026
Co-authored-by: Stefanie Senger <[email protected]>
Co-authored-by: Jérémie du Boisberranger <[email protected]>
Co-authored-by: Loïc Estève <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Documentation Waiting for Second Reviewer First reviewer is done, need a second one!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants