rafaqz / DimensionalData.jl

Named dimensions and indexing for julia arrays and other data
https://rafaqz.github.io/DimensionalData.jl/stable/
MIT License
271 stars 38 forks source link

fix cat for vectors with AnonDim #502

Closed rafaqz closed 1 year ago

rafaqz commented 1 year ago

hcat and vcat were not tested with DimVector and were not actually working. This PR fixes that. It also standardises the output of cat on missing dimensions to use AnonDim so we always return a DimArray.

We also now rigorously check that the shared dimensions actually match all values as well as dimension type, and that span types are not mixed or broken (closes #433)

@sethaxen you may want a look at this, I think this was partly your code

Note: also fixed problems in docs in primatives as I used the keywords here

codecov-commenter commented 1 year ago

Codecov Report

Merging #502 (3a985c0) into main (eb222fb) will decrease coverage by 0.38%. The diff coverage is 97.61%.

:exclamation: Current head 3a985c0 differs from pull request most recent head 2e9c13a. Consider uploading reports for the commit 2e9c13a to get more accurate results

@@            Coverage Diff             @@
##             main     #502      +/-   ##
==========================================
- Coverage   89.38%   89.01%   -0.38%     
==========================================
  Files          39       39              
  Lines        2846     2868      +22     
==========================================
+ Hits         2544     2553       +9     
- Misses        302      315      +13     
Files Changed Coverage Δ
src/array/methods.jl 94.80% <97.36%> (+0.04%) :arrow_up:
src/Dimensions/primitives.jl 93.88% <100.00%> (+0.46%) :arrow_up:
src/array/show.jl 82.35% <100.00%> (-12.75%) :arrow_down:

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

sethaxen commented 1 year ago

I'll take a look at this later today.

rafaqz commented 1 year ago

The show related changes are because we were catting together DimArrays in fragile ways that break now that cat has more checks.

I'll ckean up the coverage thanks for catching that.