From 8da1af7223c7e2b6043b4a415008412ec5d0e999 Mon Sep 17 00:00:00 2001 From: Fons van der Plas Date: Fri, 16 May 2025 15:26:24 +0200 Subject: [PATCH 1/3] Update Pluto and deps to 0.20.8 --- pluto-deployment-environment/Manifest.toml | 51 +++++++++++++++------- 1 file changed, 35 insertions(+), 16 deletions(-) diff --git a/pluto-deployment-environment/Manifest.toml b/pluto-deployment-environment/Manifest.toml index fa4282e7..66656db8 100644 --- a/pluto-deployment-environment/Manifest.toml +++ b/pluto-deployment-environment/Manifest.toml @@ -44,6 +44,19 @@ git-tree-sha1 = "962834c22b66e32aa10f7611c08c8ca4e20749a9" uuid = "944b1d66-785c-5afd-91f1-9de20f533193" version = "0.7.8" +[[deps.Compat]] +deps = ["TOML", "UUIDs"] +git-tree-sha1 = "8ae8d32e09f0dcf42a36b90d4e17f5dd2e4c4215" +uuid = "34da2185-b29b-5c13-b0c7-acf172513d20" +version = "4.16.0" + + [deps.Compat.extensions] + CompatLinearAlgebraExt = "LinearAlgebra" + + [deps.Compat.weakdeps] + Dates = "ade2ca70-3891-5945-98fb-dc099432e06a" + LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" + [[deps.ConcurrentUtilities]] deps = ["Serialization", "Sockets"] git-tree-sha1 = "d9d26935a0bcffc87d2613ce14c527c99fc543fd" @@ -100,9 +113,9 @@ uuid = "2e619515-83b5-522b-bb60-26c02a35a201" version = "2.6.5+0" [[deps.ExpressionExplorer]] -git-tree-sha1 = "bf2e6a47b70dfb5d103f300ef83d950239f9fa50" +git-tree-sha1 = "4a8c0a9eebf807ac42f0f6de758e60a20be25ffb" uuid = "21656369-7473-754a-2065-74616d696c43" -version = "1.1.2" +version = "1.1.3" [[deps.ExproniconLite]] git-tree-sha1 = "c13f0b150373771b0fdc1713c97860f8df12e6c2" @@ -119,17 +132,11 @@ git-tree-sha1 = "fd1b6f327472d0faf28b4d1fda8d9b582ab136df" uuid = "ff7dd447-1dcb-4ce3-b8ac-22a812192de7" version = "0.1.6" -[[deps.FuzzyCompletions]] -deps = ["REPL"] -git-tree-sha1 = "be713866335f48cfb1285bff2d0cbb8304c1701c" -uuid = "fb4132e2-a121-4a70-b8a1-d5b831dcdcc2" -version = "0.5.5" - [[deps.Git]] -deps = ["Git_jll"] -git-tree-sha1 = "04eff47b1354d702c3a85e8ab23d539bb7d5957e" +deps = ["Git_jll", "JLLWrappers", "OpenSSH_jll"] +git-tree-sha1 = "2230a9cc32394b11a3b3aa807a382e3bbab1198c" uuid = "d7ba0133-e1db-5d97-8f8c-041e4b3a1eb2" -version = "1.3.1" +version = "1.4.0" [[deps.Git_jll]] deps = ["Artifacts", "Expat_jll", "JLLWrappers", "LibCURL_jll", "Libdl", "Libiconv_jll", "OpenSSL_jll", "PCRE2_jll", "Zlib_jll"] @@ -142,6 +149,12 @@ git-tree-sha1 = "97285bbd5230dd766e9ef6749b80fc617126d496" uuid = "c27321d9-0574-5035-807b-f59d2c89b15c" version = "1.3.1" +[[deps.GracefulPkg]] +deps = ["Compat", "Pkg", "TOML"] +git-tree-sha1 = "ec6d498af5b39005fc458bfcc41a780169abccc9" +uuid = "828d9ff0-206c-6161-646e-6576656f7244" +version = "2.1.0" + [[deps.HTTP]] deps = ["Base64", "CodecZlib", "ConcurrentUtilities", "Dates", "ExceptionUnwrapping", "Logging", "LoggingExtras", "MbedTLS", "NetworkOptions", "OpenSSL", "PrecompileTools", "Random", "SimpleBufferStream", "Sockets", "URIs", "UUIDs"] git-tree-sha1 = "f93655dc73d7a0b4a368e3c0bce296ae035ad76e" @@ -286,6 +299,12 @@ version = "1.2.1" uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908" version = "1.2.0" +[[deps.OpenSSH_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "OpenSSL_jll", "Zlib_jll"] +git-tree-sha1 = "cb7acd5d10aff809b4d0191dfe1956c2edf35800" +uuid = "9bd350c2-7e96-507f-8002-3f2e150b4e1b" +version = "10.0.1+0" + [[deps.OpenSSL]] deps = ["BitFlags", "Dates", "MozillaCACerts_jll", "OpenSSL_jll", "Sockets"] git-tree-sha1 = "38cb508d080d21dc1128f7fb04f20387ed4c0af4" @@ -310,9 +329,9 @@ version = "10.42.0+1" [[deps.Parsers]] deps = ["Dates", "PrecompileTools", "UUIDs"] -git-tree-sha1 = "44f6c1f38f77cafef9450ff93946c53bd9ca16ff" +git-tree-sha1 = "7d2f8f21da5db6a806faf7b9b292296da42b2810" uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0" -version = "2.8.2" +version = "2.8.3" [[deps.Pkg]] deps = ["Artifacts", "Dates", "Downloads", "FileWatching", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "Random", "SHA", "TOML", "Tar", "UUIDs", "p7zip_jll"] @@ -324,10 +343,10 @@ weakdeps = ["REPL"] REPLExt = "REPL" [[deps.Pluto]] -deps = ["Base64", "Configurations", "Dates", "Downloads", "ExpressionExplorer", "FileWatching", "FuzzyCompletions", "HTTP", "HypertextLiteral", "InteractiveUtils", "LRUCache", "Logging", "LoggingExtras", "MIMEs", "Malt", "Markdown", "MsgPack", "Pkg", "PlutoDependencyExplorer", "PrecompileSignatures", "PrecompileTools", "REPL", "RegistryInstances", "RelocatableFolders", "Scratch", "Sockets", "TOML", "Tables", "URIs", "UUIDs"] -git-tree-sha1 = "6f31e71063d158b69c1b84c7c3a1a7d4db153143" +deps = ["Base64", "Configurations", "Dates", "Downloads", "ExpressionExplorer", "FileWatching", "GracefulPkg", "HTTP", "HypertextLiteral", "InteractiveUtils", "LRUCache", "Logging", "LoggingExtras", "MIMEs", "Malt", "Markdown", "MsgPack", "Pkg", "PlutoDependencyExplorer", "PrecompileSignatures", "PrecompileTools", "REPL", "RegistryInstances", "RelocatableFolders", "Scratch", "Sockets", "TOML", "Tables", "URIs", "UUIDs"] +git-tree-sha1 = "a105834e8c86157bba9def667dde7ed79cb405b4" uuid = "c3e4b0f8-55cb-11ea-2926-15256bba5781" -version = "0.20.6" +version = "0.20.8" [[deps.PlutoDependencyExplorer]] deps = ["ExpressionExplorer", "InteractiveUtils", "Markdown"] From 6059320a4c3f3386b4e3e78a14411c3fe5e80386 Mon Sep 17 00:00:00 2001 From: Fons van der Plas Date: Fri, 16 May 2025 17:05:31 +0200 Subject: [PATCH 2/3] Notebook diffs --- .github/workflows/NotebookDifference.yaml | 56 ++++++++++++++++++++ pluto-deployment-environment/Manifest.toml | 10 +++- pluto-deployment-environment/Project.toml | 1 + tools/diff.jl | 60 ++++++++++++++++++++++ tools/update_notebook_packages.jl | 4 +- 5 files changed, 128 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/NotebookDifference.yaml create mode 100644 tools/diff.jl diff --git a/.github/workflows/NotebookDifference.yaml b/.github/workflows/NotebookDifference.yaml new file mode 100644 index 00000000..b679fbbe --- /dev/null +++ b/.github/workflows/NotebookDifference.yaml @@ -0,0 +1,56 @@ +name: Compare notebook files +on: + # workflow_dispatch: + # push: + # paths-ignore: + # - "**.md" + # branches: + # - main + pull_request: + paths-ignore: + - "**.md" + +jobs: + notebook-changes-check: + runs-on: ubuntu-24.04 + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + path: source + + + - name: Checkout + uses: actions/checkout@v4 + with: + ref: dist + path: gh_pages_dir + + + - name: Install Julia + uses: julia-actions/setup-julia@v2 + with: + # note: this version should match the version in the other actions in this repo + version: "1.11" + + - name: Cache Julia artifacts & such + uses: julia-actions/cache@v2 + with: + cache-registries: "true" + + # We set up a folder that Pluto can use to cache exported notebooks. If the notebook file did not change, then Pluto can take the exported file from cache instead of running the notebook. + - name: Set up notebook state cache + uses: actions/cache@v4 + with: + path: pluto_state_cache + # use the same key as the export action on the main branch: + key: ${{ runner.os }}-pluto_state_cache-v3-${{ hashFiles('**/Project.toml', '**/Manifest.toml') }}-${{ github.run_id }} + # here, you want to use the same restore key, but without the Project/Manifest hash: + restore-keys: | + ${{ runner.os }}-pluto_state_cache-v3 + + - name: Compare notebooks in PR + run: | + julia --threads=auto source/tools/diff.jl + diff --git a/pluto-deployment-environment/Manifest.toml b/pluto-deployment-environment/Manifest.toml index 66656db8..25775221 100644 --- a/pluto-deployment-environment/Manifest.toml +++ b/pluto-deployment-environment/Manifest.toml @@ -2,7 +2,7 @@ julia_version = "1.11.5" manifest_format = "2.0" -project_hash = "13a51ad2b377d764861ea553e631182e0e81a599" +project_hash = "9854db52c26347aaaf320fc7b5e3c74d874b1bb3" [[deps.AbstractPlutoDingetjes]] deps = ["Pkg"] @@ -354,6 +354,14 @@ git-tree-sha1 = "9071bfe6d1c3c51f62918513e8dfa0705fbdef7e" uuid = "72656b73-756c-7461-726b-72656b6b696b" version = "1.2.1" +[[deps.PlutoNotebookComparison]] +deps = ["Compat", "ExpressionExplorer", "HTTP", "InteractiveUtils", "LibGit2", "Logging", "LoggingExtras", "Markdown", "Pkg", "Pluto", "PlutoSliderServer", "TOML", "URIs"] +git-tree-sha1 = "ad309f681e6f3812d943933ef736267911ebccc3" +repo-rev = "main" +repo-url = "https://github.com/JuliaPluto/PlutoNotebookComparison.jl" +uuid = "828d9ff0-206c-6161-646e-6576656f7242" +version = "1.0.0" + [[deps.PlutoSliderServer]] deps = ["AbstractPlutoDingetjes", "Base64", "BetterFileWatching", "Configurations", "Distributed", "FromFile", "Git", "Glob", "HTTP", "JSON", "Logging", "Pkg", "Pluto", "PlutoDependencyExplorer", "SHA", "Serialization", "Sockets", "TOML", "TerminalLoggers", "UUIDs"] git-tree-sha1 = "9e1a630079de12343df2ccf9a90c46177bd38780" diff --git a/pluto-deployment-environment/Project.toml b/pluto-deployment-environment/Project.toml index ccd0eeae..f3f0f5f8 100644 --- a/pluto-deployment-environment/Project.toml +++ b/pluto-deployment-environment/Project.toml @@ -1,3 +1,4 @@ [deps] Pluto = "c3e4b0f8-55cb-11ea-2926-15256bba5781" +PlutoNotebookComparison = "828d9ff0-206c-6161-646e-6576656f7242" PlutoSliderServer = "2fc8631c-6f24-4c5b-bca7-cbb509c42db4" diff --git a/tools/diff.jl b/tools/diff.jl new file mode 100644 index 00000000..1824b78f --- /dev/null +++ b/tools/diff.jl @@ -0,0 +1,60 @@ +source = joinpath(@__DIR__, "..") + + +function tryexpanduser(path) + try + expanduser(path) + catch ex + path + end +end + +tamepath = abspath ∘ tryexpanduser + +pluto_state_cache = tamepath("pluto_state_cache") +gh_pages_dir = tamepath("gh_pages_dir") + +if !isdir(pluto_state_cache) || readdir(pluto_state_cache) == [] + @warn "Running this script without a GitHub Actions PlutoSliderServer cache. Using a local cache in the temp dir." + pluto_state_cache = joinpath(tempdir(), "bmlip cache") +end + +cd(source) + +using Pkg +Pkg.activate(joinpath(source, "pluto-slider-server-environment")) +Pkg.instantiate() + +using PlutoNotebookComparison + +include(joinpath(@__DIR__, "DramaBrokenLink.jl")) + + +sources_old = [ + PSSCache(pluto_state_cache) + WebsiteDir(gh_pages_dir) + WebsiteAddress("https://bmlip.github.io/colorized/") + SafePreview() +] + +sources_new = [ + PSSCache(pluto_state_cache) + RunWithPlutoSliderServer(; Export_cache_dir=pluto_state_cache) +] + +drama_checkers = [ + DramaBrokenLink() + DramaRestartRequired() + DramaNewError() + DramaBrokenImport() +] + +PlutoNotebookComparison.compare_PR(source; + sources_old, + sources_new, + drama_checkers, +) + + + + diff --git a/tools/update_notebook_packages.jl b/tools/update_notebook_packages.jl index 9088c0f6..1a213f7b 100644 --- a/tools/update_notebook_packages.jl +++ b/tools/update_notebook_packages.jl @@ -29,8 +29,8 @@ all_notebooks = filter(Pluto.is_pluto_notebook, all_files_recursive) level = getfield(Pkg, Symbol("UPLEVEL_$(ARGS[1])")) -for n in all_notebooks - @info "Updating" n +for (i,n) in enumerate(all_notebooks) + @info "Updating [$i/$(length(all_notebooks))] $n" Pluto.update_notebook_environment(n; backup=false, level) end From dcff5643d08ce9bb406ec6a736392f9534b276d9 Mon Sep 17 00:00:00 2001 From: Fons van der Plas Date: Fri, 16 May 2025 17:15:03 +0200 Subject: [PATCH 3/3] Update diff.jl --- tools/diff.jl | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/tools/diff.jl b/tools/diff.jl index 1824b78f..6ebabea0 100644 --- a/tools/diff.jl +++ b/tools/diff.jl @@ -22,18 +22,16 @@ end cd(source) using Pkg -Pkg.activate(joinpath(source, "pluto-slider-server-environment")) +Pkg.activate(joinpath(source, "pluto-deployment-environment")) Pkg.instantiate() using PlutoNotebookComparison -include(joinpath(@__DIR__, "DramaBrokenLink.jl")) - sources_old = [ PSSCache(pluto_state_cache) WebsiteDir(gh_pages_dir) - WebsiteAddress("https://bmlip.github.io/colorized/") + WebsiteAddress("https://featured.plutojl.org/") SafePreview() ] @@ -43,7 +41,6 @@ sources_new = [ ] drama_checkers = [ - DramaBrokenLink() DramaRestartRequired() DramaNewError() DramaBrokenImport()