From 4733f102eb1a463d40e83d1c1bb2ef4b1a646f2a Mon Sep 17 00:00:00 2001 From: Juan Ignacio Polanco Date: Fri, 29 Nov 2024 19:41:28 +0100 Subject: [PATCH] Fix displaying images in docs (#50) * Try again * Try adding svg files to git * Now try removing SVG files from git (This time without .gitignore) * Add link to benchmarking script --- docs/make.jl | 11 +++++++---- docs/src/benchmarks.md | 12 +++++++----- docs/src/benchmarks/.gitignore | 2 -- 3 files changed, 14 insertions(+), 11 deletions(-) delete mode 100644 docs/src/benchmarks/.gitignore diff --git a/docs/make.jl b/docs/make.jl index b839a0a..c6c8d52 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -3,12 +3,15 @@ using DocumenterCitations using NonuniformFFTs # Copy benchmark results to docs/src/benchmarks/ -dstdir = joinpath(@__DIR__, "src", "benchmarks") srcdir = joinpath(@__DIR__, "..", "benchmarks", "plots") -@assert isdir(dstdir) +dstdir = joinpath(@__DIR__, "src", "img") +mkpath(dstdir) for fname ∈ readdir(srcdir) endswith(".svg")(fname) || continue - cp(joinpath(srcdir, fname), joinpath(dstdir, fname); force = true) + srcfile = joinpath(srcdir, fname) + dstfile = joinpath(dstdir, fname) + @info "Copying $srcfile -> $dstfile" + cp(srcfile, dstfile; force = true) end # Bibliography @@ -37,5 +40,5 @@ makedocs(; deploydocs( repo = "github.com/jipolanco/NonuniformFFTs.jl", forcepush = true, - push_preview = false, + push_preview = true, ) diff --git a/docs/src/benchmarks.md b/docs/src/benchmarks.md index 10ccd3a..d9c59c2 100644 --- a/docs/src/benchmarks.md +++ b/docs/src/benchmarks.md @@ -1,4 +1,4 @@ -# Performance benchmarks +# Benchmarks ```@contents Pages = ["benchmarks.md"] @@ -26,6 +26,8 @@ The benchmarks compare NonuniformFFTs.jl v0.6.7 (26/11/2024) and FINUFFT v2.3.1 Each reported time includes (1) the time spent processing non-uniform points (`set_points!` / `(cu)finufft_setpts!`) and (2) the time spent on the actual transform (`exec_type{1,2}!` / `(cu)finufft_exec!`). +The script used for benchmarking can be found in [`benchmarks/run_benchmarks.jl`](https://github.com/jipolanco/NonuniformFFTs.jl/blob/master/benchmarks/run_benchmarks.jl). + ## [Complex non-uniform data](@id benchmarks-complex) ```@raw html @@ -65,13 +67,13 @@ at large point densities. ### Type-1 transforms ```@raw html - + ``` ### [Type-2 transforms](@id benchmarks-complex-type2) ```@raw html - + ``` ## [Real non-uniform data](@id benchmarks-real) @@ -90,13 +92,13 @@ In the plots below, the (Cu)FINUFFT curves are exactly the same as in the ### Type-1 transforms ```@raw html - + ``` ### Type-2 transforms ```@raw html - + ``` ## FINUFFT set-up diff --git a/docs/src/benchmarks/.gitignore b/docs/src/benchmarks/.gitignore deleted file mode 100644 index c8d6c16..0000000 --- a/docs/src/benchmarks/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# SVG files are copied from /benchmarks/plots, so local files shouldn't be added to git. -*.svg