Missing tests #139
Labels
ci/cd
Continuous Integration / Continuous Deployment
good first issue
Good for newcomers
help wanted
Extra attention is needed
Milestone
As discussed in today's meeting, lately we've been writing code without writing proper tests. It's about time that we start writing tests for the new parts, and also write better and more tests.
One way to check which parts of the codebase are missing tests is using codecov.io. Every time we run the CI tests, a report with coverage information is uploaded to that service.
I've divided the tests in 3 types:
Tenet
interacts with external packages for whom we haven't written any compatibility wrapper (so no explicit code). These test that our code composes well with other packages.The following list might not be complete, particularly for the integration tests, but it's a good start. Also, we might need a new CI backend in order to run the integration tests, as GitHub CI might not give us access to a GPU or multiple nodes. In that case, we might need a VM for running these tests on MN5 or just skip these test on GitHub CI unless a env var is set.
Unit tests
Tensor
Base.similar
Base.zero
Base.isapprox
is missing a test for::Tensor, ::AbstractArray
Base.IteratorSize
Base.IteratorEltype
Base.getindex
Base.setindex!
Base.firstindex
Base.StridedArrays
interface is missing test, specifically...Base.strides
Base.unsafe_convert
Base.elsize
Base.eltype
TensorNetwork
Add unit test forTensorNetwork
module #152 @TodorbscBase.similar
Base.zero
Base.isapprox
arrays
Base.eltype
neighbors
Base.merge!
with more than 2TensorNetwork
sBase.replace!
/Base.replace
is missing some testsBase.in
Base.selectdim
Base.rand
withglobalind=true
#168Base.conj!
contract
/contract!
is missing testsLinearAlgebra.svd!
LinearAlgebra.qr!
LinearAlgebra.lu!
ContractSimplification
minimize=:rank
recursive=false
Quantum
Base.isapprox
Chain
Dense
Product
overlap(::Product, ::Product)
Grid
Extension tests
ChainRules
getindex(::TensorNetwork)
contract(::Tensor, ::Tensor)
withComplex
tensorsTensorNetworkTangent
Base.zero
Base.:(*)
: Test scalar multiplicationBase.:(+)
: Test primal-gradient additionBase.IteratorSize
Base.length
Base.IteratorEltype
Base.eltype
Base.iterate
Base.conj
Tangent{Tensor}
toTensor
:(::ProjectTo{T})(::Tangent{T}) where {T<:Tensor}
Tensor
is its ownTangent
in principleTensor
:(::ProjectTo{Tensor{T,0}})(::T) where {T}
ChainRules.OneElement
toTensor
Adapt
Adapt.adapt_structure(, ::Tensor)
Adapt.adapt_structure(, ::TensorNetwork)
Yao.Circuit
toQuantum
conversionIntegration tests
contract(::Tensor, ::Tensor)
contract
derivation withZygote
contract
derivation withEnzyme
System tests
To be defined...
The text was updated successfully, but these errors were encountered: