TensorOperations.jl icon indicating copy to clipboard operation
TensorOperations.jl copied to clipboard

add backend types

Open Jutho opened this issue 1 year ago • 4 comments

Jutho avatar Jun 30 '24 23:06 Jutho

Maybe an additional note on the test structure as well, I find it convenient when the @testset calls that encapsulate an entire file are moved to the parent file. This ensures that nothing in the file escapes that scope (maybe we should consider using the safetestsets as well), and when you want to run individual tests (mostly in VSCode), the usual shortcuts for running code don't end up running the entire file, instead of single testsets

lkdvos avatar Jul 01 '24 11:07 lkdvos

The reason I changed it back is because I cannot have the

@testset ... for b in backendlist
  include("some_file_which_wants_to_use_b.jl")
end

pattern.

Jutho avatar Jul 01 '24 11:07 Jutho

Aha, I see. I encountered this one myself as well, and came up with something like this: https://github.com/quantumghent/TensorKit.jl/blob/332c70c3a88c0fd62d6ea2fbe34a0743f50bf854/TensorKitSectors/test/testsetup.jl#L48-L53

See also this discussion.

I guess it's a good reason to not do it, and I can definitely work around it so it's not too important

lkdvos avatar Jul 01 '24 11:07 lkdvos

Would it be useful to have that @include definition in TestExtras.jl? In order not to have to copy paste it everywhere?

Jutho avatar Jul 01 '24 12:07 Jutho