CarloLucibello / GraphNeuralNetworks.jl

Graph Neural Networks in Julia
https://carlolucibello.github.io/GraphNeuralNetworks.jl/dev/
MIT License
216 stars 46 forks source link

Improve show function #236

Closed aurorarossi closed 1 year ago

aurorarossi commented 1 year ago

With this PR I fix the indentation of the show function, leaving the output almost unchanged. I only added a small change to the indentation of the feature tensors since it looks cleaner this way (I can put the old indentation back if you don't agree). Example: Before

GNNGraph:
  num_nodes: 10
  num_edges: 20
  ndata:
    x = 1×10 Matrix{Float64}
  edata:
    a = 1×20 Matrix{Float64}
    b = 3×20 Matrix{Float64}
  gdata:
    u = 2×1 Matrix{Float64}

After

GNNGraph:
  num_nodes: 10
  num_edges: 20
  ndata:
        x = 1×10 Matrix{Float64}
  edata:
        a = 1×20 Matrix{Float64}
        b = 3×20 Matrix{Float64}
  gdata:
        u = 2×1 Matrix{Float64}

(in case this PR is fine, I will also align gnneterographs show function to this format)

codecov[bot] commented 1 year ago

Codecov Report

Merging #236 (104b44a) into master (b905906) will increase coverage by 1.13%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #236      +/-   ##
==========================================
+ Coverage   85.57%   86.71%   +1.13%     
==========================================
  Files          16       16              
  Lines        1588     1588              
==========================================
+ Hits         1359     1377      +18     
+ Misses        229      211      -18     
Impacted Files Coverage Δ
src/GNNGraphs/gnngraph.jl 99.18% <100.00%> (+13.82%) :arrow_up:
src/GNNGraphs/utils.jl 87.15% <0.00%> (+0.91%) :arrow_up:

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

CarloLucibello commented 1 year ago

I like it, makes the data stand out better