bsc-quantic / Tenet.jl

Composable Tensor Network library in Julia
https://bsc-quantic.github.io/Tenet.jl/
Apache License 2.0
17 stars 1 forks source link

Add support for tests in visualization functions #37

Closed jofrevalles closed 1 year ago

jofrevalles commented 1 year ago

From #29

Summary

With the previous CI, we could not add tests to ensure that the plotting functions (plot, plot!) worked without errors. This was because the CI used did not have a graphical interface. In this PR we fix this and we also add tests for Visualization.jl.

jofrevalles commented 1 year ago

I also want to add this to Quac.jl and OptimizedEinsum.jl.

codecov[bot] commented 1 year ago

Codecov Report

Merging #37 (cca9800) into master (eb55fb0) will increase coverage by 6.73%. The diff coverage is n/a.

@@            Coverage Diff             @@
##           master      #37      +/-   ##
==========================================
+ Coverage   61.42%   68.16%   +6.73%     
==========================================
  Files          11       12       +1     
  Lines         617      713      +96     
==========================================
+ Hits          379      486     +107     
+ Misses        238      227      -11     

see 8 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

mofeing commented 1 year ago

I also want to add this to Quac.jl and OptimizedEinsum.jl.

For OptimizedEinsum makes sense. For Quac no because it's simply SVG code.

mofeing commented 1 year ago

Modify the codecov.yml file so code coverage stops ignoring the src/Visualization.jl file.

mofeing commented 1 year ago

I like the refactor, but could you rename tn_meta, edge_labels, graph_kwargs to something less ambiguous? Also, this is more like internal code so it should not be easily accessible by users (e.g. they can access Tenet.tn_meta but seems like other thing).

I suggest adding the prefix __plot_ to them. What do you think?

jofrevalles commented 1 year ago

Okay, that makes sense! I have changed it to __plot_group_tensors, __plot_edge_labels and __plot_graph_kwargs.