Skip to content

Commit

Permalink
Add CODECOV_TOKEN; add Aqua; resolve unbound; Random compat; to v0.8.1 (
Browse files Browse the repository at this point in the history
#85)

* Add CODECOV_TOKEN

* Resolve unbound type param

* Add Aqua test

* Add deps for Random; to v0.8.1

* Add Aqua badge

* Update compat

* compat
  • Loading branch information
JeffFessler authored May 19, 2024
1 parent 69a4e01 commit 6db25ec
Show file tree
Hide file tree
Showing 9 changed files with 39 additions and 10 deletions.
2 changes: 0 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,3 @@ updates:
directory: "/"
schedule:
interval: "weekly"
assignees:
- "JeffFessler"
17 changes: 17 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
5 changes: 3 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
name = "ImagePhantoms"
uuid = "71a99df6-f52c-4da1-bd2a-69d6f37f3252"
authors = ["Jeff Fessler <[email protected]> and contributors"]
version = "0.8"
version = "0.8.1"

[deps]
LazyGrids = "7031d0ef-c40d-4431-b2f8-61a8d2f650db"
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"
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]
<img src="https://github.com/JuliaImageRecon/ImagePhantoms.jl/blob/main/docs/src/assets/logo.svg" alt="logo" width="150"/>

Expand Down Expand Up @@ -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
2 changes: 1 addition & 1 deletion docs/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d"

[compat]
ImageGeoms = "0.10"
ImageGeoms = "0.11"
6 changes: 3 additions & 3 deletions src/object.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 2 additions & 1 deletion test/Project.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -8,4 +9,4 @@ Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d"

[compat]
ImageGeoms = "0.10"
ImageGeoms = "0.11"
7 changes: 7 additions & 0 deletions test/aqua.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
using ImagePhantoms: ImagePhantoms
import Aqua
using Test: @testset

@testset "aqua" begin
Aqua.test_all(ImagePhantoms)
end
4 changes: 3 additions & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# runtests.jl

using Test: @test, @testset, detect_ambiguities
using ImagePhantoms
using ImagePhantoms: ImagePhantoms

include("aqua.jl")

include("helper.jl")

Expand Down

2 comments on commit 6db25ec

@JeffFessler
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator() register

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/107150

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.8.1 -m "<description of version>" 6db25ecb44d1579ef879ff005505e178d1369926
git push origin v0.8.1

Please sign in to comment.