Skip to content

Commit e0448e9

Browse files
committed
precompute notebooks
1 parent 3ce9a93 commit e0448e9

File tree

9 files changed

+234
-1731
lines changed

9 files changed

+234
-1731
lines changed
+66
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: Export Pluto notebooks
2+
on:
3+
push:
4+
branches:
5+
- main
6+
workflow_dispatch:
7+
8+
# When two jobs run in parallel, cancel the older ones, to make sure that the website is generated from the most recent commit.
9+
concurrency:
10+
group: pluto-export
11+
cancel-in-progress: true
12+
13+
# This action needs permission to write the exported HTML file to the gh-pages branch.
14+
permissions:
15+
contents: write
16+
# (all other permission fields default to "none")
17+
18+
jobs:
19+
build-and-deploy:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: Checkout this repository
23+
uses: actions/checkout@v3
24+
25+
- name: Install Julia
26+
uses: julia-actions/setup-julia@v1
27+
with:
28+
version: "1" # This will automatically pick the latest Julia version
29+
30+
- name: Cache Julia artifacts & such
31+
uses: julia-actions/cache@v1
32+
with:
33+
cache-registries: "true"
34+
35+
# 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.
36+
- name: Set up notebook state cache
37+
uses: actions/cache@v3
38+
with:
39+
path: pluto_state_cache
40+
key: ${{ runner.os }}-pluto_state_cache-v2-${{ hashFiles('**/Project.toml', '**/Manifest.toml', '.github/workflows/*' ) }}-${{ hashFiles('**/*jl') }}
41+
restore-keys: |
42+
${{ runner.os }}-pluto_state_cache-v2-${{ hashFiles('**/Project.toml', '**/Manifest.toml', '.github/workflows/*' ) }}
43+
44+
45+
- name: Run & export Pluto notebooks
46+
run: |
47+
julia -e 'using Pkg
48+
Pkg.activate("pluto-deployment-environment")
49+
50+
import PlutoSliderServer
51+
52+
PlutoSliderServer.github_action("src";
53+
Export_output_dir="_statequest"
54+
Precompute_enabled=true,
55+
Precompute_max_filesize_per_group=2e9
56+
# more parameters can go here
57+
)'
58+
59+
60+
- name: Deploy to gh-pages
61+
uses: JamesIves/github-pages-deploy-action@releases/v4
62+
with:
63+
token: ${{ secrets.GITHUB_TOKEN }}
64+
branch: precomputed-staterequests
65+
folder: "_staterequest"
66+
single-commit: true

.gitignore

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11

22
.DS_Store
33

4-
reduced_phil.png
5-
notebooks/week9/testCSVwrite.csv
6-
74
_cache
85
_site
6+
_tmpo
97
generation_report.html
10-
src/week9/testCSVwrite.csv

pluto-deployment-environment/Manifest.toml

+162-2
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,24 @@ git-tree-sha1 = "43b1a4a8f797c1cddadf60499a8a077d4af2cd2d"
5858
uuid = "d1d4a3ce-64b1-5f1a-9ba4-7e7e69966f35"
5959
version = "0.1.7"
6060

61+
[[deps.Calculus]]
62+
deps = ["LinearAlgebra"]
63+
git-tree-sha1 = "f641eb0a4f00c343bbc32346e1217b86f3ce9dad"
64+
uuid = "49dc2e85-a5d0-5ad3-a950-438e2897f1b9"
65+
version = "0.5.1"
66+
67+
[[deps.ChainRulesCore]]
68+
deps = ["Compat", "LinearAlgebra", "SparseArrays"]
69+
git-tree-sha1 = "e30f2f4e20f7f186dc36529910beaedc60cfa644"
70+
uuid = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
71+
version = "1.16.0"
72+
73+
[[deps.ChangesOfVariables]]
74+
deps = ["LinearAlgebra", "Test"]
75+
git-tree-sha1 = "f84967c4497e0e1955f9a582c232b02847c5f589"
76+
uuid = "9e997f8a-9a97-42d5-a9f1-ce6bfc15e2c0"
77+
version = "0.1.7"
78+
6179
[[deps.CodeTracking]]
6280
deps = ["InteractiveUtils", "UUIDs"]
6381
git-tree-sha1 = "d730914ef30a06732bdd9f763f6cc32e92ffbff1"
@@ -126,6 +144,12 @@ git-tree-sha1 = "8da84edb865b0b5b0100c0666a9bc9a0b71c553c"
126144
uuid = "9a962f9c-6df0-11e9-0e5d-c546b8b5ee8a"
127145
version = "1.15.0"
128146

