Jutho / TensorOperations.jl

Julia package for tensor contractions and related operations
https://jutho.github.io/TensorOperations.jl/stable/
Other
438 stars 55 forks source link

add backend types #181

Closed Jutho closed 5 days ago

lkdvos commented 1 week ago

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

Jutho commented 1 week ago

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.

lkdvos commented 1 week ago

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

Jutho commented 1 week ago

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