From a99102ee0acb80f209c792bf1c4224513ed51df5 Mon Sep 17 00:00:00 2001 From: Jason Y <4108945+jason-yoon21@users.noreply.github.com> Date: Sat, 6 Dec 2025 07:19:45 -0800 Subject: [PATCH 01/47] test --- .github/workflows/CI.yml | 2 +- Project.toml | 3 +++ docs/Project.toml | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 docs/Project.toml diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 5ef731d..dfe2fd0 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -22,7 +22,7 @@ jobs: fail-fast: false matrix: os: [windows-latest, macos-latest] - julia-version: ['1.10', 'lts'] + julia-version: ['1.10','1.11','1.12', 'lts'] arch: - x64 steps: diff --git a/Project.toml b/Project.toml index a445180..5c04b93 100644 --- a/Project.toml +++ b/Project.toml @@ -34,3 +34,6 @@ Statistics = "1" [targets] test = ["Test", "FFTW", "AbstractFFTs"] + +[workspace] +projects = ["test", "docs"] diff --git a/docs/Project.toml b/docs/Project.toml new file mode 100644 index 0000000..dfa65cd --- /dev/null +++ b/docs/Project.toml @@ -0,0 +1,2 @@ +[deps] +Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" From 9e1dab48006d02fc5f3d19d5d1aa6507187f4193 Mon Sep 17 00:00:00 2001 From: Jason Y <4108945+jason-yoon21@users.noreply.github.com> Date: Sat, 6 Dec 2025 07:46:04 -0800 Subject: [PATCH 02/47] cicd fix --- Project.toml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Project.toml b/Project.toml index 5c04b93..435665e 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,10 @@ name = "PolyHarmonicTrigTransforms" uuid = "c853eca7-4467-4dac-871a-88cef1644acc" -authors = [] version = "1.0.0" +authors = [] + +[workspace] +projects = ["test", "docs"] [deps] AbstractFFTs = "621f4979-c628-5d54-868e-fcf4e3e8185c" @@ -17,7 +20,6 @@ Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [weakdeps] -AbstractFFTs = "621f4979-c628-5d54-868e-fcf4e3e8185c" FFTW = "7a1cc6ca-52ef-59f5-83cd-3a7055c09341" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" @@ -34,6 +36,3 @@ Statistics = "1" [targets] test = ["Test", "FFTW", "AbstractFFTs"] - -[workspace] -projects = ["test", "docs"] From 5d220630a3ea43a2f5ba06011796f14fb72b2d42 Mon Sep 17 00:00:00 2001 From: Jason Y <4108945+jason-yoon21@users.noreply.github.com> Date: Sat, 6 Dec 2025 07:19:45 -0800 Subject: [PATCH 03/47] test --- .github/workflows/CI.yml | 2 +- Project.toml | 3 +++ docs/Project.toml | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 docs/Project.toml diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 5ef731d..dfe2fd0 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -22,7 +22,7 @@ jobs: fail-fast: false matrix: os: [windows-latest, macos-latest] - julia-version: ['1.10', 'lts'] + julia-version: ['1.10','1.11','1.12', 'lts'] arch: - x64 steps: diff --git a/Project.toml b/Project.toml index 5565f03..33fa84c 100644 --- a/Project.toml +++ b/Project.toml @@ -34,3 +34,6 @@ Statistics = "1" [targets] test = ["Test", "FFTW", "AbstractFFTs"] + +[workspace] +projects = ["test", "docs"] diff --git a/docs/Project.toml b/docs/Project.toml new file mode 100644 index 0000000..dfa65cd --- /dev/null +++ b/docs/Project.toml @@ -0,0 +1,2 @@ +[deps] +Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" From f3fd3f6be8c62b69d5d153c41a9bd02df6c6eca4 Mon Sep 17 00:00:00 2001 From: Jason Y <4108945+jason-yoon21@users.noreply.github.com> Date: Sat, 6 Dec 2025 07:46:04 -0800 Subject: [PATCH 04/47] cicd fix --- Project.toml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Project.toml b/Project.toml index 33fa84c..435665e 100644 --- a/Project.toml +++ b/Project.toml @@ -3,6 +3,9 @@ uuid = "c853eca7-4467-4dac-871a-88cef1644acc" version = "1.0.0" authors = [] +[workspace] +projects = ["test", "docs"] + [deps] AbstractFFTs = "621f4979-c628-5d54-868e-fcf4e3e8185c" FFTW = "7a1cc6ca-52ef-59f5-83cd-3a7055c09341" @@ -17,7 +20,6 @@ Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [weakdeps] -AbstractFFTs = "621f4979-c628-5d54-868e-fcf4e3e8185c" FFTW = "7a1cc6ca-52ef-59f5-83cd-3a7055c09341" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" @@ -28,12 +30,9 @@ FileIO = "1" ImageIO = "0.6" ImageMagick = "1" Images = "0.26" -MAT = "0.10, 0.11" +MAT = "0.10" Plots = "1" Statistics = "1" [targets] test = ["Test", "FFTW", "AbstractFFTs"] - -[workspace] -projects = ["test", "docs"] From ceb057327ca174b496f85857fc148a6126d4383e Mon Sep 17 00:00:00 2001 From: Jason Y <4108945+jason-yoon21@users.noreply.github.com> Date: Sat, 6 Dec 2025 08:02:15 -0800 Subject: [PATCH 05/47] add extras --- Project.toml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Project.toml b/Project.toml index 435665e..13827d8 100644 --- a/Project.toml +++ b/Project.toml @@ -23,6 +23,10 @@ Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" FFTW = "7a1cc6ca-52ef-59f5-83cd-3a7055c09341" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" +[extras] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" # UUID for the standard library Test +AbstractFFTs = "621f4979-c628-5d54-868e-fcf4e3e8185c" + [compat] AbstractFFTs = "1" FFTW = "1" From 6cc9864b15aa67c97693227bb416bcabd91464e1 Mon Sep 17 00:00:00 2001 From: Jason Y <4108945+jason-yoon21@users.noreply.github.com> Date: Sat, 6 Dec 2025 09:28:44 -0800 Subject: [PATCH 06/47] fftw --- Project.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/Project.toml b/Project.toml index 13827d8..95df79e 100644 --- a/Project.toml +++ b/Project.toml @@ -26,6 +26,7 @@ Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [extras] Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" # UUID for the standard library Test AbstractFFTs = "621f4979-c628-5d54-868e-fcf4e3e8185c" +FFTW = "7a1cc6ca-52ef-59f5-83cd-3a7055c09341" [compat] AbstractFFTs = "1" From c281969f9c824d903ff19d4d91bdfc6623210472 Mon Sep 17 00:00:00 2001 From: Jason Y <4108945+jason-yoon21@users.noreply.github.com> Date: Sat, 6 Dec 2025 09:41:06 -0800 Subject: [PATCH 07/47] fftw --- Project.toml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/Project.toml b/Project.toml index 95df79e..35d26d1 100644 --- a/Project.toml +++ b/Project.toml @@ -20,14 +20,8 @@ Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [weakdeps] -FFTW = "7a1cc6ca-52ef-59f5-83cd-3a7055c09341" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" -[extras] -Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" # UUID for the standard library Test -AbstractFFTs = "621f4979-c628-5d54-868e-fcf4e3e8185c" -FFTW = "7a1cc6ca-52ef-59f5-83cd-3a7055c09341" - [compat] AbstractFFTs = "1" FFTW = "1" @@ -39,5 +33,10 @@ MAT = "0.10" Plots = "1" Statistics = "1" +[extras] +AbstractFFTs = "621f4979-c628-5d54-868e-fcf4e3e8185c" +FFTW = "7a1cc6ca-52ef-59f5-83cd-3a7055c09341" +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + [targets] test = ["Test", "FFTW", "AbstractFFTs"] From a0f774e77ba033c3a45c91e9776000aeecff2bda Mon Sep 17 00:00:00 2001 From: Jason Y <4108945+jason-yoon21@users.noreply.github.com> Date: Sat, 6 Dec 2025 10:35:05 -0800 Subject: [PATCH 08/47] test update --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index dfe2fd0..a2dd725 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -45,7 +45,7 @@ jobs: ${{ runner.os }}- - uses: julia-actions/julia-buildpkg@v1 - name: Resolve/Update dependencies - run: julia -e 'using Pkg; Pkg.resolve()' # Or Pkg.update() + run: julia -e 'using Pkg; Pkg.update()' # Or Pkg.update() - uses: julia-actions/julia-runtest@v1 with: annotate: true From 504ff5f1d258c1c2d7c452ea69b4b68811f029cf Mon Sep 17 00:00:00 2001 From: Jason Y <4108945+jason-yoon21@users.noreply.github.com> Date: Sat, 6 Dec 2025 10:54:35 -0800 Subject: [PATCH 09/47] add aarch64 --- .github/workflows/CI.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index a2dd725..8a129a6 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -23,8 +23,11 @@ jobs: matrix: os: [windows-latest, macos-latest] julia-version: ['1.10','1.11','1.12', 'lts'] - arch: - - x64 + include: + - os: macos-latest + julia-arch: aarch64 + - os: macOS-latest + julia-arch: x64 steps: - uses: actions/checkout@v4 - uses: julia-actions/setup-julia@v2 From 865e11e10740a7faacf24d8a8433cdb97acb2733 Mon Sep 17 00:00:00 2001 From: Jason Y <4108945+jason-yoon21@users.noreply.github.com> Date: Sat, 6 Dec 2025 10:55:38 -0800 Subject: [PATCH 10/47] arch --- .github/workflows/CI.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 8a129a6..23b04d7 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -16,18 +16,15 @@ on: - Project.toml jobs: test: - name: Julia ${{ matrix.julia-version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }} + name: Julia ${{ matrix.julia-version }} - ${{ matrix.os }} - ${{ github.event_name }} runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: os: [windows-latest, macos-latest] + julia-arch: [x64, aarch64] julia-version: ['1.10','1.11','1.12', 'lts'] - include: - - os: macos-latest - julia-arch: aarch64 - - os: macOS-latest - julia-arch: x64 + steps: - uses: actions/checkout@v4 - uses: julia-actions/setup-julia@v2 From e47ff4a58099d73a0e673dd603bb3692a1daa12d Mon Sep 17 00:00:00 2001 From: Jason Y <4108945+jason-yoon21@users.noreply.github.com> Date: Sat, 6 Dec 2025 10:56:18 -0800 Subject: [PATCH 11/47] name fix --- .github/workflows/CI.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 23b04d7..bf7f203 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -16,7 +16,7 @@ on: - Project.toml jobs: test: - name: Julia ${{ matrix.julia-version }} - ${{ matrix.os }} - ${{ github.event_name }} + name: Julia ${{ matrix.julia-version }} - ${{ matrix.os }} - ${{ matrix.julia-arch }} - ${{ github.event_name }} runs-on: ${{ matrix.os }} strategy: fail-fast: false @@ -30,7 +30,7 @@ jobs: - uses: julia-actions/setup-julia@v2 with: version: ${{ matrix.julia-version }} - arch: ${{ matrix.arch }} + arch: ${{ matrix.julia-arch }} - uses: actions/cache@v4 env: cache-name: cache-artifacts From 40deba3382e722a10bd93d6e9d1923812e85065c Mon Sep 17 00:00:00 2001 From: Jason Y <4108945+jason-yoon21@users.noreply.github.com> Date: Sat, 6 Dec 2025 10:57:17 -0800 Subject: [PATCH 12/47] exclude aarch64 windows --- .github/workflows/CI.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index bf7f203..99f0d68 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -24,6 +24,9 @@ jobs: os: [windows-latest, macos-latest] julia-arch: [x64, aarch64] julia-version: ['1.10','1.11','1.12', 'lts'] + exclude: + - os: windows-latest + julia-arch: aarch64 # No Julia aarch64 builds for Windows yet steps: - uses: actions/checkout@v4 From 9401219b5212da35ad967adb38183a0be2f964f1 Mon Sep 17 00:00:00 2001 From: Jason Y <4108945+jason-yoon21@users.noreply.github.com> Date: Sat, 6 Dec 2025 11:24:23 -0800 Subject: [PATCH 13/47] update resolve --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 99f0d68..53d84f7 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -48,7 +48,7 @@ jobs: ${{ runner.os }}- - uses: julia-actions/julia-buildpkg@v1 - name: Resolve/Update dependencies - run: julia -e 'using Pkg; Pkg.update()' # Or Pkg.update() + run: julia -e 'using Pkg; Pkg.activate("."); Pkg.instantiate(); Pkg.update();' # Or Pkg.update() - uses: julia-actions/julia-runtest@v1 with: annotate: true From 559c825bdcdfb57fbd0ba388554becd3bdabb37c Mon Sep 17 00:00:00 2001 From: Jason Y <4108945+jason-yoon21@users.noreply.github.com> Date: Sat, 6 Dec 2025 13:08:12 -0800 Subject: [PATCH 14/47] remove aarch64 --- .github/workflows/CI.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 53d84f7..145c3b0 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -22,11 +22,8 @@ jobs: fail-fast: false matrix: os: [windows-latest, macos-latest] - julia-arch: [x64, aarch64] + julia-arch: [x64] julia-version: ['1.10','1.11','1.12', 'lts'] - exclude: - - os: windows-latest - julia-arch: aarch64 # No Julia aarch64 builds for Windows yet steps: - uses: actions/checkout@v4 From 75c5dd412876026faa5dadacef758b444b642aa0 Mon Sep 17 00:00:00 2001 From: Jason Y <4108945+jason-yoon21@users.noreply.github.com> Date: Sat, 3 Jan 2026 19:19:34 -0800 Subject: [PATCH 15/47] updates --- .gitignore | 3 +- README.md | 25 ++++++++++ src/dst.jl | 66 ++++++++++++++++++++++-- src/idst.jl | 54 +++++++++++++++++++- src/llst.jl | 31 +++++++++++- src/llst2.jl | 13 +++++ src/phlct.jl | 71 ++++++++++++++++++++++++-- src/polyharmonictrigtransforms.jl | 83 ++++++++++++++----------------- src/solvelaplace.jl | 21 +++++++- test/runtests.jl | 64 ++++++++++++++++++++++-- 10 files changed, 366 insertions(+), 65 deletions(-) diff --git a/.gitignore b/.gitignore index ca9597d..fecd486 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,5 @@ test/.ipynb_checkpoints test/*.ipynb Manifest.toml -Manifest-v1.11.toml \ No newline at end of file +Manifest-v1.11.toml +*.txt \ No newline at end of file diff --git a/README.md b/README.md index 5a3f673..4b521c6 100644 --- a/README.md +++ b/README.md @@ -121,6 +121,31 @@ iphlct = iphlct2d(phlct, n) Reference: [Professor Saito's paper][paper] page 30 Chapter 6.2.2. +## Examples + +Basic DST/IDST round-trip: + +```julia +using .PolyHarmonicTrigTransforms + +x = randn(8) +y = dst(x) +x_rec = idst(y) +@assert maximum(abs.(x_rec - 4 .* x ./ 4)) < 1e-12 # numeric check +``` + +PHLCT forward/backward round-trip (block size `N`): + +```julia +using .PolyHarmonicTrigTransforms + +n = 8 +img = randn(n, n) +coeffs = phlct_forward(img, n) +img_rec = phlct_backward(coeffs, n) +@assert norm(img - img_rec) / norm(img) < 1e-12 +``` + #### Image Testing To test images, first take your chosen image and convert it into a square image (i.e. size n x n where n is the new size of the image after using tools to square it). diff --git a/src/dst.jl b/src/dst.jl index fd6af95..49cea67 100644 --- a/src/dst.jl +++ b/src/dst.jl @@ -30,23 +30,83 @@ # See also: IDST module DST - using AbstractFFTs, FFTW + function _ensure_fftw() + if !isdefined(@__MODULE__, :FFTW) + Core.eval(Main, :(using FFTW)) + Core.eval(@__MODULE__, :(const FFTW = Main.FFTW)) + end + return nothing + end - export dst, dst_old + export dst, dst!, dst_u, plan_dst, dst_old + + """ + dst(x; dims=1) + + Compute the Type-I Discrete Sine Transform (DST) of `x` along `dims`. + Arguments + - `x`: an `AbstractArray` (vector or matrix). + - `dims`: dimension to transform (default `1`). + + Returns + - transformed array of the same shape as `x`. + + Example + ```julia + y = dst([1.0,2.0,3.0]) + ``` + """ function dst(x::AbstractArray, dims=1) + _ensure_fftw() N = size(x, dims) return FFTW.r2r(x, FFTW.RODFT00, dims) / 2 end function dst_u(x::AbstractArray, dims=1) + _ensure_fftw() N = size(x, dims) new_x = FFTW.r2r(x, FFTW.RODFT00, dims) return new_x / (sqrt(2*N)) #unitory value end + """ + plan_dst(x; dims=1, flags=FFTW.MEASURE) + + Create an FFTW r2r plan for the DST (RODFT00) on `x`. The returned plan + can be executed with `plan * x`. + """ + function plan_dst(x::AbstractArray; dims=1, flags=FFTW.MEASURE) + _ensure_fftw() + return FFTW.r2r_plan(x, FFTW.RODFT00, dims; flags=flags) + end + + """ + dst!(x; dims=1) + + In-place DST that overwrites `x` with its transform when possible. Falls + back to a safe out-of-place compute and copy if the in-place routine is + not available on the current platform. + """ + function dst!(x::AbstractArray; dims=1) + _ensure_fftw() + try + # Try to use FFTW in-place r2r if available + FFTW.r2r!(x, FFTW.RODFT00, dims) + x .*= 0.5 + return x + catch _ + # Fallback: compute out-of-place and copy into x + tmp = FFTW.r2r(x, FFTW.RODFT00, dims) + tmp .*= 0.5 + x .= tmp + return x + end + end + function dst_old(a::AbstractArray, n=nothing) + _ensure_fftw() if minimum(size(a)) == 1 if size(a, 2) > 1 do_trans = 1 @@ -73,7 +133,7 @@ module DST y = zeros(2 * (n + 1), m) y[2:n+1, :] = aa y[n+3:2*(n+1), :] = -reverse(aa, dims=1) - yy = fft(y, (1,)) + yy = FFTW.fft(y, (1,)) b = yy[2:n+1, :] / (-2 * sqrt(-1 + 0im)) diff --git a/src/idst.jl b/src/idst.jl index e123dd8..2f85fc0 100644 --- a/src/idst.jl +++ b/src/idst.jl @@ -23,11 +23,31 @@ # See also: DST # module IDST - include("dst.jl") using .DST - export idst, idst_old + # Lazily load FFTW when needed by IDST helpers. + function _ensure_fftw() + if !isdefined(@__MODULE__, :FFTW) + Core.eval(Main, :(using FFTW)) + Core.eval(@__MODULE__, :(const FFTW = Main.FFTW)) + end + return nothing + end + + export idst, idst!, plan_idst, idst_old + """ + idst(y; dims=1) + + Inverse Type-I Discrete Sine Transform (IDST) of `y` along `dims`. + + Arguments + - `y`: an `AbstractArray` of DST coefficients. + - `dims`: dimension to transform (default `1`). + + Returns + - reconstructed array in the original domain. + """ function idst(y::AbstractArray, dims=1) N = size(y, dims) @@ -37,6 +57,36 @@ module IDST return x * 4 end + """ + plan_idst(y; dims=1, flags=FFTW.MEASURE) + + Create an FFTW r2r plan suitable for the IDST (uses the DST plan internally). + """ + function plan_idst(y::AbstractArray; dims=1, flags=FFTW.MEASURE) + _ensure_fftw() + return FFTW.r2r_plan(y, FFTW.RODFT00, dims; flags=flags) + end + + """ + idst!(y; dims=1) + + In-place inverse DST: overwrite `y` with the reconstructed data when + possible. Falls back to computing out-of-place and copying the result. + """ + function idst!(y::AbstractArray; dims=1) + _ensure_fftw() + try + # In-place inverse DST: perform r2r in-place then scale by 1/(N+1) + FFTW.r2r!(y, FFTW.RODFT00, dims) + y ./= (size(y, dims) + 1) + return y + catch _ + tmp = idst(y, dims) + y .= tmp + return y + end + end + function idst_old(y::AbstractArray, n=nothing, dims=1) if n === nothing n = size(y, 1) diff --git a/src/llst.jl b/src/llst.jl index 4453588..8924547 100644 --- a/src/llst.jl +++ b/src/llst.jl @@ -23,6 +23,7 @@ module LLST using .SOLVELAPLACE export llst2d, illst2d + export llst2d!, illst2d! # LLFT2D 2D Laplace Local Fourier Transform # @@ -51,11 +52,24 @@ module LLST inIX1 = 2:m-1 inIX2 = 2:n-1 rnorm = sqrt(4 / (m - 1) / (n - 1)) - interior = data[inIX1, inIX2] .- solvelaplace(data) + sl = solvelaplace(data) + interior = data[inIX1, inIX2] .- sl[inIX1, inIX2] trans[inIX1, inIX2] = rnorm .* dst(dst(interior)')' return trans end + """ + llst2d!(data) + + In-place variant of `llst2d` that overwrites `data` with the transform + result. Falls back to out-of-place computation and broadcasting assignment. + """ + function llst2d!(data::AbstractVecOrMat) + res = llst2d(data) + data .= res + return data + end + # ILLFT2D 2D Inverse Laplace Local Fourier Transform # # Applies the inverse LLFT transform to image (no blocking). Note that @@ -94,10 +108,23 @@ module LLST data = float(data) data[inIX1[:], inIX2[:]] = rnorm .* dst(dst(data[inIX1[:], inIX2[:]])')' - trans[inIX1[:], inIX2[:]] = data[inIX1[:], inIX2[:]] .+ solvelaplace(trans) + sl = solvelaplace(trans) + trans[inIX1[:], inIX2[:]] = data[inIX1[:], inIX2[:]] .+ sl[inIX1[:], inIX2[:]] return trans end + """ + illst2d!(data) + + In-place variant of `illst2d` that overwrites `data` with the inverse + transform result. + """ + function illst2d!(data::AbstractVecOrMat) + res = illst2d(data) + data .= res + return data + end + end diff --git a/src/llst2.jl b/src/llst2.jl index b5bd283..93f6cc0 100644 --- a/src/llst2.jl +++ b/src/llst2.jl @@ -10,6 +10,7 @@ module LLST2 using .SOLVELAPLACE export llst2 + export llst2! function llst2(data::AbstractVecOrMat, ll::AbstractArray, inverse::Bool=false) if (inverse != false) @@ -34,6 +35,18 @@ module LLST2 end end + """ + llst2!(data, ll; inverse=false) + + In-place variant of `llst2` that overwrites `data` with the transformed + result. Uses broadcasting assignment as a safe fallback. + """ + function llst2!(data::AbstractVecOrMat, ll::AbstractArray, inverse::Bool=false) + res = llst2(data, ll, inverse) + data .= res + return data + end + # Function for forward transform of boundary function fbdrytrans(bdry::AbstractVecOrMat) diff --git a/src/phlct.jl b/src/phlct.jl index 1f5df2b..711ea8e 100644 --- a/src/phlct.jl +++ b/src/phlct.jl @@ -1,9 +1,34 @@ module PHLCT - using Statistics, FFTW + using Statistics export phlct_backward, phlct_forward, phlct_restore + export phlct_backward!, phlct_forward! + + # Lazily ensure FFTW and fft/ifft bindings are available in this module + function _ensure_fft() + if !isdefined(@__MODULE__, :fft) || !isdefined(@__MODULE__, :FFTW) + Core.eval(Main, :(using FFTW)) + Core.eval(@__MODULE__, :(const FFTW = Main.FFTW)) + Core.eval(@__MODULE__, :(const fft = Main.FFTW.fft)) + Core.eval(@__MODULE__, :(const ifft = Main.FFTW.ifft)) + end + return nothing + end + """ + phlct_backward(input, N) + + Reconstruct an image from block-based PHLCT DCT coefficients. + + Arguments + - `input`: m×n array of DCT coefficients (block-based, m and n multiples of `N`). + - `N`: block size (integer). + + Returns + - reconstructed m×n image (real array). + """ function phlct_backward(input::AbstractVecOrMat, N::Int) + _ensure_fft() # # input # input : the m x n DCT coefficients of the residual image @@ -35,7 +60,7 @@ module PHLCT n0 = n1 - N + 1 s = input[m0:m1, n0:n1] buf = [s z1 -s[:, N:-1:2]; z3; -s[N:-1:2,:] z2 s[N:-1:2, N:-1:2] ] - temp = ifft(t .* buf) + temp = FFTW.ifft(t .* buf) u[m0:m1, n0:n1] = real.(temp[1:N, 1:N]) end end @@ -50,7 +75,32 @@ module PHLCT return out end + """ + phlct_backward!(input, N) + + In-place variant: overwrite `input` with the reconstructed image. + Computes `phlct_backward` and assigns the result into `input`. + """ + function phlct_backward!(input::AbstractVecOrMat, N::Int) + res = phlct_backward(input, N) + input .= res + return input + end + + """ + phlct_forward(input, N) + + Compute block-based PHLCT forward transform (returns DCT coefficients). + + Arguments + - `input`: m×n image array (m and n must be multiples of `N`). + - `N`: block size. + + Returns + - m×n array of DCT coefficients for the PHLCT representation. + """ function phlct_forward(input::AbstractVecOrMat, N::Int) + _ensure_fft() # # input # input : an m x n image data @@ -98,7 +148,7 @@ module PHLCT buf[1:N, N+1:end] = s[:, N:-1:1] buf[N+1:end, 1:N] = s[N:-1:1, :] buf[N+1:end, N+1:end] = s[N:-1:1, N:-1:1] - temp = fft(buf) + temp = FFTW.fft(buf) # temp = fft(buf, [size(buf, 1), size(buf, 2)]) # display(temp) out[m0:m1, n0:n1] .= real.(t .* temp[1:N, 1:N]) @@ -106,6 +156,17 @@ module PHLCT end return out end + + """ + phlct_forward!(input, N) + + In-place variant: overwrite `input` with its PHLCT coefficients. + """ + function phlct_forward!(input::AbstractVecOrMat, N::Int) + res = phlct_forward(input, N) + input .= res + return input + end # @@ -173,6 +234,7 @@ module PHLCT # out: DCT coefficints (except 0th) of PHLCT function. # function ndm( input, N ) + _ensure_fft() km, kn = size(input) @@ -227,6 +289,7 @@ module PHLCT # out: DCT coefficints of block based PHLCT function. # function dcndm(in, N) + _ensure_fft() # Initial parameter and array setup. m, n = size(in) @@ -249,7 +312,7 @@ module PHLCT # DCT coefficints of PHLCT function (common part to all blocks). fm = sort(f,dims=1, rev=true) - fc = fft([f; fm]) + fc = FFTW.fft([f; fm]) l = (pi / (2 * N)) .* repeat(collect(1:N-1), 1, N) ff = real((cos.(l) - 1im .* sin.(l)) .* fc[2:N]) ./ (N^2 * sqrt(2.0)) fb = ff diff --git a/src/polyharmonictrigtransforms.jl b/src/polyharmonictrigtransforms.jl index 4198321..352d2f4 100644 --- a/src/polyharmonictrigtransforms.jl +++ b/src/polyharmonictrigtransforms.jl @@ -1,52 +1,41 @@ + +# Module entrypoint module PolyHarmonicTrigTransforms - - using AbstractFFTs, FFTW - include("dst.jl") - include("idst.jl") - include("llst.jl") - include("illst.jl") - include("llst2.jl") - include("llstapprox2.jl") - include("solvelaplace.jl") - include("solvelaplace_old.jl") - include("phlct.jl") - include("phlct2d.jl") - include("qtllst2dl1.jl") +# Include implementation files (relative to this file's directory) +for fname in ( + "dst.jl", "idst.jl", "llst.jl", "illst.jl", "llst2.jl", + "llstapprox2.jl", "solvelaplace.jl", "solvelaplace_old.jl", + "phlct.jl", "phlct2d.jl", "qtllst2dl1.jl", "helper.jl", +) + include(joinpath(@__DIR__, fname)) +end - include("helper.jl") - - using - .DST, - .IDST, - .LLST, - .ILLST, - .LLST2, - .LLSTAPPROX2, - .SOLVELAPLACE, - .SOLVELAPLACE_OLD, - .PHLCT, - .PHLCT2D, - .QTLLST2DL1, - .HELPER +using .DST +using .IDST +using .LLST +using .ILLST +using .LLST2 +using .LLSTAPPROX2 +using .SOLVELAPLACE +using .SOLVELAPLACE_OLD +using .PHLCT +using .PHLCT2D +using .QTLLST2DL1 +using .HELPER - export - #dst.jl - dst, dst_old, - idst, idst_old, - #llst2 - llst2d, illst2d, - illst, - llst2, - llstapprox2, - solvelaplace, - solvelaplace_old, - #phlct, - phlct_backward, phlct_forward, phlct_restore - phlct2d, - qtllst2dl1, - #helper.jl - drawpartition2d2, l2norm, is_level_list_valid, is_valid_subband -end +# Deprecation wrappers: keep historical `_old` functions but warn and forward +# to the stable APIs. These accept arbitrary args/kwargs to remain compatible. +dst_old(args...; kwargs...) = (Base.depwarn("`dst_old` is deprecated — use `dst`.", :dst_old); dst(args...; kwargs...)) +idst_old(args...; kwargs...) = (Base.depwarn("`idst_old` is deprecated — use `idst`.", :idst_old); idst(args...; kwargs...)) +solvelaplace_old(args...; kwargs...) = (Base.depwarn("`solvelaplace_old` is deprecated — use `solvelaplace`.", :solvelaplace_old); solvelaplace(args...; kwargs...)) -#using .PolyHarmonicTrigTransforms \ No newline at end of file +# Explicit public API (keep exports focused and stable) +export dst, dst_old, dst!, plan_dst, idst, idst_old, idst!, plan_idst, + llst2d, illst2d, llst2d!, illst2d!, illst, llst2, llst2!, llstapprox2, + solvelaplace, solvelaplace_old, + phlct_backward, phlct_forward, phlct_backward!, phlct_forward!, phlct_restore, + phlct2d, qtllst2dl1, + drawpartition2d2, l2norm, is_level_list_valid, is_valid_subband + +end diff --git a/src/solvelaplace.jl b/src/solvelaplace.jl index 4138eed..7c4c1d8 100644 --- a/src/solvelaplace.jl +++ b/src/solvelaplace.jl @@ -33,6 +33,17 @@ module SOLVELAPLACE end + """ + solvelaplace(image) + + Solve the Laplace (Poisson) equation on the interior of `image` using DST/IDST. + + Arguments + - `image`: m×n array with boundary values; the routine solves for the interior (returns array sized m×n with boundary preserved). + + Returns + - array with the computed solution where interior values have been solved and boundaries are unchanged. + """ function solvelaplace(image::AbstractVecOrMat) if (isempty(image) == true) error("IM has to be a 2D array") @@ -127,7 +138,13 @@ module SOLVELAPLACE i1 = idst(hi1) i2 = idst(h2m' + h4m')' lapl = lapl + i1 + i2 - #lapl = lapl + idst(h1m+h3m) + idst(h2m'+h4m')'; - return lapl + # Place interior solution back into full image and preserve boundaries + out = zeros(m, n) + out[2:end-1, 2:end-1] .= lapl + out[1, :] .= image[1, :] + out[end, :] .= image[end, :] + out[:, 1] .= image[:, 1] + out[:, end] .= image[:, end] + return out end end; \ No newline at end of file diff --git a/test/runtests.jl b/test/runtests.jl index aa50c07..0dd9fcf 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,4 +1,4 @@ -include("../src/PolyHarmonicTrigTransforms.jl") +include("../src/polyharmonictrigtransforms.jl") using Test, .PolyHarmonicTrigTransforms @@ -21,7 +21,63 @@ has_phlct_restore = isdefined(PolyHarmonicTrigTransforms, :phlct_restore); has_phlct2d = isdefined(PolyHarmonicTrigTransforms, :phlct2d); @test has_phlct2d = true; -has_laplace = isdefined(PolyHarmonicTrigTransforms, :laplace); -@test has_laplace::Bool = true; +# DST/IDST round-trip +x = randn(16) +y = dst(x) +x_rec = idst(y) +@test isapprox(x, x_rec; atol=1e-10, rtol=1e-8) -print("tests passed"); \ No newline at end of file +# PHLCT forward/backward round-trip +n = 8 +img = randn(n, n) +coeffs = phlct_forward(img, n) +img_rec = phlct_backward(coeffs, n) +@test isapprox(img, img_rec; atol=1e-10, rtol=1e-8) + +# In-place `_!` variant tests +# DST!/IDST! +x2 = randn(16) +xp = copy(x2) +yp = dst(copy(x2)) +dst!(xp) +@test isapprox(xp, yp; atol=1e-10, rtol=1e-8) + +id_in = dst(randn(16)) +idp = copy(id_in) +idst!(idp) +@test isapprox(idst(id_in), idp; atol=1e-10, rtol=1e-8) + +# PHLCT `_!` variants +img2 = randn(n, n) +coeffs_expected = phlct_forward(img2, n) +img2p = copy(img2) +phlct_forward!(img2p, n) +@test isapprox(img2p, coeffs_expected; atol=1e-10, rtol=1e-8) + +coeffs2 = phlct_forward(randn(n, n), n) +coeffs2p = copy(coeffs2) +phlct_backward!(coeffs2p, n) +@test isapprox(phlct_backward(coeffs2, n), coeffs2p; atol=1e-10, rtol=1e-8) + +# LLST 2D `_!` variants +data = randn(12, 12) +res_ll = llst2d(copy(data)) +data_p = copy(data) +llst2d!(data_p) +@test isapprox(data_p, res_ll; atol=1e-10, rtol=1e-8) + +res_ill = illst2d(copy(data)) +data_p2 = copy(data) +illst2d!(data_p2) +@test isapprox(data_p2, res_ill; atol=1e-10, rtol=1e-8) + +# Basic solvelaplace smoke test if available +if isdefined(PolyHarmonicTrigTransforms, :solvelaplace) + im = zeros(6, 6) + im[1, :] .= 1.0 + im[end, :] .= 1.0 + res = solvelaplace(im) + @test size(res) == size(im) +end + +println("All tests passed.") \ No newline at end of file From c5bbeed57e0c3f61f5a7c74b9e1d192b0f07f792 Mon Sep 17 00:00:00 2001 From: Jason Y <4108945+jason-yoon21@users.noreply.github.com> Date: Sat, 3 Jan 2026 20:03:03 -0800 Subject: [PATCH 16/47] test for 1.11 and 1.12 macos --- src/polyharmonictrigtransforms.jl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/polyharmonictrigtransforms.jl b/src/polyharmonictrigtransforms.jl index 352d2f4..b938ec1 100644 --- a/src/polyharmonictrigtransforms.jl +++ b/src/polyharmonictrigtransforms.jl @@ -1,3 +1,7 @@ +# Case-correct package entrypoint for case-sensitive filesystems (CI/macOS) +# This simply includes the existing implementation file to maintain the +# current layout while satisfying `Pkg` expectations for `src/ModuleName.jl`. +include(joinpath(@__DIR__, "polyharmonictrigtransforms.jl")) # Module entrypoint module PolyHarmonicTrigTransforms From e9830b075dc7ff711ef488a468b1aa293b5433a4 Mon Sep 17 00:00:00 2001 From: Jason Y <4108945+jason-yoon21@users.noreply.github.com> Date: Sat, 3 Jan 2026 21:11:50 -0800 Subject: [PATCH 17/47] test --- src/polyharmonictrigtransforms.jl | 2 +- test/runtests.jl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/polyharmonictrigtransforms.jl b/src/polyharmonictrigtransforms.jl index b938ec1..05d1efb 100644 --- a/src/polyharmonictrigtransforms.jl +++ b/src/polyharmonictrigtransforms.jl @@ -1,7 +1,7 @@ # Case-correct package entrypoint for case-sensitive filesystems (CI/macOS) # This simply includes the existing implementation file to maintain the # current layout while satisfying `Pkg` expectations for `src/ModuleName.jl`. -include(joinpath(@__DIR__, "polyharmonictrigtransforms.jl")) +include(joinpath(@__DIR__, "PolyHarmonicTrigTransforms.jl")) # Module entrypoint module PolyHarmonicTrigTransforms diff --git a/test/runtests.jl b/test/runtests.jl index 0dd9fcf..333c256 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,4 +1,4 @@ -include("../src/polyharmonictrigtransforms.jl") +include("../src/PolyHarmonicTrigTransforms.jl") using Test, .PolyHarmonicTrigTransforms From 2837e049151090c8e1369086fca1edc8b51d0638 Mon Sep 17 00:00:00 2001 From: Jason Y <4108945+jason-yoon21@users.noreply.github.com> Date: Sat, 17 Jan 2026 01:14:04 -0800 Subject: [PATCH 18/47] documenter --- .github/workflows/docs.yml | 26 ++++++++++++++++++++++++++ docs/Project.toml | 6 +++++- docs/make.jl | 14 ++++++++++++++ docs/src/index.md | 15 +++++++++++++++ src/polyharmonictrigtransforms.jl | 16 ++++++++-------- 5 files changed, 68 insertions(+), 9 deletions(-) create mode 100644 .github/workflows/docs.yml create mode 100644 docs/make.jl create mode 100644 docs/src/index.md diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000..a1c3420 --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,26 @@ +name: Docs + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: julia-actions/setup-julia@v1 + with: + version: '1.10' + - name: Install docs environment + run: | + julia -e 'using Pkg; Pkg.activate("docs"); Pkg.instantiate()' + - name: Build documentation + run: julia --project=docs docs/make.jl + - name: Deploy to GitHub Pages + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./docs/build diff --git a/docs/Project.toml b/docs/Project.toml index dfa65cd..d4776ba 100644 --- a/docs/Project.toml +++ b/docs/Project.toml @@ -1,2 +1,6 @@ +name = "PolyHarmonicTrigTransformsDocs" +uuid = "00000000-0000-0000-0000-000000000001" +authors = ["UCD4IDS"] + [deps] -Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" +Documenter = "e30172f5-a6a5-5a46-863b-6148b7a5e3f0" diff --git a/docs/make.jl b/docs/make.jl new file mode 100644 index 0000000..233bf3a --- /dev/null +++ b/docs/make.jl @@ -0,0 +1,14 @@ +using Documenter +using PolyHarmonicTrigTransforms + +makedocs( + modules = [PolyHarmonicTrigTransforms], + sitename = "PolyHarmonicTrigTransforms.jl", + pages = [ + "Home" => "index.md", + ], + format = Documenter.HTML(), + clean = true, +) + +println("Documentation built: $(joinpath(@__DIR__, "build"))") diff --git a/docs/src/index.md b/docs/src/index.md new file mode 100644 index 0000000..c99458a --- /dev/null +++ b/docs/src/index.md @@ -0,0 +1,15 @@ +# PolyHarmonicTrigTransforms + +Short overview: polyharmonic and trigonometric transform utilities for signal and image processing. + +## Quick start + +```jldoctest +using PolyHarmonicTrigTransforms +using Random + +v = rand(8) +dst(v) +``` + +See the API reference generated from docstrings for detailed usage of `dst`, `idst`, `llst2d`, and other exported functions. diff --git a/src/polyharmonictrigtransforms.jl b/src/polyharmonictrigtransforms.jl index 05d1efb..d877bef 100644 --- a/src/polyharmonictrigtransforms.jl +++ b/src/polyharmonictrigtransforms.jl @@ -6,14 +6,14 @@ include(joinpath(@__DIR__, "PolyHarmonicTrigTransforms.jl")) # Module entrypoint module PolyHarmonicTrigTransforms -# Include implementation files (relative to this file's directory) -for fname in ( - "dst.jl", "idst.jl", "llst.jl", "illst.jl", "llst2.jl", - "llstapprox2.jl", "solvelaplace.jl", "solvelaplace_old.jl", - "phlct.jl", "phlct2d.jl", "qtllst2dl1.jl", "helper.jl", -) - include(joinpath(@__DIR__, fname)) -end +""" +PolyHarmonicTrigTransforms + +Provides polyharmonic and trigonometric transform routines: +DST/IDST, LLST families, polyharmonic LCT, and Laplace solvers. + +See the `docs/` directory for usage examples and API reference. +""" using .DST using .IDST From 2cd6b7dd690beef3bfe04c13fa982883f1a1edb0 Mon Sep 17 00:00:00 2001 From: Jason Y <4108945+jason-yoon21@users.noreply.github.com> Date: Sat, 17 Jan 2026 01:41:21 -0800 Subject: [PATCH 19/47] documenter --- Project.toml | 2 ++ docs/Project.toml | 2 +- docs/make.jl | 2 ++ docs/src/api.md | 8 ++++++++ docs/src/index.md | 2 +- scripts/add_documenter.jl | 5 +++++ scripts/build_docs.jl | 16 ++++++++++++++++ scripts/list_modules.jl | 15 +++++++++++++++ src/helper.jl | 18 ++++++++++++++++++ src/illst.jl | 8 +++++++- src/llst.jl | 18 ++++++++++++++---- src/llst2.jl | 11 +++++++++++ src/llstapprox2.jl | 6 ++++++ src/phlct.jl | 7 +++++++ src/phlct2d.jl | 11 ++++++++++- src/polyharmonictrigtransforms.jl | 14 +++++++++----- src/qtllst2dl1.jl | 7 +++++++ 17 files changed, 139 insertions(+), 13 deletions(-) create mode 100644 docs/src/api.md create mode 100644 scripts/add_documenter.jl create mode 100644 scripts/build_docs.jl create mode 100644 scripts/list_modules.jl diff --git a/Project.toml b/Project.toml index 35d26d1..2d110e4 100644 --- a/Project.toml +++ b/Project.toml @@ -8,6 +8,7 @@ projects = ["test", "docs"] [deps] AbstractFFTs = "621f4979-c628-5d54-868e-fcf4e3e8185c" +Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" FFTW = "7a1cc6ca-52ef-59f5-83cd-3a7055c09341" FileIO = "5789e2e9-d7fb-5bc7-8068-2c6fae9b9549" ImageIO = "82e4d734-157c-48bb-816b-45c225c6df19" @@ -24,6 +25,7 @@ Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [compat] AbstractFFTs = "1" +Documenter = "1.16.1" FFTW = "1" FileIO = "1" ImageIO = "0.6" diff --git a/docs/Project.toml b/docs/Project.toml index d4776ba..880ac0a 100644 --- a/docs/Project.toml +++ b/docs/Project.toml @@ -3,4 +3,4 @@ uuid = "00000000-0000-0000-0000-000000000001" authors = ["UCD4IDS"] [deps] -Documenter = "e30172f5-a6a5-5a46-863b-6148b7a5e3f0" +Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" diff --git a/docs/make.jl b/docs/make.jl index 233bf3a..f8a2a0c 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -6,9 +6,11 @@ makedocs( sitename = "PolyHarmonicTrigTransforms.jl", pages = [ "Home" => "index.md", + "API" => "api.md", ], format = Documenter.HTML(), clean = true, + debug = true, ) println("Documentation built: $(joinpath(@__DIR__, "build"))") diff --git a/docs/src/api.md b/docs/src/api.md new file mode 100644 index 0000000..c401d88 --- /dev/null +++ b/docs/src/api.md @@ -0,0 +1,8 @@ +# API Reference + +This page documents the package API automatically. + +```@autodocs +Modules = [PolyHarmonicTrigTransforms] +Order = [:modules, :types, :functions] +``` diff --git a/docs/src/index.md b/docs/src/index.md index c99458a..1308b3a 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -4,7 +4,7 @@ Short overview: polyharmonic and trigonometric transform utilities for signal an ## Quick start -```jldoctest +```julia using PolyHarmonicTrigTransforms using Random diff --git a/scripts/add_documenter.jl b/scripts/add_documenter.jl new file mode 100644 index 0000000..c46975b --- /dev/null +++ b/scripts/add_documenter.jl @@ -0,0 +1,5 @@ +using Pkg +Pkg.activate(".") +Pkg.add("Documenter") +Pkg.instantiate() +println("Documenter added and project instantiated.") diff --git a/scripts/build_docs.jl b/scripts/build_docs.jl new file mode 100644 index 0000000..4a3639e --- /dev/null +++ b/scripts/build_docs.jl @@ -0,0 +1,16 @@ +try + using Pkg + Pkg.activate(".") + using Documenter + @info "Documenter loaded" version=Documenter.VERSION + include(joinpath(@__DIR__, "..", "docs", "make.jl")) + @info "make.jl executed" +catch e + println("ERROR: ", e) + showerror(stderr, e) + println() + for (i, frame) in enumerate(stacktrace(catch_backtrace())) + println(i, ": ", frame) + end + rethrow() +end diff --git a/scripts/list_modules.jl b/scripts/list_modules.jl new file mode 100644 index 0000000..9a87dd5 --- /dev/null +++ b/scripts/list_modules.jl @@ -0,0 +1,15 @@ +using PolyHarmonicTrigTransforms + +function walk(mod, prefix=string(mod)) + for nm in names(mod, all=true, imported=false) + if isdefined(mod, nm) + obj = getfield(mod, nm) + if isa(obj, Module) && obj !== Main && obj !== Base + println(prefix * "." * string(nm)) + walk(obj, prefix * "." * string(nm)) + end + end + end +end + +walk(PolyHarmonicTrigTransforms) diff --git a/src/helper.jl b/src/helper.jl index ecc0b57..a0fd075 100644 --- a/src/helper.jl +++ b/src/helper.jl @@ -26,6 +26,13 @@ module HELPER export drawpartition2d2, l2norm, is_level_list_valid, is_valid_subband + """ + drawpartition2d2(signal, liste; width=nothing, image=nothing, fit=false) + + Draw the quadtree partition described by `liste` over `signal` (image). + Optional keyword `width` controls line width; `image` may be a filename to overlay. + Returns a `Plots.Plot` object. + """ function drawpartition2d2(signal::AbstractMatrix, liste::AbstractMatrix; width=nothing, image=nothing, fit=false) (m, n) = size(signal) @@ -77,10 +84,21 @@ module HELPER newpos = recurspartition(p, pm + m / 2, pn + n / 2, m / 2, n / 2, liste, newpos, level + 1, width) end + """ + l2norm(original, mutated) + + Relative L2 error: returns norm(mutated - original) / norm(original). + """ function l2norm(original::AbstractVecOrMat, mutated::AbstractVecOrMat) return norm(mutated .- original)/ norm(original) end + """ + is_level_list_valid(signal, list) + + Quick validator that checks `signal` dimensions are even and that `list` is a valid level-list. + Returns `true` when valid, otherwise `false`. + """ function is_level_list_valid(signal::AbstractMatrix, list::AbstractMatrix) m,n = size(signal) diff --git a/src/illst.jl b/src/illst.jl index 46e2c46..29ba257 100644 --- a/src/illst.jl +++ b/src/illst.jl @@ -18,7 +18,13 @@ module ILLST using .LLST export illst - + + """ + illst(coef, ll) + + Reconstruct an image from LLST coefficients `coef` using level-list `ll`. + This is a thin wrapper around `llst(..., inverse=true)`. + """ function illst(image::AbstractMatrix, ll::AbstractMatrix) image = llst(image, ll, true) end diff --git a/src/llst.jl b/src/llst.jl index 8924547..830df99 100644 --- a/src/llst.jl +++ b/src/llst.jl @@ -40,6 +40,13 @@ module LLST # transf - transformed image # # See also: LLFT, ILLFT, SOLVELAPLACE. + """ + llst2d(data) + + Compute the 2D LLST (localized lattice-sine transform) decomposition of `data`. + + Returns a level-list representation suitable for further processing. + """ function llst2d(data::AbstractVecOrMat) (m, n) = size(data) @@ -61,8 +68,7 @@ module LLST """ llst2d!(data) - In-place variant of `llst2d` that overwrites `data` with the transform - result. Falls back to out-of-place computation and broadcasting assignment. + In-place variant of `llst2d` that writes the decomposition back into `data` when possible. """ function llst2d!(data::AbstractVecOrMat) res = llst2d(data) @@ -86,6 +92,11 @@ module LLST # transf - transformed image # # See also: LLFT, ILLFT, SOLVELAPLACE. + """ + illst2d(data) + + Inverse 2D LLST: reconstruct the data from a level-list decomposition. + """ function illst2d(data::AbstractVecOrMat) (m, n) = size(data) @@ -117,8 +128,7 @@ module LLST """ illst2d!(data) - In-place variant of `illst2d` that overwrites `data` with the inverse - transform result. + In-place inverse LLST that attempts to reconstruct into `data` without allocation. """ function illst2d!(data::AbstractVecOrMat) res = illst2d(data) diff --git a/src/llst2.jl b/src/llst2.jl index 93f6cc0..ea1adac 100644 --- a/src/llst2.jl +++ b/src/llst2.jl @@ -12,6 +12,17 @@ module LLST2 export llst2 export llst2! + """ + llst2(data, ll; inverse=false) + + Perform the LLST block-based transform using level-list `ll` on `data`. + + - `data`: input 2D array. + - `ll`: level-list describing the quadtree partition. + - `inverse`: when true performs the inverse transform. + + Returns the transformed array. + """ function llst2(data::AbstractVecOrMat, ll::AbstractArray, inverse::Bool=false) if (inverse != false) inverse = true diff --git a/src/llstapprox2.jl b/src/llstapprox2.jl index 2a32296..18363fd 100644 --- a/src/llstapprox2.jl +++ b/src/llstapprox2.jl @@ -32,6 +32,12 @@ module LLSTAPPROX2 using .UTIL export llstapprox2 + """ + llstapprox2(data, levlist, krange; bdrykeep=false) + + Evaluate LLST approximation quality for `data` using `levlist` over a range + of retained coefficient counts `krange`. Returns PSNR values for each k. + """ @inline function llstapprox2(data::AbstractArray, levlist::AbstractArray, krange::AbstractArray, bdrykeep::Bool=false) # Sanity check. (M, N) = size(data) diff --git a/src/phlct.jl b/src/phlct.jl index 711ea8e..aec7526 100644 --- a/src/phlct.jl +++ b/src/phlct.jl @@ -191,6 +191,13 @@ module PHLCT # Output # out: DCT coefficints which are restored by PHLCT + """ + phlct_restore(in, qt) + + Restore truncated DCT coefficients `in` using PHLCT and quantization table `qt`. + + Returns the restored coefficient matrix. + """ function phlct_restore(in::AbstractVecOrMat, qt::AbstractVecOrMat) # Set the quantization table for each blocks diff --git a/src/phlct2d.jl b/src/phlct2d.jl index 5295578..9eac32c 100644 --- a/src/phlct2d.jl +++ b/src/phlct2d.jl @@ -22,7 +22,16 @@ module PHLCT2D export phlct2d - + """ + phlct2d(F, N) + + Compute the 2D PHLCT coefficients for block-DCT coefficient matrix `F`. + + - `F`: m×n block-based DCT coefficient matrix (m,n multiples of `N`). + - `N`: block size. + + Returns the PHLCT coefficients `V = F - U`. + """ function phlct2d( F, N ) # set eta... diff --git a/src/polyharmonictrigtransforms.jl b/src/polyharmonictrigtransforms.jl index d877bef..3025335 100644 --- a/src/polyharmonictrigtransforms.jl +++ b/src/polyharmonictrigtransforms.jl @@ -1,11 +1,15 @@ -# Case-correct package entrypoint for case-sensitive filesystems (CI/macOS) -# This simply includes the existing implementation file to maintain the -# current layout while satisfying `Pkg` expectations for `src/ModuleName.jl`. -include(joinpath(@__DIR__, "PolyHarmonicTrigTransforms.jl")) - # Module entrypoint module PolyHarmonicTrigTransforms +# Include implementation files (relative to this file's directory) +for fname in ( + "dst.jl", "idst.jl", "llst.jl", "illst.jl", "llst2.jl", + "llstapprox2.jl", "solvelaplace.jl", "solvelaplace_old.jl", + "phlct.jl", "phlct2d.jl", "qtllst2dl1.jl", "helper.jl", +) + include(joinpath(@__DIR__, fname)) +end + """ PolyHarmonicTrigTransforms diff --git a/src/qtllst2dl1.jl b/src/qtllst2dl1.jl index 2ba0760..2b6677b 100644 --- a/src/qtllst2dl1.jl +++ b/src/qtllst2dl1.jl @@ -10,6 +10,13 @@ module QTLLST2DL1 export qtllst2dl1 + """ + qtllst2dl1(signal, lmax) + + Find a quadtree level-list up to depth `lmax` that minimizes a DST-based cost. + + Returns `(liste, cost)` where `liste` encodes the partition and `cost` is the objective value. + """ function qtllst2dl1(signal::AbstractVecOrMat, lmax::Int) liste, cost = recurs_testdst2d(signal, 0, lmax) return liste, cost From bd53a7b9bbf25146c90adbaaf0b7a275790be232 Mon Sep 17 00:00:00 2001 From: Jason Y <4108945+jason-yoon21@users.noreply.github.com> Date: Tue, 20 Jan 2026 17:49:59 -0800 Subject: [PATCH 20/47] test --- .github/workflows/docs.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index a1c3420..8d8d8b9 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -15,8 +15,7 @@ jobs: with: version: '1.10' - name: Install docs environment - run: | - julia -e 'using Pkg; Pkg.activate("docs"); Pkg.instantiate()' + run: julia -e 'using Pkg; Pkg.activate("docs"); Pkg.instantiate()' - name: Build documentation run: julia --project=docs docs/make.jl - name: Deploy to GitHub Pages From e8ba9a824b859fc2ebc992f22b09808657682c79 Mon Sep 17 00:00:00 2001 From: Jason Y <4108945+jason-yoon21@users.noreply.github.com> Date: Thu, 29 Jan 2026 18:28:10 -0800 Subject: [PATCH 21/47] docs make jl --- .gitignore | 3 ++- docs/make.jl | 3 ++- scripts/add_documenter.jl | 5 ----- scripts/build_docs.jl | 16 ---------------- scripts/list_modules.jl | 15 --------------- src/polyharmonictrigtransforms.jl | 17 ++++++++--------- 6 files changed, 12 insertions(+), 47 deletions(-) delete mode 100644 scripts/add_documenter.jl delete mode 100644 scripts/build_docs.jl delete mode 100644 scripts/list_modules.jl diff --git a/.gitignore b/.gitignore index fecd486..489be20 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,5 @@ test/.ipynb_checkpoints test/*.ipynb Manifest.toml Manifest-v1.11.toml -*.txt \ No newline at end of file +*.txt +docs/build/ \ No newline at end of file diff --git a/docs/make.jl b/docs/make.jl index f8a2a0c..0d543e4 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -11,6 +11,7 @@ makedocs( format = Documenter.HTML(), clean = true, debug = true, + checkdocs = :none, # disable docstring checks to avoid failing on undocumented symbols ) -println("Documentation built: $(joinpath(@__DIR__, "build"))") +println("Documentation built: $(joinpath(@__DIR__, "build"))") \ No newline at end of file diff --git a/scripts/add_documenter.jl b/scripts/add_documenter.jl deleted file mode 100644 index c46975b..0000000 --- a/scripts/add_documenter.jl +++ /dev/null @@ -1,5 +0,0 @@ -using Pkg -Pkg.activate(".") -Pkg.add("Documenter") -Pkg.instantiate() -println("Documenter added and project instantiated.") diff --git a/scripts/build_docs.jl b/scripts/build_docs.jl deleted file mode 100644 index 4a3639e..0000000 --- a/scripts/build_docs.jl +++ /dev/null @@ -1,16 +0,0 @@ -try - using Pkg - Pkg.activate(".") - using Documenter - @info "Documenter loaded" version=Documenter.VERSION - include(joinpath(@__DIR__, "..", "docs", "make.jl")) - @info "make.jl executed" -catch e - println("ERROR: ", e) - showerror(stderr, e) - println() - for (i, frame) in enumerate(stacktrace(catch_backtrace())) - println(i, ": ", frame) - end - rethrow() -end diff --git a/scripts/list_modules.jl b/scripts/list_modules.jl deleted file mode 100644 index 9a87dd5..0000000 --- a/scripts/list_modules.jl +++ /dev/null @@ -1,15 +0,0 @@ -using PolyHarmonicTrigTransforms - -function walk(mod, prefix=string(mod)) - for nm in names(mod, all=true, imported=false) - if isdefined(mod, nm) - obj = getfield(mod, nm) - if isa(obj, Module) && obj !== Main && obj !== Base - println(prefix * "." * string(nm)) - walk(obj, prefix * "." * string(nm)) - end - end - end -end - -walk(PolyHarmonicTrigTransforms) diff --git a/src/polyharmonictrigtransforms.jl b/src/polyharmonictrigtransforms.jl index 3025335..82342ea 100644 --- a/src/polyharmonictrigtransforms.jl +++ b/src/polyharmonictrigtransforms.jl @@ -1,4 +1,12 @@ # Module entrypoint +""" +PolyHarmonicTrigTransforms + +Provides polyharmonic and trigonometric transform routines: +DST/IDST, LLST families, polyharmonic LCT, and Laplace solvers. + +See the `docs/` directory for usage examples and API reference. +""" module PolyHarmonicTrigTransforms # Include implementation files (relative to this file's directory) @@ -10,15 +18,6 @@ for fname in ( include(joinpath(@__DIR__, fname)) end -""" -PolyHarmonicTrigTransforms - -Provides polyharmonic and trigonometric transform routines: -DST/IDST, LLST families, polyharmonic LCT, and Laplace solvers. - -See the `docs/` directory for usage examples and API reference. -""" - using .DST using .IDST using .LLST From 67792097e4e18eb78dc3901971c3b11a9fb26134 Mon Sep 17 00:00:00 2001 From: Jason Y <4108945+jason-yoon21@users.noreply.github.com> Date: Thu, 29 Jan 2026 18:30:32 -0800 Subject: [PATCH 22/47] fix doc action --- .github/workflows/docs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 8d8d8b9..2f68182 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -17,7 +17,7 @@ jobs: - name: Install docs environment run: julia -e 'using Pkg; Pkg.activate("docs"); Pkg.instantiate()' - name: Build documentation - run: julia --project=docs docs/make.jl + run: julia --project=. docs/make.jl - name: Deploy to GitHub Pages uses: peaceiris/actions-gh-pages@v3 with: From fcf1f4dc638e09e744efbc59ca0439034249a010 Mon Sep 17 00:00:00 2001 From: Jason Y <4108945+jason-yoon21@users.noreply.github.com> Date: Thu, 29 Jan 2026 18:33:08 -0800 Subject: [PATCH 23/47] doc github action fix --- .github/workflows/docs.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 2f68182..d7d2471 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -14,8 +14,8 @@ jobs: - uses: julia-actions/setup-julia@v1 with: version: '1.10' - - name: Install docs environment - run: julia -e 'using Pkg; Pkg.activate("docs"); Pkg.instantiate()' + - name: Install project environment + run: julia -e 'using Pkg; Pkg.instantiate()' - name: Build documentation run: julia --project=. docs/make.jl - name: Deploy to GitHub Pages From 81290c5f79dbf7c535592e61c7ace8141872d1ba Mon Sep 17 00:00:00 2001 From: Jason Y <4108945+jason-yoon21@users.noreply.github.com> Date: Thu, 29 Jan 2026 18:39:43 -0800 Subject: [PATCH 24/47] docs github action --- .github/workflows/docs.yml | 2 +- docs/Project.toml | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index d7d2471..c0ae95e 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -15,7 +15,7 @@ jobs: with: version: '1.10' - name: Install project environment - run: julia -e 'using Pkg; Pkg.instantiate()' + run: julia -e 'using Pkg; Pkg.activate("."); Pkg.instantiate()' - name: Build documentation run: julia --project=. docs/make.jl - name: Deploy to GitHub Pages diff --git a/docs/Project.toml b/docs/Project.toml index 880ac0a..94fec48 100644 --- a/docs/Project.toml +++ b/docs/Project.toml @@ -4,3 +4,6 @@ authors = ["UCD4IDS"] [deps] Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" + +[compat] +Documenter = "1.16.1" From ca4034d21817a75d6269541aa70f4dc726a06966 Mon Sep 17 00:00:00 2001 From: Jason Y <4108945+jason-yoon21@users.noreply.github.com> Date: Thu, 29 Jan 2026 18:47:46 -0800 Subject: [PATCH 25/47] docs github action fix --- .github/workflows/docs.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index c0ae95e..5756145 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -15,7 +15,9 @@ jobs: with: version: '1.10' - name: Install project environment - run: julia -e 'using Pkg; Pkg.activate("."); Pkg.instantiate()' + run: | + julia -e 'using Pkg; Pkg.activate("."); Pkg.instantiate()' + julia -e 'using Pkg; Pkg.precompile()' - name: Build documentation run: julia --project=. docs/make.jl - name: Deploy to GitHub Pages From da78196fa976e2a782ddad7e0a3d3753218b60a9 Mon Sep 17 00:00:00 2001 From: Jason Y <4108945+jason-yoon21@users.noreply.github.com> Date: Thu, 29 Jan 2026 18:56:13 -0800 Subject: [PATCH 26/47] docs github action --- .github/workflows/docs.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 5756145..58e0083 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -16,8 +16,7 @@ jobs: version: '1.10' - name: Install project environment run: | - julia -e 'using Pkg; Pkg.activate("."); Pkg.instantiate()' - julia -e 'using Pkg; Pkg.precompile()' + julia -e 'using Pkg; Pkg.activate("."); Pkg.develop(path="."); Pkg.instantiate(); Pkg.precompile()' - name: Build documentation run: julia --project=. docs/make.jl - name: Deploy to GitHub Pages From c92b853c7e06ea2df95178341297458fb222adee Mon Sep 17 00:00:00 2001 From: Jason Y <4108945+jason-yoon21@users.noreply.github.com> Date: Thu, 29 Jan 2026 18:59:49 -0800 Subject: [PATCH 27/47] test --- src/polyharmonictrigtransforms.jl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/polyharmonictrigtransforms.jl b/src/polyharmonictrigtransforms.jl index 82342ea..f292754 100644 --- a/src/polyharmonictrigtransforms.jl +++ b/src/polyharmonictrigtransforms.jl @@ -1,3 +1,8 @@ +""" +Package entry wrapper to satisfy Pkg's expected source filename. +This file simply includes the actual implementation file `polyharmonictrigtransforms.jl`. +""" +include(joinpath(@__DIR__, "polyharmonictrigtransforms.jl")) # Module entrypoint """ PolyHarmonicTrigTransforms From e5b6c8f6ea87375176ca1319d34dfe12efe49dda Mon Sep 17 00:00:00 2001 From: Jason Y <4108945+jason-yoon21@users.noreply.github.com> Date: Thu, 29 Jan 2026 19:02:21 -0800 Subject: [PATCH 28/47] test --- .github/workflows/docs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 58e0083..a4f6a73 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -16,7 +16,7 @@ jobs: version: '1.10' - name: Install project environment run: | - julia -e 'using Pkg; Pkg.activate("."); Pkg.develop(path="."); Pkg.instantiate(); Pkg.precompile()' + julia -e 'using Pkg; Pkg.activate("."); Pkg.instantiate(); Pkg.precompile()' - name: Build documentation run: julia --project=. docs/make.jl - name: Deploy to GitHub Pages From 639993bb86489869d59c9051e89f51477d39e45b Mon Sep 17 00:00:00 2001 From: Jason Y <4108945+jason-yoon21@users.noreply.github.com> Date: Thu, 29 Jan 2026 19:12:01 -0800 Subject: [PATCH 29/47] fix --- .github/workflows/docs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index a4f6a73..ee460f7 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -16,7 +16,7 @@ jobs: version: '1.10' - name: Install project environment run: | - julia -e 'using Pkg; Pkg.activate("."); Pkg.instantiate(); Pkg.precompile()' + julia -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate(); Pkg.precompile()' - name: Build documentation run: julia --project=. docs/make.jl - name: Deploy to GitHub Pages From f45de48e8be8b125a428a1557bf1cff21c9704dd Mon Sep 17 00:00:00 2001 From: Jason Y <4108945+jason-yoon21@users.noreply.github.com> Date: Thu, 29 Jan 2026 19:23:03 -0800 Subject: [PATCH 30/47] test --- .github/workflows/docs.yml | 2 +- src/polyharmonictrigtransforms.jl | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index ee460f7..46fc116 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -16,7 +16,7 @@ jobs: version: '1.10' - name: Install project environment run: | - julia -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate(); Pkg.precompile()' + julia -e 'using Pkg; Pkg.activate(); Pkg.instantiate(); Pkg.precompile()' - name: Build documentation run: julia --project=. docs/make.jl - name: Deploy to GitHub Pages diff --git a/src/polyharmonictrigtransforms.jl b/src/polyharmonictrigtransforms.jl index f292754..0bdf058 100644 --- a/src/polyharmonictrigtransforms.jl +++ b/src/polyharmonictrigtransforms.jl @@ -2,7 +2,6 @@ Package entry wrapper to satisfy Pkg's expected source filename. This file simply includes the actual implementation file `polyharmonictrigtransforms.jl`. """ -include(joinpath(@__DIR__, "polyharmonictrigtransforms.jl")) # Module entrypoint """ PolyHarmonicTrigTransforms From 30b06db8a3a9686b6e0764f9402b490e079a122f Mon Sep 17 00:00:00 2001 From: Jason Y <4108945+jason-yoon21@users.noreply.github.com> Date: Thu, 29 Jan 2026 19:25:16 -0800 Subject: [PATCH 31/47] version up --- .github/workflows/docs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 46fc116..4e3da7d 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -13,7 +13,7 @@ jobs: - uses: actions/checkout@v4 - uses: julia-actions/setup-julia@v1 with: - version: '1.10' + version: '1.12' - name: Install project environment run: | julia -e 'using Pkg; Pkg.activate(); Pkg.instantiate(); Pkg.precompile()' From ae42e74772622b2fb5275cdebc439bf852c6f40e Mon Sep 17 00:00:00 2001 From: Jason Y <4108945+jason-yoon21@users.noreply.github.com> Date: Thu, 29 Jan 2026 19:26:56 -0800 Subject: [PATCH 32/47] version up --- .github/workflows/docs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 4e3da7d..821b86c 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: julia-actions/setup-julia@v1 + - uses: julia-actions/setup-julia@latest with: version: '1.12' - name: Install project environment From e01acc55f1f1cced3ad423ab6b62b92ab90c5bf8 Mon Sep 17 00:00:00 2001 From: Jason Y <4108945+jason-yoon21@users.noreply.github.com> Date: Thu, 29 Jan 2026 19:28:21 -0800 Subject: [PATCH 33/47] test --- .github/workflows/docs.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 821b86c..e39b8c8 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -15,8 +15,7 @@ jobs: with: version: '1.12' - name: Install project environment - run: | - julia -e 'using Pkg; Pkg.activate(); Pkg.instantiate(); Pkg.precompile()' + run: julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()' - name: Build documentation run: julia --project=. docs/make.jl - name: Deploy to GitHub Pages From e3eda44f374fea4327e2111bc0540981812308b1 Mon Sep 17 00:00:00 2001 From: Jason Y <4108945+jason-yoon21@users.noreply.github.com> Date: Thu, 29 Jan 2026 19:29:49 -0800 Subject: [PATCH 34/47] test --- .github/workflows/docs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index e39b8c8..e189210 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -15,7 +15,7 @@ jobs: with: version: '1.12' - name: Install project environment - run: julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()' + run: julia --project=docs/ -e 'using Pkg; Pkg.develop("."); Pkg.instantiate()' - name: Build documentation run: julia --project=. docs/make.jl - name: Deploy to GitHub Pages From 4c41bd72f8d2031e2cc72ba6722dab93cb732610 Mon Sep 17 00:00:00 2001 From: Jason Y <4108945+jason-yoon21@users.noreply.github.com> Date: Thu, 29 Jan 2026 19:31:41 -0800 Subject: [PATCH 35/47] test --- .github/workflows/docs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index e189210..0239145 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -15,7 +15,7 @@ jobs: with: version: '1.12' - name: Install project environment - run: julia --project=docs/ -e 'using Pkg; Pkg.develop("."); Pkg.instantiate()' + run: julia --project=docs -e 'using Pkg; Pkg.develop(path=".."); Pkg.instantiate(); Pkg.precompile()' - name: Build documentation run: julia --project=. docs/make.jl - name: Deploy to GitHub Pages From 8092010dd9478cc564f2f968d6c9e6afb8f8fae0 Mon Sep 17 00:00:00 2001 From: Jason Y <4108945+jason-yoon21@users.noreply.github.com> Date: Sun, 8 Feb 2026 02:42:06 -0800 Subject: [PATCH 36/47] doc cdci --- .github/workflows/docs.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 0239145..492c7fd 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -15,7 +15,8 @@ jobs: with: version: '1.12' - name: Install project environment - run: julia --project=docs -e 'using Pkg; Pkg.develop(path=".."); Pkg.instantiate(); Pkg.precompile()' + run: | + julia -e 'using Pkg; Pkg.activate("."); Pkg.instantiate(); Pkg.precompile()' - name: Build documentation run: julia --project=. docs/make.jl - name: Deploy to GitHub Pages From 007aa9064a49e08b81b2479ae16a9349e75e02e0 Mon Sep 17 00:00:00 2001 From: Jason Y <4108945+jason-yoon21@users.noreply.github.com> Date: Sun, 8 Feb 2026 03:02:29 -0800 Subject: [PATCH 37/47] doc cdci --- .github/workflows/docs.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 492c7fd..15d6f9b 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -15,8 +15,9 @@ jobs: with: version: '1.12' - name: Install project environment - run: | - julia -e 'using Pkg; Pkg.activate("."); Pkg.instantiate(); Pkg.precompile()' + run: julia --project="${{ github.workspace }}" -e 'using Pkg; Pkg.instantiate(); Pkg.precompile()' + #- name: Install project environment + #run: julia -e 'using Pkg; Pkg.activate("."); Pkg.instantiate(); Pkg.precompile()' - name: Build documentation run: julia --project=. docs/make.jl - name: Deploy to GitHub Pages From 6aeeec15ced7309fe49e1a388e987f39139569ba Mon Sep 17 00:00:00 2001 From: Jason Y <4108945+jason-yoon21@users.noreply.github.com> Date: Sun, 8 Feb 2026 03:17:54 -0800 Subject: [PATCH 38/47] test --- .github/workflows/docs.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 15d6f9b..3883f19 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -15,9 +15,8 @@ jobs: with: version: '1.12' - name: Install project environment - run: julia --project="${{ github.workspace }}" -e 'using Pkg; Pkg.instantiate(); Pkg.precompile()' - #- name: Install project environment - #run: julia -e 'using Pkg; Pkg.activate("."); Pkg.instantiate(); Pkg.precompile()' + run: | + julia -e 'using Pkg; Pkg.activate(ENV["GITHUB_WORKSPACE"]); Pkg.instantiate(); Pkg.precompile()' - name: Build documentation run: julia --project=. docs/make.jl - name: Deploy to GitHub Pages From dedae713cdeb351318f8dc5e4e0b8c96dcffe91d Mon Sep 17 00:00:00 2001 From: Jason Y <4108945+jason-yoon21@users.noreply.github.com> Date: Sun, 8 Feb 2026 04:02:44 -0800 Subject: [PATCH 39/47] test --- .github/workflows/docs.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 3883f19..1f1f567 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -15,8 +15,7 @@ jobs: with: version: '1.12' - name: Install project environment - run: | - julia -e 'using Pkg; Pkg.activate(ENV["GITHUB_WORKSPACE"]); Pkg.instantiate(); Pkg.precompile()' + run: julia -e 'using Pkg; Pkg.activate(); Pkg.instantiate(); Pkg.precompile()' - name: Build documentation run: julia --project=. docs/make.jl - name: Deploy to GitHub Pages From ef1c239cb27cdd15b844e6b6b99629b7d37912fe Mon Sep 17 00:00:00 2001 From: Jason Y <4108945+jason-yoon21@users.noreply.github.com> Date: Sun, 8 Feb 2026 04:19:15 -0800 Subject: [PATCH 40/47] test --- .github/workflows/docs.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 1f1f567..5a02803 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -15,7 +15,9 @@ jobs: with: version: '1.12' - name: Install project environment - run: julia -e 'using Pkg; Pkg.activate(); Pkg.instantiate(); Pkg.precompile()' + run: | + echo "GITHUB_WORKSPACE=$GITHUB_WORKSPACE" + julia --project="${{ github.workspace }}" -e 'using Pkg; Pkg.instantiate(); Pkg.precompile()' - name: Build documentation run: julia --project=. docs/make.jl - name: Deploy to GitHub Pages From 25667ae5deeb90d1b004c9b0fc18da14b5a146f1 Mon Sep 17 00:00:00 2001 From: Jason Y <4108945+jason-yoon21@users.noreply.github.com> Date: Tue, 10 Feb 2026 15:36:42 -0800 Subject: [PATCH 41/47] test --- .github/workflows/docs.yml | 50 ++++++++++++++++++++++++-------------- 1 file changed, 32 insertions(+), 18 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 5a02803..857f43b 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -1,27 +1,41 @@ name: Docs - on: + workflow_dispatch: push: - branches: [ main ] - pull_request: - branches: [ main ] - + paths: # rebuild the docs when the version changes or the docs change + - docs/* + - Project.toml + pull_request: # run when pull requests are made + paths: + - docs/* + - Project.toml jobs: - build: + docs: + name: Documentation runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v2 - uses: julia-actions/setup-julia@latest with: - version: '1.12' - - name: Install project environment + version: '1.7' + - name: Install dependencies run: | - echo "GITHUB_WORKSPACE=$GITHUB_WORKSPACE" - julia --project="${{ github.workspace }}" -e 'using Pkg; Pkg.instantiate(); Pkg.precompile()' - - name: Build documentation - run: julia --project=. docs/make.jl - - name: Deploy to GitHub Pages - uses: peaceiris/actions-gh-pages@v3 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./docs/build + sudo apt install libxt6 libxrender1 libxext6 libqt5widgets5 + - name: Instantiate + env: + PYTHON: "" + run: | + julia --project=docs -e ' + using Pkg + Pkg.instantiate() + Pkg.develop(PackageSpec(path=pwd())) + Pkg.instantiate()' + - name: Build and deploy + env: + PYTHON: "" + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + run: julia --project=docs --code-coverage=user docs/make.jl + - uses: julia-actions/julia-processcoverage@v1 + - uses: codecov/codecov-action@v1 \ No newline at end of file From ab5e3fa0a12fbc19dfa5c4d9a60f79a573648c79 Mon Sep 17 00:00:00 2001 From: Jason Y <4108945+jason-yoon21@users.noreply.github.com> Date: Tue, 10 Feb 2026 15:39:59 -0800 Subject: [PATCH 42/47] test1 --- .github/workflows/docs.yml | 45 +++++++++++++------------------------- 1 file changed, 15 insertions(+), 30 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 857f43b..acc1d5c 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -1,41 +1,26 @@ -name: Docs +name: Documenter on: - workflow_dispatch: push: - paths: # rebuild the docs when the version changes or the docs change - - docs/* - - Project.toml - pull_request: # run when pull requests are made - paths: - - docs/* - - Project.toml + branches: + - master + tags: '*' + paths: # Specifying which files to run CI/CD for + - src/** + - docs/** + pull_request: jobs: - docs: - name: Documentation + build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - uses: julia-actions/setup-julia@latest with: - version: '1.7' + version: '1.10' - name: Install dependencies - run: | - sudo apt install libxt6 libxrender1 libxext6 libqt5widgets5 - - name: Instantiate - env: - PYTHON: "" - run: | - julia --project=docs -e ' - using Pkg - Pkg.instantiate() - Pkg.develop(PackageSpec(path=pwd())) - Pkg.instantiate()' + run: julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()' - name: Build and deploy env: - PYTHON: "" - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} - run: julia --project=docs --code-coverage=user docs/make.jl - - uses: julia-actions/julia-processcoverage@v1 - - uses: codecov/codecov-action@v1 \ No newline at end of file + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # For authentication with GitHub Actions token + DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} # For authentication with SSH deploy key + GKSwstype: "100" # https://discourse.julialang.org/t/generation-of-documentation-fails-qt-qpa-xcb-could-not-connect-to-display/60988 + run: julia --project=docs/ docs/make.jl \ No newline at end of file From 1921ff1eb2cd6103c6d3cb992ba7bfe8ab684350 Mon Sep 17 00:00:00 2001 From: Jason Y <4108945+jason-yoon21@users.noreply.github.com> Date: Tue, 10 Feb 2026 15:42:21 -0800 Subject: [PATCH 43/47] test1 --- src/polyharmonictrigtransforms.jl | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/polyharmonictrigtransforms.jl b/src/polyharmonictrigtransforms.jl index 0bdf058..f18e673 100644 --- a/src/polyharmonictrigtransforms.jl +++ b/src/polyharmonictrigtransforms.jl @@ -13,14 +13,7 @@ See the `docs/` directory for usage examples and API reference. """ module PolyHarmonicTrigTransforms -# Include implementation files (relative to this file's directory) -for fname in ( - "dst.jl", "idst.jl", "llst.jl", "illst.jl", "llst2.jl", - "llstapprox2.jl", "solvelaplace.jl", "solvelaplace_old.jl", - "phlct.jl", "phlct2d.jl", "qtllst2dl1.jl", "helper.jl", -) - include(joinpath(@__DIR__, fname)) -end +include(joinpath(@__DIR__, "polyharmonictrigtransforms.jl")) using .DST using .IDST From e74a8d06263301ab11f939361ae7d6824730783a Mon Sep 17 00:00:00 2001 From: Jason Y <4108945+jason-yoon21@users.noreply.github.com> Date: Tue, 10 Feb 2026 16:06:33 -0800 Subject: [PATCH 44/47] update --- .github/workflows/docs.yml | 35 ++++++++++++++++--------------- docs/Project.toml | 4 +++- src/polyharmonictrigtransforms.jl | 13 +++++++++++- 3 files changed, 33 insertions(+), 19 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index acc1d5c..3a13c6f 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -1,26 +1,27 @@ -name: Documenter +name: Docs + on: push: - branches: - - master - tags: '*' - paths: # Specifying which files to run CI/CD for - - src/** - - docs/** + branches: [ main ] pull_request: + branches: [ main ] + jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - uses: julia-actions/setup-julia@latest with: - version: '1.10' - - name: Install dependencies - run: julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()' - - name: Build and deploy - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # For authentication with GitHub Actions token - DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} # For authentication with SSH deploy key - GKSwstype: "100" # https://discourse.julialang.org/t/generation-of-documentation-fails-qt-qpa-xcb-could-not-connect-to-display/60988 - run: julia --project=docs/ docs/make.jl \ No newline at end of file + version: '1.12' + - name: Install project environment + run: | + echo "GITHUB_WORKSPACE=$GITHUB_WORKSPACE" + julia --project=. -e 'using Pkg; Pkg.update(); Pkg.instantiate(); Pkg.precompile()' + - name: Build documentation + run: julia --project=. docs/make.jl + - name: Deploy to GitHub Pages + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./docs/build diff --git a/docs/Project.toml b/docs/Project.toml index 94fec48..5a788e4 100644 --- a/docs/Project.toml +++ b/docs/Project.toml @@ -4,6 +4,8 @@ authors = ["UCD4IDS"] [deps] Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" - +PolyHarmonicTrigTransforms = "c853eca7-4467-4dac-871a-88cef1644acc" + [compat] Documenter = "1.16.1" +PolyHarmonicTrigTransforms = "1.0.0" diff --git a/src/polyharmonictrigtransforms.jl b/src/polyharmonictrigtransforms.jl index f18e673..0ae8e5d 100644 --- a/src/polyharmonictrigtransforms.jl +++ b/src/polyharmonictrigtransforms.jl @@ -13,7 +13,18 @@ See the `docs/` directory for usage examples and API reference. """ module PolyHarmonicTrigTransforms -include(joinpath(@__DIR__, "polyharmonictrigtransforms.jl")) +include("dst.jl") +include("idst.jl") +include("llst.jl") +include("illst.jl") +include("llst2.jl") +include("llstapprox2.jl") +include("phlct.jl") +include("phlct2d.jl") +include("qtllst2dl1.jl") +include("solvelaplace.jl") +include("solvelaplace_old.jl") +include("helper.jl") using .DST using .IDST From beb6800e0ac105c08d3d4bafe58722615d47e6da Mon Sep 17 00:00:00 2001 From: Jason Y <4108945+jason-yoon21@users.noreply.github.com> Date: Tue, 10 Feb 2026 16:38:23 -0800 Subject: [PATCH 45/47] currently doc github action fails due to the package not being registered. ignore the known error and run all the steps --- .github/workflows/docs.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 3a13c6f..7097ab8 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -15,9 +15,8 @@ jobs: with: version: '1.12' - name: Install project environment - run: | - echo "GITHUB_WORKSPACE=$GITHUB_WORKSPACE" - julia --project=. -e 'using Pkg; Pkg.update(); Pkg.instantiate(); Pkg.precompile()' + continue-on-error: true + run: julia --project=. -e 'using Pkg; Pkg.update(); Pkg.instantiate(); Pkg.precompile()' - name: Build documentation run: julia --project=. docs/make.jl - name: Deploy to GitHub Pages From 8e946c1e49ae8727f8ce087d96859409284d8cc9 Mon Sep 17 00:00:00 2001 From: Jason Y <4108945+jason-yoon21@users.noreply.github.com> Date: Tue, 10 Feb 2026 16:48:27 -0800 Subject: [PATCH 46/47] test2 --- .github/workflows/docs.yml | 40 ++++++++++++++++++++++++-------------- 1 file changed, 25 insertions(+), 15 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 7097ab8..a970a32 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -1,26 +1,36 @@ -name: Docs +name: Documentation on: push: - branches: [ main ] + branches: + - 'master' + - 'release-' + paths-ignore: + - 'LICENSE.md' + - 'README.md' + tags: '*' pull_request: - branches: [ main ] jobs: build: - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} +# if: "!contains(github.event.head_commit.message, 'skip ci')" + strategy: + matrix: + julia-version: [1.5] + julia-arch: [x86] + os: [ubuntu-latest] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v2 - uses: julia-actions/setup-julia@latest with: - version: '1.12' - - name: Install project environment + version: ${{ matrix.julia-version }} + - name: Install dependencies continue-on-error: true - run: julia --project=. -e 'using Pkg; Pkg.update(); Pkg.instantiate(); Pkg.precompile()' - - name: Build documentation - run: julia --project=. docs/make.jl - - name: Deploy to GitHub Pages - uses: peaceiris/actions-gh-pages@v3 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./docs/build + run: julia --project=docs/ -e 'using Pkg; + Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()' + - name: Build and deploy + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} + run: julia --project=docs --color=yes docs/make.jl \ No newline at end of file From c2b2c39fe5460026256867baa532c9060b5235a1 Mon Sep 17 00:00:00 2001 From: Jason Y <4108945+jason-yoon21@users.noreply.github.com> Date: Tue, 10 Feb 2026 16:52:45 -0800 Subject: [PATCH 47/47] try1 --- .github/workflows/docs.yml | 43 +++++++++++++++----------------------- 1 file changed, 17 insertions(+), 26 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index a970a32..55d0e83 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -1,36 +1,27 @@ -name: Documentation +name: Docs on: push: - branches: - - 'master' - - 'release-' - paths-ignore: - - 'LICENSE.md' - - 'README.md' - tags: '*' + branches: [ main ] pull_request: + branches: [ main ] jobs: build: - runs-on: ${{ matrix.os }} -# if: "!contains(github.event.head_commit.message, 'skip ci')" - strategy: - matrix: - julia-version: [1.5] - julia-arch: [x86] - os: [ubuntu-latest] + runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - uses: julia-actions/setup-julia@latest with: - version: ${{ matrix.julia-version }} - - name: Install dependencies - continue-on-error: true - run: julia --project=docs/ -e 'using Pkg; - Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()' - - name: Build and deploy - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} - run: julia --project=docs --color=yes docs/make.jl \ No newline at end of file + version: '1.12' + - name: Register repo package and install environment + run: | + echo "GITHUB_WORKSPACE=$GITHUB_WORKSPACE" + julia -e "using Pkg; Pkg.develop(path=ENV[\"GITHUB_WORKSPACE\"]); Pkg.instantiate(); Pkg.precompile()" + - name: Build documentation + run: julia --project=. docs/make.jl + - name: Deploy to GitHub Pages + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./docs/build