Skip to content

DOC make build instructions more coherent in doc/developers/advanced_installation.rst - #32343

Merged
lesteve merged 11 commits into
scikit-learn:mainfrom
AnneBeyer:build_docs
Oct 14, 2025
Merged

lesteve merged 11 commits into
scikit-learn:mainfrom
AnneBeyer:build_docs

Conversation

@AnneBeyer

Copy link
Copy Markdown
Member

What does this implement/fix? Explain your changes.

I tried to make the instructions a bit clearer by

  • removing pip install ... from the specific instructions as they were all duplicates of the general instruction
  • moving the note on --config-settings up to the point where it is used
  • adapting Mac and Linux instructions to extend the previously created conda environment instead of creating a new one
  • in the Linux section, making conda the first option, to mirror the order in the general instructions

@github-actions

github-actions Bot commented Oct 2, 2025 •

Copy link
Copy Markdown

✔️ Linting Passed

All linting checks passed. Your pull request is in excellent shape! ☀️

Generated for commit: 5c059eb. Link to the linter CI: here

@jeremiedbb jeremiedbb 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.

Thanks for the PR @AnneBeyer.

@AnneBeyer
AnneBeyer marked this pull request as ready for review October 6, 2025 09:58
@lesteve

lesteve commented Oct 6, 2025 •

Copy link
Copy Markdown
Member

Honestly our contributing doc has been annoying me for some time. In an ideal world you would have some steps that you can follow linearly as a new contributor to get your development environment set-up.

Right now it's mostly a feeling that things could be way better but it would take me maybe one day working full-time on it to have a better idea how to restructure it. I would be very happy to work on it with @AnneBeyer if you feel like it. Having a set of fresh eyes on this kind of content is actually very useful.

Right now our contributing guide is a mix of different things like:

  • there are other ways to contribute to scikit-learn than writing code
  • please don't use AI in harmful ways
  • how to submit a good issue and a good PR
  • a few steps to get set-up but then go to this other page to run more commands and come back here when you are done. Seriously 🙄?
  • here are a few git commands that if you know them you will skim over it and if you don't will not be that useful
  • long PR check-list that probably even a maintainer will never do before opening a PR
  • some information about CI not useful in 99% of cases
  • content about social dynamics of scikit-learn with stalled issues and PRs
  • documentation guidelines
  • how to build the documentation
  • OK I'll stop here but there are other things

The downside of restructuring if that some maintainers may have some habits and know where to find the relevant information (I don't personally) or open this very long page and do Control-F on it to find relevant content.

@AnneBeyer

Copy link
Copy Markdown
Member Author

This actually summarizes my experience of working through that document quite well 😬
I'd be happy to help, feel free to ping me about it.

.. prompt:: bash $

pip install --editable . --verbose --no-build-isolation --config-settings editable-verbose=true
Now go back to :ref:`_pip_build`.

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.

In the ref we need to remove the leading underscore.

Suggested change
Now go back to :ref:`_pip_build`.
Now go back to :ref:`pip_build`.

@lesteve lesteve Oct 8, 2025 •

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 think you would need to do this replacement here and in other places. Right now the doc CI is red mostly because of this.

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.

Yes, I managed to build the docs locally now and will update the PR once I fixed the formatting.

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.

For some reason, linking to an item in an enumeration doesn't work with the :ref: syntax, but I found a way to make it work now.

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.

The links now work fine in the rendered docs, do you have anything else to add @lesteve @jeremiedbb?

@jeremiedbb

Copy link
Copy Markdown
Member

I agree with the summary in #32343 (comment). Nevertheless I believe that this PR is an improvement on its own that we can merge first before diving into a big refactoring of the doc.

@AnneBeyer

Copy link
Copy Markdown
Member Author

I also copied the reference to make clean to the Linux section, because that was what was missing for me when I tried to re-build from source. I kept getting some build-related error when I tried to build the docs locally before.

@StefanieSenger

StefanieSenger commented Oct 8, 2025 •

Copy link
Copy Markdown
Member

Thanks for working on that, @AnneBeyer, and happy to see this consolidating!

This is a bit of a site note, because this would be a new PR, but if you’re interested, you could also add a section to the developing guide on using the new setup for Codespaces.

The idea is to offer codespaces as an alternative during new-contributor sprints, especially for people working on Windows. However, this option isn’t documented yet. I think we could put some basic information that this is an option and how to use it (a paragraph or so).

Of course, this is just a suggestion, please feel free to ignore if this is not something you want to take on.

@lesteve

lesteve commented Oct 14, 2025

Copy link
Copy Markdown
Member

Let's merge this since this is an improvement, thanks a lot @AnneBeyer!

#32475 will improve the situation and hopefully we can do it in the near future 💪 🤞!

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants