SunnySuite / Sunny.jl

Spin dynamics and generalization to SU(N) coherent states
Other
79 stars 19 forks source link

Checkout of `contributed-docs/build` not sparse #203

Closed kbarros closed 8 months ago

kbarros commented 8 months ago

It appears that our docs build is not actually performing a sparse checkout of https://github.com/SunnySuite/SunnyContributed/tree/main/contributed-docs/build. The output below, from running docs/make.jl, indicates 21MB are downloaded, even though the files are small. I wonder if the history has some large files that were removed. cc @ddahlbom.

Initialized empty Git repository in /Users/kbarros/.julia/dev/Sunny/docs/contributed-tmp/.git/
Updating origin
remote: Enumerating objects: 489, done.
remote: Counting objects: 100% (81/81), done.
remote: Compressing objects: 100% (66/66), done.
remote: Total 489 (delta 26), reused 43 (delta 11), pack-reused 408
Receiving objects: 100% (489/489), 21.16 MiB | 1.78 MiB/s, done.
Resolving deltas: 100% (229/229), done.
From https://github.com/SunnySuite/SunnyContributed
 * [new branch]      main       -> origin/main
From https://github.com/SunnySuite/SunnyContributed
 * branch            main       -> FETCH_HEAD
kbarros commented 8 months ago

Can we store the contributed docs build as a tar-gzip and then download from https://raw.githubusercontent.com/SunnySuite/SunnyContributed/main/contributed-docs/build.tgz

For the download: https://docs.julialang.org/en/v1/stdlib/Downloads/#Downloads.download For extracting: https://github.com/JuliaIO/GZip.jl and https://github.com/JuliaIO/Tar.jl.

Alternatively Zlib supports a multi-file archive out of the box, but seems to be less maintained? https://github.com/fhs/ZipFile.jl/blob/master/src/Zlib.jl

kbarros commented 8 months ago

Another option is to store the docs build on a separate branch, say docs-build. Then it can be cloned efficiently using:

git clone --single-branch --branch docs-build git@github.com:SunnySuite/SunnyContributed.git

If it ever gets too big, we can wipe out the history on docs-build and recreate.

ddahlbom commented 8 months ago

I think I favor your first suggestion -- just make a tar and download it. No need to periodically wipe histories to keep the system behaving. I'll try it out.

kbarros commented 8 months ago

Fixed in #213.