Skip to content

Commit

Permalink
Version 0.12.8 (#472)
Browse files Browse the repository at this point in the history
This adds the support for ColorTypes v0.11.
This also modifies the CI settings and removes `@assert`s from the precompilation script.
  • Loading branch information
kimikage committed Apr 27, 2021
1 parent a4886a0 commit 65c4e5a
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 13 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/UnitTest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@ jobs:
matrix:
julia-version: ['1.0', '1', 'nightly']
os: [ubuntu-latest, windows-latest, macOS-latest]
fail-fast: false

steps:
- uses: actions/checkout@v1.0.0
- uses: actions/checkout@v2
- name: "Set up Julia"
uses: julia-actions/setup-julia@v1
with:
Expand All @@ -30,7 +31,7 @@ jobs:
env:
cache-name: cache-artifacts
with:
path: ~/.julia/artifacts
path: ~/.julia/artifacts
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
restore-keys: |
${{ runner.os }}-test-${{ env.cache-name }}-
Expand Down
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
name = "Colors"
uuid = "5ae59095-9a9b-59fe-a467-6f913c188581"
version = "0.12.7"
version = "0.12.8"

[deps]
ColorTypes = "3da002f7-5984-5a60-b8a6-cbb66c0b333f"
FixedPointNumbers = "53c48c17-4a7d-5ca2-90c5-79b7896eea93"
Reexport = "189a3867-3050-52da-a836-e630ba90ab69"

[compat]
ColorTypes = "0.10"
ColorTypes = "0.10, 0.11"
FixedPointNumbers = "0.6, 0.7, 0.8"
Reexport = "0.2, 1.0"
julia = "1"
Expand Down
18 changes: 9 additions & 9 deletions src/precompile.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,23 @@ function _precompile_()
# conversions
## to RGB
for T in eltypes, F in feltypes, C in (HSV,LCHab,LCHuv,Lab,Luv,XYZ)
@assert precompile(Tuple{typeof(convert),Type{RGB{T}},C{F}})
precompile(Tuple{typeof(convert),Type{RGB{T}},C{F}})
end
## to XYZ
for T in feltypes, F in feltypes, C in (HSV,LCHab,LCHuv,Lab,Luv,XYZ,RGB)
@assert precompile(Tuple{typeof(convert),Type{XYZ{T}},C{F}})
precompile(Tuple{typeof(convert),Type{XYZ{T}},C{F}})
end
for T in feltypes, F in (N0f8, N0f16)
@assert precompile(Tuple{typeof(convert),Type{XYZ{T}},RGB{F}})
precompile(Tuple{typeof(convert),Type{XYZ{T}},RGB{F}})
end
# parse
@assert precompile(Tuple{typeof(parse),Type{ColorTypes.Colorant},String})
@assert precompile(Tuple{typeof(parse),Type{RGB{N0f8}},String})
@assert precompile(Tuple{typeof(parse),Type{RGBA{N0f8}},String})
precompile(Tuple{typeof(parse),Type{ColorTypes.Colorant},String})
precompile(Tuple{typeof(parse),Type{RGB{N0f8}},String})
precompile(Tuple{typeof(parse),Type{RGBA{N0f8}},String})
# colordiff
for T in eltypes
@assert precompile(Tuple{typeof(colordiff),RGB{T},RGB{T}})
precompile(Tuple{typeof(colordiff),RGB{T},RGB{T}})
end
@assert precompile(Tuple{typeof(colormap),String})
@assert precompile(Tuple{typeof(distinguishable_colors),Int})
precompile(Tuple{typeof(colormap),String})
precompile(Tuple{typeof(distinguishable_colors),Int})
end
1 change: 1 addition & 0 deletions test/conversion.jl
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ end

# Issue #257
c = RGB{Float16}(0.9473,0.962,0.9766)
convert(HSI, c)
hsi = convert(HSI, c)
@test hsi.i > 0.96 && hsi.h 210

Expand Down

2 comments on commit 65c4e5a

@kimikage
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

convert(HSI, c)? 🙈

@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/35419

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.12.8 -m "<description of version>" 65c4e5a56e8702ae4b1389dcd02d546a21ed2f11
git push origin v0.12.8

Please sign in to comment.