JuliaArrays / ArrayInterface.jl

Designs for new Base array interface primitives, used widely through scientific machine learning (SciML) and other organizations
https://docs.sciml.ai/ArrayInterface/stable/
MIT License
134 stars 37 forks source link

Remove range types #366

Closed Tokazama closed 1 year ago

Tokazama commented 1 year ago

This was type piracy after the move of StaticInt to Static.jl. Pending https://github.com/SciML/Static.jl/pull/88, this PR should solve that issue without any breaking changes for packages depending on ArrayInterface.jl.

codecov[bot] commented 1 year ago

Codecov Report

Merging #366 (5d41ce5) into master (87e65bc) will increase coverage by 89.95%. The diff coverage is 94.23%.

@@             Coverage Diff             @@
##           master     #366       +/-   ##
===========================================
+ Coverage    0.00%   89.95%   +89.95%     
===========================================
  Files           9        9               
  Lines        1335     1155      -180     
===========================================
+ Hits            0     1039     +1039     
+ Misses       1335      116     -1219     
Impacted Files Coverage Δ
src/ArrayInterface.jl 85.71% <50.00%> (+85.71%) :arrow_up:
src/size.jl 91.52% <90.90%> (+91.52%) :arrow_up:
src/indexing.jl 83.61% <95.65%> (+83.61%) :arrow_up:
src/array_index.jl 100.00% <100.00%> (+100.00%) :arrow_up:
src/axes.jl 92.14% <100.00%> (+92.14%) :arrow_up:
src/dimensions.jl 93.87% <100.00%> (+93.87%) :arrow_up:
src/ranges.jl 95.83% <100.00%> (+95.83%) :arrow_up:
src/stridelayout.jl 89.89% <100.00%> (+89.89%) :arrow_up:
... and 7 more

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

Tokazama commented 1 year ago

@chriselrod , I think the only issue you might run into with this one is that _pick_range is gone, so I put a deprecation in for that so it would be mildly annoying instead of breaking.

chriselrod commented 1 year ago

@chriselrod , I think the only issue you might run into with this one is that _pick_range is gone, so I put a deprecation in for that so it would be mildly annoying instead of breaking.

StrideArrays.jl uses it, but none of the other repos that I saw. It also depends on Static.jl, so the same PR bumping that can remove the use of ArrayInterface._pick_range.

Tokazama commented 1 year ago

@chriselrod , I think the only issue you might run into with this one is that _pick_range is gone, so I put a deprecation in for that so it would be mildly annoying instead of breaking.

StrideArrays.jl uses it, but none of the other repos that I saw. It also depends on Static.jl, so the same PR bumping that can remove the use of ArrayInterface._pick_range.

Got it. I'll remove the deprecation, push this through, and then take a look at StrideArrays.jl