11using TensorInference
2- using TensorInference: OMEinsum, OMEinsumContractionOrders
2+ using TensorInference: OMEinsum
3+ using TensorInference. OMEinsum: OMEinsumContractionOrders
34using Documenter, Literate
45
56# Literate
6- for each in readdir (pkgdir (TensorInference, " examples" ))
7- input_file = pkgdir (TensorInference, " examples" , each)
8- endswith (input_file, " .jl" ) || continue
7+ const EXAMPLE_DIR = pkgdir (TensorInference, " examples" )
8+ const LITERATE_GENERATED_DIR = pkgdir (TensorInference, " docs" , " src" , " generated" )
9+ for each in readdir (EXAMPLE_DIR)
10+ workdir = joinpath (LITERATE_GENERATED_DIR, each)
11+ cp (joinpath (EXAMPLE_DIR, each), workdir; force= true )
12+ input_file = joinpath (workdir, " main.jl" )
913 @info " building" input_file
10- output_dir = pkgdir (TensorInference, " docs" , " src" , " generated" )
11- Literate. markdown (input_file, output_dir; name= each[1 : end - 3 ], execute= false )
14+ Literate. markdown (input_file, workdir; execute= true )
1215end
1316
1417DocMeta. setdocmeta! (TensorInference, :DocTestSetup , :(using TensorInference); recursive= true )
@@ -27,7 +30,7 @@ makedocs(;
2730 pages= [
2831 " Home" => " index.md" ,
2932 " Examples" => [
30- " Asia network" => " generated/asia.md" ,
33+ " Asia network" => " generated/asia/main .md" ,
3134 ],
3235 " Performance Tips" => " performance.md" ,
3336 " References" => " ref.md" ,
0 commit comments