Skip to content

DOC add doc repo cleanup to release process - #32620

Merged
lesteve merged 4 commits into
scikit-learn:mainfrom
adrinjalali:doc/cleanup
Nov 13, 2025
Merged

lesteve merged 4 commits into
scikit-learn:mainfrom
adrinjalali:doc/cleanup

Conversation

@adrinjalali

Copy link
Copy Markdown
Member

This adds cleanup of the doc repo to the release process to make sure we do the cleanup periodically not to reach the limit again.

cc @lesteve @jeremiedbb

@github-actions

github-actions Bot commented Oct 31, 2025 •

Copy link
Copy Markdown

✔️ Linting Passed

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

Generated for commit: fc2bbb5. Link to the linter CI: here

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

Thanks a few minor questions and comments but this is already very useful.

One question: should we start by doing it at every major release or every minor release? I am not 100% sure how the maintainer templating works.

Comment thread doc/developers/maintainer.rst.template Outdated
{% endif %}

- The `scikit-learn/scikit-learn.github.io` needs to be cleaned up so that ideally
it stays <5GB in size. Before doing this, create a fork of the existing repo

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 guess you also need to sync main on your fork if the idea is to keep the history "just in case"?

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.

changed this to "new fresh fork"

# need a non-shallow copy, and using https is much faster than ssh here
git clone https://github.com/scikit-learn/scikit-learn.github.io.git
cd scikit-learn.github.io
git remote add write [email protected]:scikit-learn/scikit-learn.github.io.git

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.

Just curious why not use https here too? Full disclosure: I have always used https and never bothered with git clone git@ (mostly for simplicity, for a very long time I was afraid of the complexity of setting up SSH keys 😅)

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.

This is what I did, I don't want to bother with authentication of https and 2FA every time I clone something, so I setup my keys once, and never do GH authentication again locally.

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 either would do. The point is not to forget about it.

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.

Yeah, in practice when the repo is so large, it makes quite a bit of a difference in the time it takes to finish this task

Comment thread doc/developers/maintainer.rst.template Outdated
{% endif %}

- The `scikit-learn/scikit-learn.github.io` needs to be cleaned up so that ideally
it stays <5GB in size. Before doing this, create a fork of the existing repo

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.

Just curious do you know whether the indicative ~5GB acceptable size is for the .git or for the total size of the git clone. For one commit for scikit-learn .git is at 1.6G, git clone is at 5.2G.

MNE-Python which is using a similar strategy (squash commits every release) for one commit 2.3G git clone 7.6G.

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.

It's total size of the repo and its history, so includes .git folder. That's the recommendation, but the hard limit is 100GB.

Comment thread doc/developers/maintainer.rst.template Resolved
@adrinjalali

Copy link
Copy Markdown
Member Author

One question: should we start by doing it at every major release or every minor release? I am not 100% sure how the maintainer templating works.

I also don't know, I'm hoping @jeremiedbb will have a look and tell us which templating to do. This file is a lot more confusing to edit for me compared to last time I had a look at it.

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

LGTM besides the following question:

git branch -D main
# rename current branch to main to replace it
git branch -m main
git push --force write main

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.

Don't you need to commit anything? Or does git branch -m main creates a commit automatically?

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.

Yep, forgot to put it here

@lesteve

lesteve commented Oct 31, 2025

Copy link
Copy Markdown
Member

One question: should we start by doing it at every major release or every minor release? I am not 100% sure how the maintainer templating works.

I also don't know, I'm hoping @jeremiedbb will have a look and tell us which templating to do. This file is a lot more confusing to edit for me compared to last time I had a look at it.

Looks like right now this is every release which is OK (major and bug-fix), although every major release is probably fine as well, see rendered doc

image

@lesteve

lesteve commented Nov 13, 2025

Copy link
Copy Markdown
Member

Let's merge this one and adapt in the future if needed!

@lesteve
lesteve merged commit 5159057 into scikit-learn:main Nov 13, 2025
@adrinjalali
adrinjalali deleted the doc/cleanup branch November 13, 2025 14:46
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.

3 participants