Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support range(start, stop; kwargs...) #337

Merged
merged 4 commits into from
Aug 19, 2019

Conversation

carstenbauer
Copy link
Contributor

From Julia 1.1 on, range(start, stop; kwargs...) is supported complementary to range(start; stop, kwargs...). This PR adds the former method for Colorants.

@codecov
Copy link

codecov bot commented Jul 17, 2019

Codecov Report

Merging #337 into master will increase coverage by 7.68%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #337      +/-   ##
==========================================
+ Coverage   62.66%   70.35%   +7.68%     
==========================================
  Files           9       10       +1     
  Lines         616      742     +126     
==========================================
+ Hits          386      522     +136     
+ Misses        230      220      -10
Impacted Files Coverage Δ
src/utilities.jl 84.21% <0%> (+0.87%) ⬆️
src/Colors.jl 100% <0%> (ø)
src/parse.jl 83.33% <0%> (+0.35%) ⬆️
src/display.jl 93.33% <0%> (+4.44%) ⬆️
src/differences.jl 28.1% <0%> (+5.34%) ⬆️
src/conversions.jl 94.6% <0%> (+5.75%) ⬆️
src/colormaps.jl 83.13% <0%> (+7.2%) ⬆️
src/algorithms.jl 47.67% <0%> (+9.1%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e08950f...dc3e730. Read the comment docs.

@codecov
Copy link

codecov bot commented Jul 17, 2019

Codecov Report

Merging #337 into master will increase coverage by 7.82%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #337      +/-   ##
==========================================
+ Coverage   62.66%   70.48%   +7.82%     
==========================================
  Files           9       10       +1     
  Lines         616      742     +126     
==========================================
+ Hits          386      523     +137     
+ Misses        230      219      -11
Impacted Files Coverage Δ
src/utilities.jl 89.47% <100%> (+6.14%) ⬆️
src/Colors.jl 100% <0%> (ø)
src/parse.jl 83.33% <0%> (+0.35%) ⬆️
src/display.jl 93.33% <0%> (+4.44%) ⬆️
src/differences.jl 28.1% <0%> (+5.34%) ⬆️
src/conversions.jl 94.6% <0%> (+5.75%) ⬆️
src/colormaps.jl 83.13% <0%> (+7.2%) ⬆️
src/algorithms.jl 47.67% <0%> (+9.1%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e08950f...2d434e8. Read the comment docs.

@carstenbauer
Copy link
Contributor Author

bump

@carstenbauer
Copy link
Contributor Author

Good to go?

@johnnychen94
Copy link
Member

johnnychen94 commented Aug 13, 2019

It looks good to me. Without this patch, it would raise some strange error message.

julia> range(Gray(0), Gray(1), length=11)
11-element LinRange{Gray{Normed{UInt8,8}}}:
Error showing value of type LinRange{Gray{Normed{UInt8,8}}}:
ERROR: MethodError: no method matching *(::Float64, ::Gray{Normed{UInt8,8}})
Closest candidates are:
  *(::Any, ::Any, ::Any, ::Any...) at operators.jl:529
  *(::Float64, ::Float64) at float.jl:399
  *(::AbstractFloat, ::Bool) at bool.jl:112
  ...

Unfortunately, @timholy is quite busy on his daily work recently; you might need to wait for a while until he finds some time to merge this.

@carstenbauer
Copy link
Contributor Author

Alright, no worries. Thanks for the info!

@cormullion cormullion merged commit 0f4c744 into JuliaGraphics:master Aug 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants