8000 [MRG+1] CI gratuitous optimisation of doc pushing by jnothman · Pull Request #7887 · scikit-learn/scikit-learn · GitHub
[go: up one dir, main page]

Skip to content

[MRG+1] CI gratuitous optimisation of doc pushing #7887

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

Merged
merged 1 commit into from
Nov 16, 2016

Conversation

jnothman
Copy link
Member

This is completely unnecessary, but in cloning scikit-learn.github.io, I realised how much faster that can be done with a couple of flags to git.

@NelleV NelleV changed the title CI gratuitous optimisation of doc pushing [MRG+1] CI gratuitous optimisation of doc pushing Nov 16, 2016
fi
cd $DOC_REPO
git config core.sparseCheckout true
echo $dir > .git/info/sparse-checkout
Copy link
Member

Choose a reason for hiding this comment

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

I am really surprised that this should be done manually. It seems very error prone.

Are you sure that this is the right way to do a sparse checkout?

Copy link
Member Author

Choose a reason for hiding this comment

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

No. I did it this way when the only resource to ask was man. But now that I look, it does indeed seem to be the standard way to do it.

Copy link
Member Author

Choose a reason for hiding this comment

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

After all, why put a command interface to a newline-delimited plain text file?

@amueller
Copy link
Member

LGTM

@amueller amueller merged commit 0c7ee83 into scikit-learn:master Nov 16, 2016
sergeyf pushed a commit to sergeyf/scikit-learn that referenced this pull request Feb 28, 2017
Sundrique pushed a commit to Sundrique/scikit-learn that referenced this pull request Jun 14, 2017
NelleV pushed a commit to NelleV/scikit-learn that referenced this pull request Aug 11, 2017
paulha pushed a commit to paulha/scikit-learn that referenced this pull request Aug 19, 2017
@jnothman
Copy link
Member Author

A fancier way to make scikit-learn.github.io light is to not store any documentation in the master branch, and instead store each version in another branch, linked in via git submodules. This transition can be achieved with:

git submodule init
git checkout master
git checkout -b cheap-clone master
dirs="0.15 0.16 0.17 0.18 0.19 dev"
git rm $dirs
for v in $dirs
do
    # Copy each directory into its own branch
    git checkout cheap-clone
    git branch -d -D version-$v
    git checkout --orphan version-$v
    git rm -rf * .nojekyll
    git checkout master $v
    git mv $v/{*,.[a-z]*} .
    git commit -am "Version $v"
    git push origin version-$v:version-$v
    git checkout -f cheap-clone
    git submodule add https://github.com/scikit-learn/scikit-learn.github.io/ $v
    cd $v
    git checkout version-$v
    cd ..
    git commit -am "Add version $v as submodule"
done
git push origin cheap-clone:master

Such a change is almost entirely gratuitous.

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
0