diff --git a/.github/workflows/DeployPage.yml b/.github/workflows/DeployPage.yml index d5e039a..207fd3c 100644 --- a/.github/workflows/DeployPage.yml +++ b/.github/workflows/DeployPage.yml @@ -3,7 +3,7 @@ on: push: branches: - master - - v0p3p10d + - v0p3p11a jobs: build-and-deploy: runs-on: ubuntu-latest diff --git a/.github/workflows/binder.yaml b/.github/workflows/binder.yaml index a1a0ef3..3109989 100644 --- a/.github/workflows/binder.yaml +++ b/.github/workflows/binder.yaml @@ -3,7 +3,7 @@ on: push: branches: - master - - v0p3p10a + - v0p3p11a jobs: binder: runs-on: ubuntu-latest diff --git a/Dockerfile b/Dockerfile index 4b9612c..ec9db7a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,6 +11,7 @@ USER ${NB_USER} COPY --chown=${NB_USER}:users ./plutoserver ./plutoserver COPY --chown=${NB_USER}:users ./sysimage ./sysimage +COPY --chown=${NB_USER}:users ./tutorials ./tutorials RUN cp ./sysimage/environment.yml ./environment.yml RUN cp ./sysimage/setup.py ./setup.py diff --git a/binder/Dockerfile b/binder/Dockerfile index f2f2095..b2270b0 100644 --- a/binder/Dockerfile +++ b/binder/Dockerfile @@ -1,2 +1,2 @@ ### DO NOT EDIT THIS FILE! This Is Automatically Generated And Will Be Overwritten ### -FROM gaelforget/notebooks:1bd00887b14d \ No newline at end of file +FROM gaelforget/notebooks:d76e1ed15de3 \ No newline at end of file diff --git a/page/index.md b/page/index.md index 8249ab4..90f4ec9 100644 --- a/page/index.md +++ b/page/index.md @@ -154,10 +154,10 @@ In this section, we provide additional representative examples that cover common Notebooks below were presented as part of the JuliaCon 2021 Workshop on `Modeling Marine Ecosystems At Multiple Scales Using Julia`. More detail is available in the [workshop repository](https://github.com/JuliaOcean/MarineEcosystemsJuliaCon2021.jl). -- [AIBECSExample](https://juliaocean.github.io/MarineEcosystemsJuliaCon2021.jl/dev/AIBECSExample.html) ([notebook url](https://github.com/JuliaOcean/MarineEcosystemsJuliaCon2021.jl/blob/main/AIBECSExample.jl)) : global steady-state biogeochemistry and gridded transport models that run fast for long time scales (centuries or even millennia). -- [PlanktonIndividualExample](https://juliaocean.github.io/MarineEcosystemsJuliaCon2021.jl/dev/PlanktonIndividualExample.html) ([notebook url](https://juliaocean.github.io/MarineEcosystemsJuliaCon2021.jl/dev/PlanktonIndividualExample.jl)) local to global agent-based model, particularly suited to study microbial communities, plankton physiology, and nutrient cycles. -- [MITgcm\_tutorial\_global\_oce\_biogeo](https://juliaocean.github.io/MarineEcosystemsJuliaCon2021.jl/dev/MITgcm_tutorial_global_oce_biogeo.html) ([notebook url](https://juliaocean.github.io/MarineEcosystemsJuliaCon2021.jl/dev/MITgcm_tutorial_global_oce_biogeo.jl)) : interface to full-featured, Fortran-based, general circulation model and its output (transports, chemistry, ecology, ocean, sea-ice, atmosphere, and more). -- [IndividualDisplacementsExample](https://juliaocean.github.io/MarineEcosystemsJuliaCon2021.jl/dev/IndividualDisplacementsExample.html) ([notebook url](https://juliaocean.github.io/MarineEcosystemsJuliaCon2021.jl/dev/IndividualDisplacementsExample.jl)) : local to global particle tracking, for simulating dispersion, connectivity, transports in the ocean or atmosphere, etc. +- [AIBECS](https://juliaocean.github.io/MarineEcosystemsJuliaCon2021.jl/dev/AIBECSExample.html) ([notebook url](https://raw.githubusercontent.com/JuliaOcean/MarineEcosystemsJuliaCon2021.jl/main/src/AIBECSExample.jl)) : global steady-state biogeochemistry and gridded transport models that run fast for long time scales (centuries or even millennia). +- [PlanktonIndividuals](https://juliaocean.github.io/MarineEcosystemsJuliaCon2021.jl/dev/PlanktonIndividualExample.html) ([notebook url](https://raw.githubusercontent.com/JuliaOcean/MarineEcosystemsJuliaCon2021.jl/main/src/PlanktonIndividualExample.jl)) local to global agent-based model, particularly suited to study microbial communities, plankton physiology, and nutrient cycles. +- [MITgcm global biogeo](https://juliaocean.github.io/MarineEcosystemsJuliaCon2021.jl/dev/MITgcm_tutorial_global_oce_biogeo.html) ([notebook url](https://raw.githubusercontent.com/JuliaOcean/MarineEcosystemsJuliaCon2021.jl/main/src/MITgcm_tutorial_global_oce_biogeo.jl)) : interface to full-featured, Fortran-based, general circulation model and its output (transports, chemistry, ecology, ocean, sea-ice, atmosphere, and more). +- [IndividualDisplacements](https://juliaocean.github.io/MarineEcosystemsJuliaCon2021.jl/dev/IndividualDisplacementsExample.html) ([notebook url](https://raw.githubusercontent.com/JuliaOcean/MarineEcosystemsJuliaCon2021.jl/main/src/IndividualDisplacementsExample.jl)) : local to global particle tracking, for simulating dispersion, connectivity, transports in the ocean or atmosphere, etc. \end{section} diff --git a/sysimage/download_stuff.jl b/sysimage/download_stuff.jl index 17616f5..c20955d 100644 --- a/sysimage/download_stuff.jl +++ b/sysimage/download_stuff.jl @@ -11,4 +11,9 @@ OceanStateEstimation.Downloads.download( joinpath(OceanStateEstimation.ECCOdiags_path,"interp_coeffs_halfdeg.jld2"); timeout=60000.0) +include("../tutorials/list_notebooks.jl") +notebooks=list_notebooks() +download_notebooks("notebooks",notebooks) + + diff --git a/tutorials/list_notebooks.jl b/tutorials/list_notebooks.jl new file mode 100644 index 0000000..1bb1456 --- /dev/null +++ b/tutorials/list_notebooks.jl @@ -0,0 +1,46 @@ + +using DataFrames, Downloads + +function list_notebooks() + fil=Downloads.download("https://raw.githubusercontent.com/JuliaClimate/Notebooks/master/page/index.md") + + lines=readlines(fil); + ii=findall( occursin.("[notebook url]",lines) ) + lines=lines[ii] + + sources=["gaelforget" "JuliaClimate" "JuliaOcean" "MarineEcosystemsJuliaCon2021.jl"] + notebooks=DataFrame("folder" => [], "file" => [], "url" => []) + + for ii in lines + tmp1=split(ii,"(") + ii=findall( occursin.("[notebook url]",tmp1) )[1] + tmp1=tmp1[ii+1] + tmp1=split(tmp1,")")[1] + + tmp2=split(tmp1,"/") + test=sum(tmp2[4].==sources) + if test!==1 + println("Skipping : ") + println(tmp1) + end + + push!(notebooks, (tmp2[5], tmp2[end], string(tmp1) )) + end + + notebooks +end + +function download_notebooks(path,notebooks) + !isdir(path) ? mkdir(path) : nothing + for i in 1:size(notebooks,1) + tmp1=joinpath(path,notebooks[i,:folder]) + !isdir(tmp1) ? mkdir(tmp1) : nothing + tmp2=joinpath(tmp1,notebooks[i,:file]) + try + Downloads.download(notebooks[i,:url],tmp2) + catch e + println("Skipping : ") + println(tmp2) + end + end +end