Skip to content

DOC Clearer linear "get your development environment" setup documentation #32475

Closed

Description

@lesteve

Note

This issue was opened with @AnneBeyer in mind. If you are looking for an issue to work on, please have a look at our contributing doc and in particular the section Issues for new contributors.

Related to the discussion in #32343.

I think one useful thing that is easier than restructuring the doc would be to have a linear "get your development environment set-up" similar to https://scikit-learn.org/dev/install.html#installing-the-latest-release that you can easily follow step by step. That would replace the "Building from source" section.

Right now you need to go back and forth between different places of the doc which is less than ideal. You would be able to chose your OS and conda vs pip and you would get something that you can follow step by step.

See rst code for the installing doc: https://github.com/scikit-learn/scikit-learn/blob/main/doc/install.rst?plain=1#L28. From a cursory look, it looks like this is using tabs and some include in a few places to share some content.

cc @AnneBeyer in case you find this interesting to work on and @StefanieSenger with whom I had a quick chat about this topic.

Don't hesitate if you need clarifications!

Activity

  1. added
    Needs Triage
    on Oct 10, 2025
  2. added and removed
    Needs Triage
    on Oct 10, 2025
  3. dipak0000812 commented on Oct 10, 2025

    @dipak0000812
  4. Nitin-Prata commented on Oct 11, 2025

    @Nitin-Prata
  5. Ravichandranayakar commented on Oct 11, 2025

    @Ravichandranayakar
  6. lesteve commented on Oct 13, 2025

    @lesteve
    Author
  7. dipak0000812 commented on Oct 13, 2025

    @dipak0000812
  8. Ravichandranayakar commented on Oct 13, 2025

    @Ravichandranayakar
  9. lesteve commented on Oct 13, 2025

    @lesteve
    Author
  10. AnneBeyer commented on Oct 13, 2025

    @AnneBeyer
    Member

    I'm working on this.

  11. StefanieSenger commented on Oct 13, 2025

    @StefanieSenger
    Member

    Hi everyone,

    let's have @AnneBeyer work on this. The problem is there is not so much work for people starting out on scikit-learn and too many issues and tasks are long runners and complicated to see what this is about. If you are having trouble finding something to work on, you can go back on previous PRs and see if you can finish an old one that had been approved by maintainers but that had gone stale. That's not necessarily easy and will take weeks of work, but that's something you can work on without time pressure. Please just make sure not to push generated code that you don't understand yourself.

  12. lesteve commented on Oct 13, 2025

    @lesteve
    MemberAuthor

    I find the matplotlib Setting up for matplotlib development nice. IMO, it seems to hit a good trade-off between conciseness vs easy to follow. More than happy to hear other opinions though, especially with the perspective of someone that is starting to contribute to scikit-learn.

    One thing I would do separately is to have the OS tab level first and then conda/pip tab, but probably they did that for simplicity (conda instructions are mostly the same for all the OSes, activating the venv is different on Windows) ...

  13. DeaMariaLeon commented on Oct 13, 2025

    @DeaMariaLeon
    Member

    I find the matplotlib Setting up for matplotlib development nice.

    I find it very nice too. The hardest part for me about the scikit-learn contribution guide, was the part to go to some other page, and then "come back here". The linked matplotlib is great IMO, as it tells what you are actually supposed to do, from a general point of view first. Then one can see the details.

    As context, the first time I contributed to OS was for scikit-learn. Back then, following the contribution guide was a huge challenge. Three years later (contributing somewhere else) everything makes sense. But I still can miss a step or have a hard time finding a specific instruction. Since I know it's there, I use search. Yet it can be still hard to find.

  14. AnneBeyer commented on Oct 13, 2025

    @AnneBeyer
    Member

    The matplotlib page includes options for using https or ssh for setting up the GitHub connection. Do we want that as well?

  15. StefanieSenger commented on Oct 13, 2025

    @StefanieSenger
    Member

    The matplotlib page includes options for using https or ssh for setting up the GitHub connection. Do we want that as well?

    I think both would be fine, but I would tend to leave it as is. We link to the github docs on forking that explain the difference. We had discussions in the past about what should be included in the contribution guide and what not and the argument that we should be specific to scikit-learn development clicks with me.

  16. lesteve commented on Oct 13, 2025

    @lesteve
    MemberAuthor

    Only https. The main reason is that we want to reduce the number of possible alternatives when possible.

    We switch to https only recently, whose setup is simpler than ssh, see #32320. 1

    People who have set-up SSH keys are likely more proficient with git/GitHub and will know how to tweak the command.

    Footnotes

    1. I have some vague memory than setting up the git credential helper on Linux is not as straightforward as in other OSes, but maybe it has improved since. Also people on Linux are likely proficient with git/GitHub. ↩

  17. AnneBeyer commented on Oct 13, 2025

    @AnneBeyer
    Member

    One non-linearity I see so far is the following:

    Right now, installing for development and installing the package from source (to get the latest, unstable version), link to the same section (with the instruction of starting at step 2 for the dev setup, before jumping there).

    So the two workflows are
    installing for dev:
    clone fork and cd scikit-learn - get OS-specific compilers - install requirements - install editable version from .
    installing from source:
    clone main and cd scikit-learn - get OS-specific compilers - install requirements - install (not necessarily editable version) from .

    @StefanieSenger mentioned that the later could maybe be replaced by pointing to the nightly builds instead.

    Is there any other reason someone would want to install the package from scratch (and require more detailed instructions on how to do so), that we should document both paths explicitly? And if so, should we A) go for a copy of the workflow in install.rst in favor of the linearity? Or do we B) just link to the section on installing for dev there? Or do you have any other suggestions @lesteve @adrinjalali? (The only other files that link to installing from source are the release notes for v1.5 and v1.6)

  18. lesteve commented on Oct 13, 2025

    @lesteve
    MemberAuthor

    As a general guideline, I would try to have something simple to follow for new contributors.

    I would reduce the number of possibilities so only editable install. People who for some reason (I can't only think of any) want non editable installs will figure it out by themselves.

    I would work first on getting a separate page that looks good, which in itself is already a bit of work, with the OS and conda/pip thing.

    About how it fits in the existing doc, tricky topic: for now my current thinking that would probably need to be refined:

    • the contributing page only has a short text with a link to the "get your environment set-up" page (or "build from source" which is more generic, honestly I don't mind too much).
    • it seems like the "building from source" in the install page could point to this link?
    • I would move the install the nightly wheels from scientific-python-nightly-wheels somewhere else (maybe the install page? maybe somewhere else to be defined) ... this is mostly useful for:
      • users who want to test whether a bug is in the development version without building from source
      • other package maintainers who want to test against our development version (in general inside their CI)
  19. betatim commented on Oct 17, 2025

    @betatim
    Member

    I'm super excited for this!

    I'm not sure we need to have separate instructions for "build from source" and "set yourself up for development". I think having only the latter is enough. There aren't that many people who can't use the nightly and for some reason need to build from source. Making them follow the "setup for dev" guide is probably fine.

    I think we could replace https://scikit-learn.org/dev/developers/advanced_installation.html#building-from-source with a link to https://scikit-learn.org/dev/developers/contributing.html#how-to-contribute. WDYT?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions