Skip to content

Commit

Permalink
Removed SunnyTutorials submodule
Browse files Browse the repository at this point in the history
  • Loading branch information
ddahlbom committed Sep 20, 2023
1 parent 85ba325 commit 9def42a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 29 deletions.
5 changes: 1 addition & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
[submodule "Sunny.jl"]
path = Sunny.jl
url = https://github.com/SunnySuite/Sunny.jl
[submodule "SunnyTutorials"]
path = SunnyTutorials
url = https://github.com/SunnySuite/SunnyTutorials
url = https://github.com/SunnySuite/Sunny.jl
1 change: 0 additions & 1 deletion SunnyTutorials
Submodule SunnyTutorials deleted from 2b4284
27 changes: 3 additions & 24 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ using Sunny
# Importing these activates package extensions
import GLMakie, WriteVTK

draft = true # set `true` to disable cell evaluation
draft = false # set `true` to disable cell evaluation

# Core, CI-built examples
example_names = ["fei2_tutorial", "out_of_equilibrium", "powder_averaging",
Expand All @@ -19,26 +19,6 @@ example_sources = [joinpath(@__DIR__, "..", "examples", "$name.jl") for name in
example_destination = joinpath(@__DIR__, "src", "examples")
example_doc_paths = [joinpath("examples", "$name.md") for name in example_names]


# Copy over prebuilt contributed examples so Documenter can find them
curdir = pwd()
cd(joinpath(@__DIR__, "..", "SunnyTutorials"))
run(`$(Git.git()) fetch --all`)
run(`$(Git.git()) checkout -b main origin/main`)
run(`$(Git.git()) pull`)
cd(curdir)

contrib_names = ["08_Kagome_AFM", "15_Ba3NbFe3Si2O14"]
contrib_doc_paths = [joinpath("contributed_examples", "$name.md") for name in contrib_names]

contrib_src_dir = joinpath(@__DIR__, "..", "SunnyTutorials", "docstash")
contrib_dst_dir = joinpath(@__DIR__, "src", "contributed_examples")
src_files = readdir(contrib_src_dir)
for file in src_files
cp(joinpath(contrib_src_dir, file), joinpath(contrib_dst_dir, file); force=true)
end


# Run Literate on each `../examples/name.jl` and output `src/examples/name.md`
isdir(example_destination) && rm(example_destination; recursive=true)
for (name, source) in zip(example_names, example_sources)
Expand All @@ -63,7 +43,6 @@ Documenter.makedocs(;
pages = [
"Overview" => "index.md",
"Examples" => example_doc_paths,
"Contributed Examples" => contrib_doc_paths,
"Library API" => "library.md",
"Structure Factor Calculations" => "structure-factor.md",
"Single-Ion Anisotropy" => "anisotropy.md",
Expand All @@ -74,8 +53,8 @@ Documenter.makedocs(;
format = Documenter.HTML(;
prettyurls = get(ENV, "CI", nothing) == "true",
ansicolor = true,
# size_threshold_warn = 200*1024, # 200KB -- library.html gets quite large
# size_threshold = 300*2024, # 300KB
size_threshold_warn = 200*1024, # 200KB -- library.html gets quite large
size_threshold = 300*2024, # 300KB
),
draft
)
Expand Down

0 comments on commit 9def42a

Please sign in to comment.