147+
[[deps.DataStructures]]
148+
deps = ["Compat", "InteractiveUtils", "OrderedCollections"]
149+
git-tree-sha1 = "d1fff3a548102f48987a52a2e0d114fa97d730f0"
150+
uuid = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"
151+
version = "0.18.13"
152+
129153
[[deps.DataValueInterfaces]]
130154
git-tree-sha1 = "bfc1187b79289637fa0ef6d4436ebdfe6905cbd6"
131155
uuid = "e2d170a0-9d28-54be-80f0-106bbe20a464"
@@ -146,15 +170,39 @@ git-tree-sha1 = "cd6756e833c377e0ce9cd63fb97689a255f12323"
146170
uuid = "04572ae6-984a-583e-9378-9577a1c2574d"
147171
version = "1.33.4+0"
148172

173+
[[deps.DensityInterface]]
174+
deps = ["InverseFunctions", "Test"]
175+
git-tree-sha1 = "80c3e8639e3353e5d2912fb3a1916b8455e2494b"
176+
uuid = "b429d917-457f-4dbc-8f4c-0cc954292b1d"
177+
version = "0.4.0"
178+
149179
[[deps.Distributed]]
150180
deps = ["Random", "Serialization", "Sockets"]
151181
uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b"
152182

183+
[[deps.Distributions]]
184+
deps = ["ChainRulesCore", "DensityInterface", "FillArrays", "LinearAlgebra", "PDMats", "Printf", "QuadGK", "Random", "SparseArrays", "SpecialFunctions", "Statistics", "StatsAPI", "StatsBase", "StatsFuns", "Test"]
185+
git-tree-sha1 = "4ed4a6df2548a72f66e03f3a285cd1f3b573035d"
186+
uuid = "31c24e10-a181-5473-b8eb-7969acd0382f"
187+
version = "0.25.96"
188+
189+
[[deps.DocStringExtensions]]
190+
deps = ["LibGit2"]
191+
git-tree-sha1 = "2fb1e02f2b635d0845df5d7c167fec4dd739b00d"
192+
uuid = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae"
193+
version = "0.9.3"
194+
153195
[[deps.Downloads]]
154196
deps = ["ArgTools", "FileWatching", "LibCURL", "NetworkOptions"]
155197
uuid = "f43a241f-c20a-4ad4-852c-f6b1247861c6"
156198
version = "1.6.0"
157199

200+
[[deps.DualNumbers]]
201+
deps = ["Calculus", "NaNMath", "SpecialFunctions"]
202+
git-tree-sha1 = "5837a837389fccf076445fce071c8ddaea35a566"
203+
uuid = "fa6b7ba4-c1ee-5f82-b5fc-ecf0adba8f74"
204+
version = "0.6.8"
205+
158206
[[deps.Expat_jll]]
159207
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
160208
git-tree-sha1 = "bad72f730e9e91c08d9427d5e8db95478a3c323d"
@@ -170,6 +218,12 @@ version = "0.7.11"
170218
[[deps.FileWatching]]
171219
uuid = "7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee"
172220

221+
[[deps.FillArrays]]
222+
deps = ["LinearAlgebra", "Random", "SparseArrays", "Statistics"]
223+
git-tree-sha1 = "e17cc4dc2d0b0b568e80d937de8ed8341822de67"
224+
uuid = "1a297f60-69ca-5386-bcde-b61e274b549b"
225+
version = "1.2.0"
226+
173227
[[deps.FixedPointNumbers]]
174228
deps = ["Statistics"]
175229
git-tree-sha1 = "335bfdceacc84c5cdf16aadc768aa5ddfc5383cc"
@@ -233,6 +287,12 @@ git-tree-sha1 = "5e77dbf117412d4f164a464d610ee6050cc75272"
233287
uuid = "cd3eb016-35fb-5094-929b-558a96fad6f3"
234288
version = "1.9.6"
235289

