meggart / DiskArrays.jl

Other
72 stars 13 forks source link

NetCDF tests fail on DiskArray main #154

Closed felixcremer closed 6 months ago

felixcremer commented 6 months ago

There is some test failure for NetCDF on main:

     Testing Running tests...
NetCDF: Error During Test at /home/fcremer/Documents/GeoZarr.jl/dev/NetCDF/test/array-like.jl:9
  Test threw exception
  Expression: v1[inds] == x1[inds]
  ArgumentError: Indices can only be omitted for trailing singleton dimensions
  Stacktrace:
    [1] _resolve_indices
      @ ~/Documents/GeoZarr.jl/dev/DiskArrays/src/diskarray.jl:98 [inlined]
    [2] _resolve_indices
      @ ~/Documents/GeoZarr.jl/dev/DiskArrays/src/diskarray.jl:84 [inlined]
    [3] resolve_indices
      @ ~/Documents/GeoZarr.jl/dev/DiskArrays/src/diskarray.jl:44 [inlined]
    [4] resolve_indices
      @ ~/Documents/GeoZarr.jl/dev/DiskArrays/src/diskarray.jl:43 [inlined]
    [5] getindex_disk_batch!(out::Nothing, a::NcVar{Float64, 3, 6}, i::Tuple{BitArray{3}})
      @ DiskArrays ~/Documents/GeoZarr.jl/dev/DiskArrays/src/diskarray.jl:178
    [6] getindex_disk!
      @ ~/Documents/GeoZarr.jl/dev/DiskArrays/src/diskarray.jl:207 [inlined]
    [7] getindex_disk
      @ ~/Documents/GeoZarr.jl/dev/DiskArrays/src/diskarray.jl:171 [inlined]
    [8] getindex(a::NcVar{Float64, 3, 6}, i::BitArray{3})
      @ DiskArrays ~/Documents/GeoZarr.jl/dev/DiskArrays/src/diskarray.jl:285
    [9] macro expansion
      @ ~/.julia/juliaup/julia-1.10.1+0.x64.linux.gnu/share/julia/stdlib/v1.10/Test/src/Test.jl:669 [inlined]
   [10] (::var"#29#30")(v1::NcVar{Float64, 3, 6})
      @ Main ~/Documents/GeoZarr.jl/dev/NetCDF/test/array-like.jl:9
meggart commented 6 months ago

I just wanted to open a PR with a fix but acidentally pushed to main. I did not know that the main branch was not protected yet, will do this now. Also when testing NetCDF, please use this branch: https://github.com/JuliaGeo/NetCDF.jl/pull/189 which I think should be the most efficient one.