From 1f9dabff135837d91143dd07675b4077ee0c4c50 Mon Sep 17 00:00:00 2001 From: Chris Garling Date: Fri, 16 May 2025 12:28:47 -0400 Subject: [PATCH 1/9] Support Interpolations v0.16 --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 9acc090..c2f530e 100644 --- a/Project.toml +++ b/Project.toml @@ -17,7 +17,7 @@ AxisAlgorithms = "0.3, 1.0" CoordinateTransformations = "0.5, 0.6" ImageBase = "0.1.1" ImageCore = "0.9, 0.10" -Interpolations = "0.13.4, 0.14, 0.15" +Interpolations = "0.13.4, 0.14, 0.15, 0.16" OffsetArrays = "0.10, 0.11, 1.0.1" Rotations = "0.12, 0.13, 1.0" StaticArrays = "0.10, 0.11, 0.12, 1.0" From 69b0d54fcec31dd3e0963d3805bef3fe773726ee Mon Sep 17 00:00:00 2001 From: Chris Garling Date: Fri, 16 May 2025 12:31:10 -0400 Subject: [PATCH 2/9] Give CompatHelper explicit permissions --- .github/workflows/CompatHelper.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/CompatHelper.yml b/.github/workflows/CompatHelper.yml index b57619a..cab0acd 100644 --- a/.github/workflows/CompatHelper.yml +++ b/.github/workflows/CompatHelper.yml @@ -5,6 +5,10 @@ on: - cron: '00 00 * * *' workflow_dispatch: +permissions: + contents: write + pull-requests: write + jobs: CompatHelper: runs-on: ${{ matrix.os }} From 98e77bd3d26ea7e27c4912dec4b86946f4b57c68 Mon Sep 17 00:00:00 2001 From: Chris Garling Date: Fri, 16 May 2025 12:33:11 -0400 Subject: [PATCH 3/9] Add dependabot Keep actions up to date --- .github/dependabot.yml | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..5ace460 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,6 @@ +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" From 78054023dcb1757a4d798de512b497f34600e6d3 Mon Sep 17 00:00:00 2001 From: Chris Garling Date: Fri, 16 May 2025 12:48:01 -0400 Subject: [PATCH 4/9] Update docs.yml --- .github/workflows/docs.yml | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index cb34c7b..bab16d8 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -18,21 +18,11 @@ jobs: julia-version: [1] os: [ubuntu-latest] steps: - - uses: actions/checkout@v2 - - uses: julia-actions/setup-julia@latest + - uses: actions/checkout@v4 + - uses: julia-actions/setup-julia@v2 with: version: ${{ matrix.julia-version }} - - name: Cache artifacts - uses: actions/cache@v1 - env: - cache-name: cache-artifacts - with: - path: ~/.julia/artifacts - key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }} - restore-keys: | - ${{ runner.os }}-test-${{ env.cache-name }}- - ${{ runner.os }}-test- - ${{ runner.os }}- + - uses: julia-actions/cache@v2 - name: Install dependencies run: julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()' - name: Build and deploy From c54fa90425f8029a7b8fab2350285f962f2f32b9 Mon Sep 17 00:00:00 2001 From: Chris Garling Date: Fri, 16 May 2025 12:55:34 -0400 Subject: [PATCH 5/9] Fix autorange.jl doctests --- src/autorange.jl | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/autorange.jl b/src/autorange.jl index afbdf7e..2710592 100644 --- a/src/autorange.jl +++ b/src/autorange.jl @@ -9,11 +9,11 @@ preserves all information from `A` after applying `tform`. For transformation that preserves the array size, `autorange` is equivalent to `axes(A)`. ```jldoctest; setup=:(using ImageTransformations: autorange; using CoordinateTransformations, Rotations, ImageTransformations) -A = rand(5, 5) -tform = IdentityTransformation() -autorange(A, tform) == axes(A) +julia> A = rand(5, 5); -# output +julia> tform = IdentityTransformation(); + +julia> autorange(A, tform) == axes(A) true ``` @@ -21,11 +21,11 @@ The diffrence shows up when `tform` enlarges the input array `A`. In the followi at least `(0:6, 0:6)` as the range indices to get all data of `A`: ```jldoctest; setup=:(using ImageTransformations: autorange; using CoordinateTransformations, Rotations, ImageTransformations) -A = rand(5, 5) -tform = recenter(RotMatrix(pi/8), center(A)) -autorange(A, tform) +julia> A = rand(5, 5); + +julia> tform = recenter(RotMatrix(pi/8), center(A)); -# output +julia> autorange(A, tform) (0:6, 0:6) ``` From f0e3d8249b8f6e23fb443205ea004820ef568e3c Mon Sep 17 00:00:00 2001 From: Chris Garling Date: Fri, 16 May 2025 12:58:29 -0400 Subject: [PATCH 6/9] Change jldoctest blocks to julia blocks I don't see output that the jldoctest block is supposed to test against, so maybe these should just be julia blocks? --- src/ImageTransformations.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ImageTransformations.jl b/src/ImageTransformations.jl index 5f34093..40d6350 100644 --- a/src/ImageTransformations.jl +++ b/src/ImageTransformations.jl @@ -14,7 +14,7 @@ There are in-place version of many of the functions, e.g., `imresize!` etc. Resize example: -```jldoctest +```julia using ImageTransformations, TestImages img = testimage("mandrill") @@ -25,7 +25,7 @@ img_medium = imresize(img_small, size(img_small).*2) Warping example: -```jldoctest +```julia using ImageTransformations, TestImages, CoordinateTransformations, Rotations img = testimage("camera"); From 228712c1577a4e15d1a52e1253213cfdfb042cb7 Mon Sep 17 00:00:00 2001 From: Chris Garling Date: Fri, 16 May 2025 13:04:15 -0400 Subject: [PATCH 7/9] Fix jldoctests in warp.jl --- src/warp.jl | 46 ++++++++++++++++++++++++---------------------- 1 file changed, 24 insertions(+), 22 deletions(-) diff --git a/src/warp.jl b/src/warp.jl index ed57b3f..19489e8 100644 --- a/src/warp.jl +++ b/src/warp.jl @@ -93,19 +93,19 @@ Also, `fillvalue` can be extrapolation schemes: `Flat()`, `Periodic()` and `Refl way to understand these schemes is perhaps try it with small example: ```jldoctest -using ImageTransformations, TestImages, Interpolations -using OffsetArrays: IdOffsetRange +julia> using ImageTransformations, TestImages, Interpolations -img = testimage("lighthouse") +julia> using OffsetArrays: IdOffsetRange -imgr = imrotate(img, π/4; fillvalue=Flat()) # zero extrapolation slope -imgr = imrotate(img, π/4; fillvalue=Periodic()) # periodic boundary -imgr = imrotate(img, π/4; fillvalue=Reflect()) # mirror boundary +julia> img = testimage("lighthouse"); -axes(imgr) +julia> imgr = imrotate(img, π/4; fillvalue=Flat()); # zero extrapolation slope -# output +julia> imgr = imrotate(img, π/4; fillvalue=Periodic()); # periodic boundary +julia> imgr = imrotate(img, π/4; fillvalue=Reflect()); # mirror boundary + +julia> axes(imgr) (IdOffsetRange(values=-196:709, indices=-196:709), IdOffsetRange(values=-68:837, indices=-68:837)) ``` @@ -116,16 +116,15 @@ axes(imgr) pixels in `img`. ```jldoctest -using ImageTransformations, TestImages, Interpolations +julia> using ImageTransformations, TestImages, Interpolations + +julia> img = testimage("lighthouse"); -img = testimage("lighthouse") -imgr = imrotate(img, π/4) -imgr_cropped = imrotate(img, π/4, axes(img)) +julia> imgr = imrotate(img, π/4); -# No need to manually calculate the offsets -imgr[axes(img)...] == imgr_cropped +julia> imgr_cropped = imrotate(img, π/4, axes(img)); -# output +julia> imgr[axes(img)...] == imgr_cropped # No need to manually calculate the offsets true ``` @@ -142,17 +141,20 @@ true Rotate around the center of `img`: ```jldoctest -using ImageTransformations, CoordinateTransformations, Rotations, TestImages, OffsetArrays -using OffsetArrays: IdOffsetRange -img = testimage("lighthouse") # axes (1:512, 1:768) +julia> using ImageTransformations, CoordinateTransformations, Rotations, TestImages, OffsetArrays + +julia> using OffsetArrays: IdOffsetRange + +julia> img = testimage("lighthouse"); # axes (1:512, 1:768) -tfm = recenter(RotMatrix(-pi/4), center(img)) -imgw = warp(img, tfm) +julia> axes(img) +(1:512, 1:768) -axes(imgw) +julia> tfm = recenter(RotMatrix(-pi/4), center(img)); -# output +julia> imgw = warp(img, tfm); +julia> axes(imgw) (IdOffsetRange(values=-196:709, indices=-196:709), IdOffsetRange(values=-68:837, indices=-68:837)) ``` From e79bda6279bcf89972958c130454d4f3e97c5c02 Mon Sep 17 00:00:00 2001 From: Chris Garling Date: Fri, 16 May 2025 13:06:58 -0400 Subject: [PATCH 8/9] Fix doctest in warp.jl Axes expression was wrong --- src/warp.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/warp.jl b/src/warp.jl index 19489e8..54e071a 100644 --- a/src/warp.jl +++ b/src/warp.jl @@ -145,10 +145,10 @@ julia> using ImageTransformations, CoordinateTransformations, Rotations, TestIma julia> using OffsetArrays: IdOffsetRange -julia> img = testimage("lighthouse"); # axes (1:512, 1:768) +julia> img = testimage("lighthouse"); julia> axes(img) -(1:512, 1:768) +(Base.OneTo(512), Base.OneTo(768)) julia> tfm = recenter(RotMatrix(-pi/4), center(img)); From d631e7a15a1fdf51b7ca32bca01978845ec9af4b Mon Sep 17 00:00:00 2001 From: Chris Garling Date: Fri, 16 May 2025 13:10:43 -0400 Subject: [PATCH 9/9] Update UnitTest.yml actions --- .github/workflows/UnitTest.yml | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/.github/workflows/UnitTest.yml b/.github/workflows/UnitTest.yml index d4ab095..ff9c285 100644 --- a/.github/workflows/UnitTest.yml +++ b/.github/workflows/UnitTest.yml @@ -27,28 +27,18 @@ jobs: steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: "Set up Julia" - uses: julia-actions/setup-julia@v1 + uses: julia-actions/setup-julia@v2 with: version: ${{ matrix.julia-version }} arch: ${{ matrix.arch }} - - - name: Cache artifacts - uses: actions/cache@v1 - env: - cache-name: cache-artifacts - with: - path: ~/.julia/artifacts - key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }} - restore-keys: | - ${{ runner.os }}-test-${{ env.cache-name }}- - ${{ runner.os }}-test- - ${{ runner.os }}- + - uses: julia-actions/cache@v2 + - uses: julia-actions/julia-buildpkg@v1 - name: "Unit Test" - uses: julia-actions/julia-runtest@master + uses: julia-actions/julia-runtest@v1 - uses: julia-actions/julia-processcoverage@v1 - - uses: codecov/codecov-action@v1 + - uses: codecov/codecov-action@v5 with: file: lcov.info