290+
[[deps.HypergeometricFunctions]]
291+
deps = ["DualNumbers", "LinearAlgebra", "OpenLibm_jll", "SpecialFunctions"]
292+
git-tree-sha1 = "0ec02c648befc2f94156eaef13b0f38106212f3f"
293+
uuid = "34004b35-14d8-5ef3-9330-4cdb6864b03a"
294+
version = "0.3.17"
295+
236296
[[deps.Hyperscript]]
237297
deps = ["Test"]
238298
git-tree-sha1 = "8d511d5b81240fc8e6802386302675bdf47737b9"
@@ -260,6 +320,17 @@ version = "0.3.1"
260320
deps = ["Markdown"]
261321
uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240"
262322

323+
[[deps.InverseFunctions]]
324+
deps = ["Test"]
325+
git-tree-sha1 = "6667aadd1cdee2c6cd068128b3d226ebc4fb0c67"
326+
uuid = "3587e190-3f89-42d0-90ee-14403ec27112"
327+
version = "0.1.9"
328+
329+
[[deps.IrrationalConstants]]
330+
git-tree-sha1 = "630b497eafcc20001bba38a4651b327dcfc491d2"
331+
uuid = "92d709cd-6900-40b7-9082-c6be49f344b6"
332+
version = "0.2.2"
333+
263334
[[deps.IteratorInterfaceExtensions]]
264335
git-tree-sha1 = "a3f24677c21f5bbe9d2a714f95dcd58337fb2856"
265336
uuid = "82899510-4779-5014-852e-03e436cf321d"
@@ -331,6 +402,12 @@ version = "1.16.1+2"
331402
deps = ["Libdl", "libblastrampoline_jll"]
332403
uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
333404

405+
[[deps.LogExpFunctions]]
406+
deps = ["ChainRulesCore", "ChangesOfVariables", "DocStringExtensions", "InverseFunctions", "IrrationalConstants", "LinearAlgebra"]
407+
git-tree-sha1 = "c3ce8e7420b3a6e071e0fe4745f5d4300e37b13f"
408+
uuid = "2ab3a3ac-af41-5b50-aa03-7779005ae688"
409+
version = "0.3.24"
410+
334411
[[deps.Logging]]
335412
uuid = "56ddb016-857b-54e1-b83d-db4d58db5568"
336413

@@ -390,6 +467,12 @@ git-tree-sha1 = "629afd7d10dbc6935ec59b32daeb33bc4460a42e"
390467
uuid = "128add7d-3638-4c79-886c-908ea0c25c34"
391468
version = "0.1.4"
392469

470+
[[deps.Missings]]
471+
deps = ["DataAPI"]
472+
git-tree-sha1 = "f66bdc5de519e8f8ae43bdc598782d35a25b1272"
473+
uuid = "e1d29d7a-bbdc-5cf2-9ac0-f12de2c33e28"
474+
version = "1.1.0"
475+
393476
[[deps.Mmap]]
394477
uuid = "a63ad114-7e13-5084-954f-fe012c677804"
395478

@@ -403,6 +486,12 @@ git-tree-sha1 = "fc8c15ca848b902015bd4a745d350f02cf791c2a"
403486
uuid = "99f44e22-a591-53d1-9472-aa23ef4bd671"
404487
version = "1.2.0"
405488

489+
[[deps.NaNMath]]
490+
deps = ["OpenLibm_jll"]
491+
git-tree-sha1 = "0877504529a3e5c3343c6f8b4c0381e57e4387e4"
492+
uuid = "77ba4419-2d1f-58cd-9bb1-8ffee604a2e3"
493+
version = "1.0.2"
494+
406495
[[deps.NetworkOptions]]
407496
uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908"
408497
version = "1.2.0"
@@ -412,6 +501,11 @@ deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"]
412501
uuid = "4536629a-c528-5b80-bd46-f80d51c5b363"
413502
version = "0.3.20+0"
414503

504+
[[deps.OpenLibm_jll]]
505+
deps = ["Artifacts", "Libdl"]
506+
uuid = "05823500-19ac-5b8b-9628-191a04bc5112"
507+
version = "0.8.1+0"
508+
415509
[[deps.OpenSSL]]
416510
deps = ["BitFlags", "Dates", "MozillaCACerts_jll", "OpenSSL_jll", "Sockets"]
417511
git-tree-sha1 = "51901a49222b09e3743c65b8847687ae5fc78eb2"
@@ -424,6 +518,12 @@ git-tree-sha1 = "1aa4b74f80b01c6bc2b89992b861b5f210e665b5"
424518
uuid = "458c3c95-2e84-50aa-8efc-19380b2a3a95"
425519
version = "1.1.21+0"
426520

