JuliaArrays / JuliaArrays/ArrayInterface.jl
Array Interface Test Suite
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 140
- Forks
- 44
- Avg merge
- 4d 14h
- Merged PRs (30d)
- 5
Description
I've come across comments that it takes many months or years before a new array type is dependable because it takes time to catch all the corner cases and bugs. I think we should be able to get an array to be safely usable for common applications in a much shorter time. It might help if we put together a set of tests for common assumptions that an array should meet so that testing is easier. For example...
function test_array_indices(x)
lininds = eachindex(IndexLinear(), x)
carinds = CartesianIndices(axes(x))
for (li,ci) = zip(lininds,carinds)
@test x[li] == x[ci]
end
@test length(lininds) == length(carinds) == length(x) == prod(size(x))
end
We could make that example a bit more verbose and inject some logging so that it's clear where errors come from.
We could also do similar things with stride-layout stuff.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the proposed test_array_indices example and the existing array-interface test organization, if present. Define the scope of common array and stride-layout assumptions, then confirm that the resulting suite reports failures clearly and covers the agreed cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- testing
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100