-
Notifications
You must be signed in to change notification settings - Fork 143
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Adds deprecation warnings and exports ImageContrastAdjustment #865
Conversation
Addresses part of #841 |
Are we OK to bump the minimum requirement for Julia for the |
I personally think that if JuliaPro has reached a version number for a while it's probably safe to set it as the minimum version number. They seem to be pretty proactive about making sure packages work with each new JuliaPro release. |
Unless there's another LTS version, dropping 1.0 compatibility is really risking |
I guess we should probably consider which "Risk Tolerance Persona" we should cater to. |
Yeah, I'm a bit uncomfortable about not continuing to support Julia 1.0. How bad would it be to just write out the default-filling constructors manually? Otherwise, this is really nice to see! |
I've tagged a new version of ImageContrastAdjustment which now supports Julia 1.0. Hence, I am going to close and re-open this pull-request to trigger a new build. |
eae744d
to
d2d2c5b
Compare
@timholy I'll wait for you to approve this before I merge. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Main issue is I think your depwarns don't actually work. If you tested them and I'm wrong about that, please let me know.
fe98ffa
to
6f186dc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good! Just a couple of changes below.
Eventually, we'll just delete test/exposure.jl
, right? If yes, maybe add a comment at the top of the file saying it can be removed when src/deprecations.jl
is deleted. If no, we might want to separate out the stuff we'll keep and move the stuff we'll delete into test/deprecations.jl
.
The change made in 0.3.2 still triggers a warning message. See: JuliaImages/Images.jl#865 (comment)
Also removes code in exposure.jl which is now found in the ImageContrastAdjustment.jl package.
6f186dc
to
8bc2791
Compare
|
It's the Spring festival here in China so I didn't follow the whole discussion here with my limited time. Looks like there're still some breaking changes, so a minor version bump is required, i.e., |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's give anyone else who wants to review another day to check it, and then merge.
Thanks for merging, I've been swamped! We should get this out as 0.21, will try to get to it over the weekend. |
And it's out! Thanks again @zygmuntszpak, great contribution! |
The suggested fix in the dep warning for julia> using Images
julia> img = Gray{N0f8}.(rand(10, 10));
julia> imadjustintensity(img);
┌ Warning: `imadjustintensity` will be removed in a future release, please use `adjust_histogram(img, LinearStretching())` instead.
│ caller = top-level scope at REPL[10]:1
└ @ Core REPL[10]:1
julia> adjust_histogram(img, LinearStretching())
ERROR: MethodError: no method matching adjust_histogram(::Array{Gray{Normed{UInt8,8}},2}, ::LinearStretching{Float64,Float64})
Stacktrace:
[1] top-level scope at REPL[11]:1 |
It looks like the reason for this is that I forgot to add import ImageContrastAdjustment: adjust_histogram, adjust_histogram! to ensure that the new definitions of I'm putting together a quick fix, and will add some test to make sure that the advertised API is actually callable. Sorry for the oversight, and thanks for reporting the issue. |
Another thing we should have done is fill in the parameters for the actual usage; anyone who copy/pastes the suggested deprecation would be throwing away whatever custom parameters they're supplying for the call. A prototype of a better deprecation might have been @deprecate clahe(img, nbins=100) adjust_histogram(img, AdaptiveEqualization(; nbins)) and then the user will see a copy/pastable suggestion. |
Also removes code in exposure.jl which is now found in the ImageContrastAdjustment.jl package.