521+
[[deps.OpenSpecFun_jll]]
522+
deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "Pkg"]
523+
git-tree-sha1 = "13652491f6856acfd2db29360e1bbcd4565d04f1"
524+
uuid = "efe28fd5-8261-553b-a9e1-b2916fc3738e"
525+
version = "0.5.5+0"
526+
427527
[[deps.OrderedCollections]]
428528
git-tree-sha1 = "d321bf2de576bf25ec4d3e4360faca399afca282"
429529
uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d"
@@ -434,6 +534,12 @@ deps = ["Artifacts", "Libdl"]
434534
uuid = "efcefdf7-47ab-520b-bdef-62a2eaa19f15"
435535
version = "10.40.0+0"
436536

537+
[[deps.PDMats]]
538+
deps = ["LinearAlgebra", "SparseArrays", "SuiteSparse"]
539+
git-tree-sha1 = "67eae2738d63117a196f497d7db789821bce61d1"
540+
uuid = "90014a1f-27ba-587c-ab20-58faa44d9150"
541+
version = "0.11.17"
542+
437543
[[deps.Parsers]]
438544
deps = ["Dates", "PrecompileTools", "UUIDs"]
439545
git-tree-sha1 = "a5aef8d4a6e8d81f171b2bd4be5265b01384c74c"
@@ -464,8 +570,10 @@ uuid = "0ff47ea0-7a50-410d-8455-4348d5de0420"
464570
version = "0.1.6"
465571

466572
[[deps.PlutoSliderServer]]
467-
deps = ["AbstractPlutoDingetjes", "Base64", "BetterFileWatching", "Configurations", "Distributed", "FromFile", "Git", "GitHubActions", "Glob", "HTTP", "JSON", "Logging", "Pkg", "Pluto", "SHA", "Sockets", "TOML", "TerminalLoggers", "UUIDs"]
468-
git-tree-sha1 = "2bca19d5d90959f6ffda8ec4bcfaa25ebf09b6b7"
573+
deps = ["AbstractPlutoDingetjes", "Base64", "BetterFileWatching", "Configurations", "Distributed", "Distributions", "FromFile", "Git", "GitHubActions", "Glob", "HTTP", "JSON", "Logging", "Markdown", "OrderedCollections", "Pkg", "Pluto", "Random", "SHA", "Sockets", "Statistics", "TOML", "TerminalLoggers", "UUIDs"]
574+
git-tree-sha1 = "aa63b32af7e564c16ea6426213cf6bf74ab36bf1"
575+
repo-rev = "static-export-1"
576+
repo-url = "https://github.com/JuliaPluto/PlutoSliderServer.jl.git"
469577
uuid = "2fc8631c-6f24-4c5b-bca7-cbb509c42db4"
470578
version = "0.3.25"
471579

@@ -502,6 +610,12 @@ git-tree-sha1 = "80d919dee55b9c50e8d9e2da5eeafff3fe58b539"
502610
uuid = "33c8b6b6-d38a-422a-b730-caa89a2f386c"
503611
version = "0.1.4"
504612

613+
[[deps.QuadGK]]
614+
deps = ["DataStructures", "LinearAlgebra"]
615+
git-tree-sha1 = "6ec7ac8412e83d57e313393220879ede1740f9ee"
616+
uuid = "1fd47b50-473d-5c70-9696-f719f8f3bcdc"
617+
version = "2.8.2"
618+
505619
[[deps.REPL]]
506620
deps = ["InteractiveUtils", "Markdown", "Sockets", "Unicode"]
507621
uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb"
@@ -545,6 +659,18 @@ git-tree-sha1 = "feafdc70b2e6684314e188d95fe66d116de834a7"
545659
uuid = "295af30f-e4ad-537b-8983-00126c2a3abe"
546660
version = "3.5.2"
547661

662+
[[deps.Rmath]]
663+
deps = ["Random", "Rmath_jll"]
664+
git-tree-sha1 = "f65dcb5fa46aee0cf9ed6274ccbd597adc49aa7b"
665+
uuid = "79098fc4-a85e-5d69-aa6a-4863f24498fa"
666+
version = "0.7.1"
667+
668+
[[deps.Rmath_jll]]
669+
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
670+
git-tree-sha1 = "6ed52fdd3382cf21947b15e8870ac0ddbff736da"
671+
uuid = "f50d1b31-88e8-58de-be2c-1cc44531875f"
672+
version = "0.4.0+0"
673+
548674
[[deps.SHA]]
549675
uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce"
550676
version = "0.7.0"
@@ -578,10 +704,22 @@ version = "1.0.3"
578704
[[deps.Sockets]]
579705
uuid = "6462fe0b-24de-5631-8697-dd941f90decc"
580706

707+
[[deps.SortingAlgorithms]]
708+
deps = ["DataStructures"]
709+
git-tree-sha1 = "c60ec5c62180f27efea3ba2908480f8055e17cee"
710+
uuid = "a2af1166-a08f-5f64-846c-94a0d3cef48c"
711+
version = "1.1.1"
712+
581713
[[deps.SparseArrays]]
582714
deps = ["LinearAlgebra", "Random"]
583715
uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
584716

717+
[[deps.SpecialFunctions]]
718+
deps = ["ChainRulesCore", "IrrationalConstants", "LogExpFunctions", "OpenLibm_jll", "OpenSpecFun_jll"]
719+
git-tree-sha1 = "7beb031cf8145577fbccacd94b8a8f4ce78428d3"
720+
uuid = "276daf66-3868-5448-9aa4-cd146d93841b"
721+
version = "2.3.0"
722+
585723
[[deps.SplittablesBase]]
586724
deps = ["Setfield", "Test"]
587725
git-tree-sha1 = "e08a62abc517eb79667d0a29dc08a3b589516bb5"
@@ -597,12 +735,34 @@ version = "1.4.0"
597735
deps = ["LinearAlgebra", "SparseArrays"]
598736
uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
599737

738+
[[deps.StatsAPI]]
739+
deps = ["LinearAlgebra"]
740+
git-tree-sha1 = "45a7769a04a3cf80da1c1c7c60caf932e6f4c9f7"
741+
uuid = "82ae8749-77ed-4fe6-ae5f-f523153014b0"
742+
version = "1.6.0"
743+
744+
[[deps.StatsBase]]
745+
deps = ["DataAPI", "DataStructures", "LinearAlgebra", "LogExpFunctions", "Missings", "Printf", "Random", "SortingAlgorithms", "SparseArrays", "Statistics", "StatsAPI"]
746+
git-tree-sha1 = "75ebe04c5bed70b91614d684259b661c9e6274a4"
747+
uuid = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91"
748+
version = "0.34.0"
749+
750+
[[deps.StatsFuns]]
751+
deps = ["ChainRulesCore", "HypergeometricFunctions", "InverseFunctions", "IrrationalConstants", "LogExpFunctions", "Reexport", "Rmath", "SpecialFunctions"]
752+
git-tree-sha1 = "f625d686d5a88bcd2b15cd81f18f98186fdc0c9a"
753+
uuid = "4c63d2b9-4356-54db-8cca-17b64c39e42c"
754+
version = "1.3.0"
755+
600756
[[deps.StringEncodings]]
601757
deps = ["Libiconv_jll"]
602758
git-tree-sha1 = "33c0da881af3248dafefb939a21694b97cfece76"
603759
uuid = "69024149-9ee7-55f6-a4c4-859efe599b68"
604760
version = "0.3.6"
605761

762+
[[deps.SuiteSparse]]
763+
deps = ["Libdl", "LinearAlgebra", "Serialization", "SparseArrays"]
764+
uuid = "4607b0f0-06f3-5cda-b6b1-a6196a1729e9"
765+
606766
[[deps.TOML]]
607767
deps = ["Dates"]
608768
uuid = "fa267f1f-6049-4f14-aa54-33bafae1ed76"

pluto-deployment-environment/PlutoDeployment.toml

-3
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,4 @@ exclude=[
2121
"PlutoPages.jl",
2222

2323
# notebooks not interactive
24-
25-
# don't run homeworks
26-
"*/hw*.jl",
2724
]

src/images_abstractions/.gitignore

-2
This file was deleted.

0 commit comments

Comments
 (0)