JuliaArrays / IndirectArrays.jl

Julia implementation of indexed or "lookup" arrays
Other
19 stars 7 forks source link

Support `values::AbstractDict` #25

Closed timholy closed 3 years ago

timholy commented 3 years ago

This adds support for looking up values in an AbstractDict, not just an AbstractVector. The main intended consumer is ImageSegmentation, which does not necessarily use adjacent values for its segment labels: https://github.com/JuliaImages/ImageSegmentation.jl/blob/55c1310dbf6158d6fe1ec9fd765213ac5377bfbb/src/core.jl#L13-L14

I've bumped this to 0.5.2, but what about just going to 1.0? Even this change is non-breaking, and I'm having a hard time picturing major ways we might break this package in the future.

codecov[bot] commented 3 years ago

Codecov Report

Merging #25 (8ee63e7) into master (3a821ba) will not change coverage. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master       #25   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            1         1           
  Lines           48        56    +8     
=========================================
+ Hits            48        56    +8     
Impacted Files Coverage Δ
src/IndirectArrays.jl 100.00% <100.00%> (ø)

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 3a821ba...8ee63e7. Read the comment docs.

johnnychen94 commented 3 years ago

BTW, do you think it's the scope of this package to also handle "(lazy) big thunks" of indices https://github.com/JuliaImages/ImageCore.jl/issues/170#issuecomment-896881643?

timholy commented 3 years ago

You mean specifically the chroma-subsampling? I've not put enough thought into it to say for certain, but it seems a bit different (it's a manipulation of the pixel index rather than the pixel value).

timholy commented 3 years ago

OK, I switched this to 1.0 and took advantage of the opportunity to drop Julia 0.7. I assume we want to keep 1.0?

I'll leave this open for a couple of days, since I know that percolating [compat] is annoying to everyone and we should give a chance for downstream users to comment. RegistryCompatTools flags a couple of packages (but not many): CC @Mattriks (Gadfly), @RobBlackwell (EchogramImages), @lorenzoh (FastAI), @brenhinkeller (StatGeochemBase).

brenhinkeller commented 3 years ago

Sounds cool to me!

timholy commented 3 years ago

I should have also CCed @tlnagy, but I have already tested TiffImages locally and I know it passes without issue (after bumping the [compat]).