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 values::AbstractDict #25

Merged
merged 3 commits into from
Sep 1, 2021
Merged

Support values::AbstractDict #25

merged 3 commits into from
Sep 1, 2021

Conversation

timholy
Copy link
Member

@timholy timholy commented Aug 30, 2021

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
Copy link

codecov bot commented Aug 30, 2021

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.

Copy link
Member

@johnnychen94 johnnychen94 left a comment

Choose a reason for hiding this comment

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

Nice. 1.0 looks good to me.

@johnnychen94
Copy link
Member

johnnychen94 commented Aug 30, 2021

BTW, do you think it's the scope of this package to also handle "(lazy) big thunks" of indices JuliaImages/ImageCore.jl#170 (comment)?

@timholy
Copy link
Member Author

timholy commented Aug 30, 2021

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).

This is primarily intended for ImageSegmentation, for which the
index label is not guaranteed to be contiguous.
@timholy
Copy link
Member Author

timholy commented Aug 30, 2021

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
Copy link

Sounds cool to me!

@timholy
Copy link
Member Author

timholy commented Aug 31, 2021

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

@timholy timholy merged commit e5541f5 into master Sep 1, 2021
@timholy timholy deleted the teh/dict branch September 1, 2021 11:43
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