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

more fixes for v0.7/v1.0 #29

Merged
merged 2 commits into from
Aug 19, 2018
Merged

more fixes for v0.7/v1.0 #29

merged 2 commits into from
Aug 19, 2018

Conversation

RalphAS
Copy link
Contributor

@RalphAS RalphAS commented Aug 18, 2018

This change attempts to make the adjoint method lazy,
resolves a method ambiguity, restores the reinterpretc tests,
and drops a couple of obsolete things in favor of v1.0

Note: for background on reinterpret, see discussion in ImageCore PR

This change attempts to make the adjoint method lazy,
resolves a method ambiguity, restores the reinterpretc tests,
and drops a couple of obsolete things in favor of v1.0
@codecov
Copy link

codecov bot commented Aug 18, 2018

Codecov Report

❗ No coverage uploaded for pull request base (master@1408f44). Click here to learn what that means.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##             master    #29   +/-   ##
=======================================
  Coverage          ?   100%           
=======================================
  Files             ?      2           
  Lines             ?    124           
  Branches          ?      0           
=======================================
  Hits              ?    124           
  Misses            ?      0           
  Partials          ?      0
Impacted Files Coverage Δ
src/ImageMetadata.jl 100% <100%> (ø)

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 1408f44...a476d0e. Read the comment docs.

@RalphAS
Copy link
Contributor Author

RalphAS commented Aug 18, 2018

I suspect the tests for adjoints are not really adequate, but am not sure what is wanted.

@RalphAS RalphAS requested a review from timholy August 18, 2018 21:18
@Evizero
Copy link
Member

Evizero commented Aug 19, 2018

Is iterate not covered by tests? I would expect to see a depwarn on the current master about the iteration interface (which I don't).

Base.reinterpret(::Type{T}, img::ImageMetaArray) where {T} = shareproperties(img, reinterpret(T, img.data))
Base.reinterpret(::Type{T}, img::ImageMeta) where {T} = error("reinterpret method not defined for $(typeof(img)). Consider a MappedArray instead.")
function ImageCore.reinterpret(::Type{T}, img::ImageMeta{T2,N,A}) where {T,T2,N,A}
(A <: Array) || error("reinterpret method not defined for $(typeof(img)). Consider a MappedArray instead.")
Copy link
Member

Choose a reason for hiding this comment

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

I think the new reinterpret doesn't have this limitation anymore (?)
That said, I don't know this. This will need someone like Prof Holy to review (which I saw you already pinged, so I won't ping again)

Copy link
Member

Choose a reason for hiding this comment

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

Correct, it's not a limitation anymore.

Base.reinterpret(::Type{T}, img::ImageMetaArray) where {T} = shareproperties(img, reinterpret(T, img.data))
Base.reinterpret(::Type{T}, img::ImageMeta) where {T} = error("reinterpret method not defined for $(typeof(img)). Consider a MappedArray instead.")
function ImageCore.reinterpret(::Type{T}, img::ImageMeta{T2,N,A}) where {T,T2,N,A}
(A <: Array) || error("reinterpret method not defined for $(typeof(img)). Consider a MappedArray instead.")
Copy link
Member

Choose a reason for hiding this comment

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

Correct, it's not a limitation anymore.

@@ -184,8 +175,11 @@ end
Base.show(io::IO, img::ImageMeta) = showim(io, img)
Base.show(io::IO, ::MIME"text/plain", img::ImageMeta) = showim(io, img)

Base.reinterpret(::Type{T}, img::ImageMetaArray) where {T} = shareproperties(img, reinterpret(T, img.data))
Base.reinterpret(::Type{T}, img::ImageMeta) where {T} = error("reinterpret method not defined for $(typeof(img)). Consider a MappedArray instead.")
function ImageCore.reinterpret(::Type{T}, img::ImageMeta{T2,N,A}) where {T,T2,N,A}
Copy link
Member

Choose a reason for hiding this comment

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

reinterpret really belongs to Base, not ImageCore. (reinterpretc belongs to ImageCore)

@RalphAS
Copy link
Contributor Author

RalphAS commented Aug 19, 2018

@Evizero @timholy
I think I have a better handle on reinterpret; can you verify that the updates in a476d0e are ok and merge if appropriate?

Is anything more needed for a new release?

@Evizero Evizero merged commit bd11dfb into JuliaImages:master Aug 19, 2018
@Evizero
Copy link
Member

Evizero commented Aug 19, 2018

Thanks!

@RalphAS RalphAS deleted the ras/update1.0 branch August 19, 2018 18:34
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