Skip to content

Commit 7df218c

Browse files
authored
Merge pull request #15 from UCD4IDS/gh-pages
gh-pages
2 parents 273fc71 + 394cc33 commit 7df218c

24 files changed

+857
-96
lines changed

.github/workflows/CI.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,21 +16,21 @@ on:
1616
- Project.toml
1717
jobs:
1818
test:
19-
name: Julia ${{ matrix.julia-version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
19+
name: Julia ${{ matrix.julia-version }} - ${{ matrix.os }} - ${{ matrix.julia-arch }} - ${{ github.event_name }}
2020
runs-on: ${{ matrix.os }}
2121
strategy:
2222
fail-fast: false
2323
matrix:
2424
os: [windows-latest, macos-latest]
25-
julia-version: ['1.10', 'lts']
26-
arch:
27-
- x64
25+
julia-arch: [x64]
26+
julia-version: ['1.10','1.11','1.12', 'lts']
27+
2828
steps:
2929
- uses: actions/checkout@v4
3030
- uses: julia-actions/setup-julia@v2
3131
with:
3232
version: ${{ matrix.julia-version }}
33-
arch: ${{ matrix.arch }}
33+
arch: ${{ matrix.julia-arch }}
3434
- uses: actions/cache@v4
3535
env:
3636
cache-name: cache-artifacts
@@ -45,7 +45,7 @@ jobs:
4545
${{ runner.os }}-
4646
- uses: julia-actions/julia-buildpkg@v1
4747
- name: Resolve/Update dependencies
48-
run: julia -e 'using Pkg; Pkg.resolve()' # Or Pkg.update()
48+
run: julia -e 'using Pkg; Pkg.activate("."); Pkg.instantiate(); Pkg.update();' # Or Pkg.update()
4949
- uses: julia-actions/julia-runtest@v1
5050
with:
5151
annotate: true

.github/workflows/TagBot.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ on:
33
issue_comment:
44
types:
55
- created
6-
schedule:
7-
- cron: 0 0 * * *
86
workflow_dispatch:
97
jobs:
108
TagBot:
@@ -13,5 +11,4 @@ jobs:
1311
steps:
1412
- uses: JuliaRegistries/TagBot@v1
1513
with:
16-
token: ${{ secrets.GITHUB_TOKEN }}
17-
ssh: ${{ secrets.DOCUMENTER_KEY }}
14+
token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/docs.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Documentation
2+
3+
on:
4+
push:
5+
branches:
6+
- master # update to match your development branch (master, main, dev, trunk, ...)
7+
tags: '*'
8+
pull_request:
9+
10+
jobs:
11+
build:
12+
# These permissions are needed to:
13+
# - Deploy the documentation: https://documenter.juliadocs.org/stable/man/hosting/#Permissions
14+
# - Delete old caches: https://github.com/julia-actions/cache#usage
15+
permissions:
16+
actions: write
17+
contents: write
18+
pull-requests: read
19+
statuses: write
20+
runs-on: ubuntu-latest
21+
steps:
22+
- uses: actions/checkout@v4
23+
- uses: julia-actions/setup-julia@latest
24+
with:
25+
version: '1'
26+
- uses: julia-actions/cache@v2
27+
- name: Install dependencies
28+
shell: julia --color=yes --project=docs {0}
29+
run: using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()
30+
31+
- name: Build and deploy
32+
run: julia --color=yes --project=docs docs/make.jl
33+
env:
34+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # If authenticating with GitHub Actions token

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,6 @@
22
test/.ipynb_checkpoints
33
test/*.ipynb
44
Manifest.toml
5-
Manifest-v1.11.toml
5+
Manifest-v1.11.toml
6+
*.txt
7+
docs/build/

Project.toml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,12 @@ uuid = "c853eca7-4467-4dac-871a-88cef1644acc"
33
version = "1.0.0"
44
authors = []
55

6+
[workspace]
7+
projects = ["test", "docs"]
8+
69
[deps]
710
AbstractFFTs = "621f4979-c628-5d54-868e-fcf4e3e8185c"
11+
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
812
FFTW = "7a1cc6ca-52ef-59f5-83cd-3a7055c09341"
913
FileIO = "5789e2e9-d7fb-5bc7-8068-2c6fae9b9549"
1014
ImageIO = "82e4d734-157c-48bb-816b-45c225c6df19"
@@ -17,24 +21,24 @@ Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
1721
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
1822

1923
[weakdeps]
20-
AbstractFFTs = "621f4979-c628-5d54-868e-fcf4e3e8185c"
21-
FFTW = "7a1cc6ca-52ef-59f5-83cd-3a7055c09341"
2224
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
2325

24-
[extras]
25-
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" # UUID for the standard library Test
26-
AbstractFFTs = "621f4979-c628-5d54-868e-fcf4e3e8185c"
27-
2826
[compat]
2927
AbstractFFTs = "1"
28+
Documenter = "1.17"
3029
FFTW = "1"
3130
FileIO = "1"
3231
ImageIO = "0.6"
3332
ImageMagick = "1"
3433
Images = "0.26"
35-
MAT = "0.10, 0.11"
34+
MAT = "0.10"
3635
Plots = "1"
3736
Statistics = "1"
3837

38+
[extras]
39+
AbstractFFTs = "621f4979-c628-5d54-868e-fcf4e3e8185c"
40+
FFTW = "7a1cc6ca-52ef-59f5-83cd-3a7055c09341"
41+
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
42+
3943
[targets]
4044
test = ["Test", "FFTW", "AbstractFFTs"]

README.md

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
1+
[![Documentation](https://github.com/UCD4IDS/PolyHarmonicTrigTransforms.jl/actions/workflows/docs.yml/badge.svg)](https://github.com/UCD4IDS/PolyHarmonicTrigTransforms.jl/actions/workflows/docs.yml)
22
[![CI](https://github.com/UCD4IDS/PolyHarmonicTrigTransforms.jl/actions/workflows/CI.yml/badge.svg?branch=main)](https://github.com/UCD4IDS/PolyHarmonicTrigTransforms.jl/actions/workflows/CI.yml) [![CompatHelper](https://github.com/UCD4IDS/PolyHarmonicTrigTransforms.jl/actions/workflows/CompatHelper.yml/badge.svg?branch=main)](https://github.com/UCD4IDS/PolyHarmonicTrigTransforms.jl/actions/workflows/CompatHelper.yml) [![TagBot](https://github.com/UCD4IDS/PolyHarmonicTrigTransforms.jl/actions/workflows/TagBot.yml/badge.svg?branch=main)](https://github.com/UCD4IDS/PolyHarmonicTrigTransforms.jl/actions/workflows/TagBot.yml)
33

44
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
@@ -121,6 +121,31 @@ iphlct = iphlct2d(phlct, n)
121121

122122
Reference: [Professor Saito's paper][paper] page 30 Chapter 6.2.2.
123123

124+
## Examples
125+
126+
Basic DST/IDST round-trip:
127+
128+
```julia
129+
using .PolyHarmonicTrigTransforms
130+
131+
x = randn(8)
132+
y = dst(x)
133+
x_rec = idst(y)
134+
@assert maximum(abs.(x_rec - 4 .* x ./ 4)) < 1e-12 # numeric check
135+
```
136+
137+
PHLCT forward/backward round-trip (block size `N`):
138+
139+
```julia
140+
using .PolyHarmonicTrigTransforms
141+
142+
n = 8
143+
img = randn(n, n)
144+
coeffs = phlct_forward(img, n)
145+
img_rec = phlct_backward(coeffs, n)
146+
@assert norm(img - img_rec) / norm(img) < 1e-12
147+
```
148+
124149
#### Image Testing
125150

126151
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).
@@ -190,11 +215,6 @@ julia> ]
190215
(@v1.8) pkg> add "MAT"
191216
```
192217

193-
Example plain HTML site using GitLab Pages.
194-
195-
Learn more about GitLab Pages at https://pages.gitlab.io and the official
196-
documentation https://docs.gitlab.com/ce/user/project/pages/.
197-
198218
---
199219

200220

docs/Project.toml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[deps]
2+
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
3+
PolyHarmonicTrigTransforms = "c853eca7-4467-4dac-871a-88cef1644acc"
4+
5+
[compat]
6+
Documenter = "1.17"
7+
PolyHarmonicTrigTransforms = "1.0"

docs/make.jl

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
using Documenter
2+
using PolyHarmonicTrigTransforms
3+
4+
makedocs(
5+
modules = [PolyHarmonicTrigTransforms],
6+
sitename = "PolyHarmonicTrigTransforms.jl",
7+
pages = [
8+
"Home" => "index.md",
9+
"API" => "api.md",
10+
],
11+
format = Documenter.HTML(),
12+
clean = true,
13+
debug = true,
14+
checkdocs = :none, # disable docstring checks to avoid failing on undocumented symbols
15+
)
16+
17+
deploydocs(
18+
repo = "github.com/UCD4IDS/PolyHarmonicTrigTransforms.jl.git"
19+
)

docs/src/api.md

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# API Reference
2+
3+
This page documents the package API automatically.
4+
5+
```@autodocs
6+
Modules = [PolyHarmonicTrigTransforms]
7+
Order = [:modules, :types, :functions]
8+
```
9+
10+
## DST
11+
```@docs
12+
PolyHarmonicTrigTransforms.dst
13+
PolyHarmonicTrigTransforms.dst!
14+
PolyHarmonicTrigTransforms.plan_dst
15+
```
16+
17+
## IDST
18+
```@docs
19+
PolyHarmonicTrigTransforms.idst
20+
PolyHarmonicTrigTransforms.plan_idst
21+
PolyHarmonicTrigTransforms.idst!
22+
```
23+
24+
## LLST
25+
```@docs
26+
PolyHarmonicTrigTransforms.llst2d
27+
PolyHarmonicTrigTransforms.llst2d!
28+
PolyHarmonicTrigTransforms.illst2d
29+
PolyHarmonicTrigTransforms.illst2d!
30+
```
31+
32+
## ILLST
33+
```@docs
34+
PolyHarmonicTrigTransforms.illst
35+
```
36+
37+
## LLST2
38+
```@docs
39+
PolyHarmonicTrigTransforms.llst2
40+
PolyHarmonicTrigTransforms.llst2!
41+
```
42+
43+
## LLSTAPPROX2
44+
```@docs
45+
PolyHarmonicTrigTransforms.llstapprox2
46+
```
47+
48+
## PHLCT
49+
```@docs
50+
PolyHarmonicTrigTransforms.phlct_backward
51+
PolyHarmonicTrigTransforms.phlct_backward!
52+
PolyHarmonicTrigTransforms.phlct_forward
53+
PolyHarmonicTrigTransforms.phlct_forward!
54+
PolyHarmonicTrigTransforms.phlct_restore
55+
```
56+
57+
## PHLCT2D
58+
```@docs
59+
PolyHarmonicTrigTransforms.phlct2d
60+
```
61+
62+
## QTLLST2DL1
63+
```@docs
64+
PolyHarmonicTrigTransforms.qtllst2dl1
65+
```
66+
67+
## SOLVELAPLACE
68+
```@docs
69+
PolyHarmonicTrigTransforms.solvelaplace
70+
```

0 commit comments

Comments
 (0)