diff --git a/.github/dependabot.yml b/.github/dependabot.yml index e958e68..d486ff7 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -6,5 +6,3 @@ updates: directory: "/" schedule: interval: "weekly" - assignees: - - "JeffFessler" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7ad6140..164574f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,16 +27,33 @@ jobs: os: [ubuntu-latest, windows-latest, macOS-latest] steps: - uses: actions/checkout@v4 + # - name: "Set up Julia" - uses: julia-actions/setup-julia@latest with: version: ${{ matrix.version }} + + - name: Cache artifacts + uses: actions/cache@v4 + 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 }}- + # - name: "Unit Test" - uses: julia-actions/julia-buildpkg@latest - uses: julia-actions/julia-runtest@latest + # - name: "Cover" - uses: julia-actions/julia-processcoverage@v1 - uses: codecov/codecov-action@v4 if: ${{ matrix.version == '1' && matrix.os == 'ubuntu-latest' }} with: file: lcov.info + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} diff --git a/Project.toml b/Project.toml index c67c53c..2753a8b 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "ImagePhantoms" uuid = "71a99df6-f52c-4da1-bd2a-69d6f37f3252" authors = ["Jeff Fessler and contributors"] -version = "0.8" +version = "0.8.1" [deps] LazyGrids = "7031d0ef-c40d-4431-b2f8-61a8d2f650db" @@ -9,6 +9,7 @@ Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" SpecialFunctions = "276daf66-3868-5448-9aa4-cd146d93841b" [compat] -LazyGrids = "0.5, 1" +LazyGrids = "1" +Random = "1" SpecialFunctions = "1.8, 2" julia = "1.10" diff --git a/README.md b/README.md index de899ec..24c361b 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,7 @@ https://github.com/JuliaImageRecon/ImagePhantoms.jl [![license][license-img]][license-url] [![docs-stable][docs-stable-img]][docs-stable-url] [![docs-dev][docs-dev-img]][docs-dev-url] +[![Aqua QA][aqua-img]][aqua-url] [![code-style][code-blue-img]][code-blue-url] logo @@ -154,3 +155,5 @@ Tested with Julia ≥ 1.10. [docs-dev-url]: https://JuliaImageRecon.github.io/ImagePhantoms.jl/dev [license-img]: https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat [license-url]: LICENSE +[aqua-img]: https://img.shields.io/badge/Aqua.jl-%F0%9F%8C%A2-aqua.svg +[aqua-url]: https://github.com/JuliaTesting/Aqua.jl diff --git a/docs/Project.toml b/docs/Project.toml index 543b2b4..c9917bf 100644 --- a/docs/Project.toml +++ b/docs/Project.toml @@ -11,4 +11,4 @@ Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d" [compat] -ImageGeoms = "0.10" +ImageGeoms = "0.11" diff --git a/src/object.jl b/src/object.jl index bdbcfcc..46f4d59 100644 --- a/src/object.jl +++ b/src/object.jl @@ -116,13 +116,13 @@ function Object( shape::AbstractShape{D}, _center::NTuple{D,RealU} = _tuple(0, D), _width::NTuple{D,RealU} = _tuple(1, D), - _angle::Union{RealU, NTuple{Da,RealU}} = _tuple(0, D == 2 ? 1 : 3), + _angle::Union{RealU, NTuple{Da,RealU}} where {Da} = _tuple(0, D == 2 ? 1 : 3), _value::Number = 1f0 ; center::NTuple{D,RealU} = _center, width::NTuple{D,RealU} = _width, - angle::Union{RealU, NTuple{Da,RealU}} = _angle, + angle::Union{RealU, NTuple{Da,RealU}} where {Da} = _angle, value::Number = _value, -) where {D,Da} +) where {D} Object{typeof(shape)}(center, width, angle, value) end diff --git a/test/Project.toml b/test/Project.toml index 56efc6c..7fb60a4 100644 --- a/test/Project.toml +++ b/test/Project.toml @@ -1,4 +1,5 @@ [deps] +Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595" FFTW = "7a1cc6ca-52ef-59f5-83cd-3a7055c09341" ImageGeoms = "9ee76f2b-840d-4475-b6d6-e485c9297852" LazyGrids = "7031d0ef-c40d-4431-b2f8-61a8d2f650db" @@ -8,4 +9,4 @@ Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d" [compat] -ImageGeoms = "0.10" +ImageGeoms = "0.11" diff --git a/test/aqua.jl b/test/aqua.jl new file mode 100644 index 0000000..48414d8 --- /dev/null +++ b/test/aqua.jl @@ -0,0 +1,7 @@ +using ImagePhantoms: ImagePhantoms +import Aqua +using Test: @testset + +@testset "aqua" begin + Aqua.test_all(ImagePhantoms) +end diff --git a/test/runtests.jl b/test/runtests.jl index fb4e14d..f97ffc4 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,7 +1,9 @@ # runtests.jl using Test: @test, @testset, detect_ambiguities -using ImagePhantoms +using ImagePhantoms: ImagePhantoms + +include("aqua.jl") include("helper.jl")