Skip to content

Switch from graphml to gml#1369

Merged
stevenengler merged 8 commits intoshadow:devfrom
stevenengler:gml
May 19, 2021
Merged

Switch from graphml to gml#1369
stevenengler merged 8 commits intoshadow:devfrom
stevenengler:gml

Conversation

@stevenengler
Copy link
Copy Markdown
Contributor

This changes igraph to read gml rather than graphml, the conversion scripts to write gml, and the test cases to use gml topologies. The conversion script now requires networkx version >= 2.5, so the config-convert test has been moved out of the required tests.

Part of #778.

Since igraph does not support graph attributes, the prefers_direct_path attribute is currently ignored. We plan to remove this attribute and replace it with a shadow configuration option use_shortest_path.

@codecov
Copy link
Copy Markdown

codecov bot commented May 19, 2021

Codecov Report

Merging #1369 (8d643bb) into dev (2aa6332) will decrease coverage by 0.12%.
The diff coverage is 38.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##              dev    #1369      +/-   ##
==========================================
- Coverage   54.26%   54.13%   -0.13%     
==========================================
  Files         138      138              
  Lines       20618    20636      +18     
  Branches     5189     5199      +10     
==========================================
- Hits        11188    11171      -17     
- Misses       6519     6553      +34     
- Partials     2911     2912       +1     
Flag Coverage Δ
tests 54.13% <38.33%> (-0.13%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/main/routing/topology.c 44.05% <37.28%> (-1.88%) ⬇️
src/main/core/controller.c 77.09% <100.00%> (ø)
src/test/futex/test_futex.c 67.09% <0.00%> (-1.94%) ⬇️
src/main/host/thread_ptrace.c 49.33% <0.00%> (-0.17%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2aa6332...8d643bb. Read the comment docs.

@stevenengler stevenengler requested a review from robgjansen May 19, 2021 16:41
@stevenengler stevenengler self-assigned this May 19, 2021
@stevenengler stevenengler added Component: Main Composing the core Shadow executable Component: Tools Peripheral tools like parsing log files or visualizing results Type: Enhancement New functionality or improved design labels May 19, 2021
Copy link
Copy Markdown
Member

@robgjansen robgjansen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Minor issues only :)

FLAGS+=("-C" "$CONFIG")

# Exclude tor tests as we test them in a different workflow
FLAGS+=("-LE" "tor")
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Optional nit: prefer writing the long version of the flags if they exist (I don't remember what L and E mean).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@@ -353,7 +359,7 @@ static gboolean _topology_loadGraph(Topology* top, const gchar* graphPath) {

_topology_lockGraph(top);
info("reading graphml topology graph at '%s'...", graphPath);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove the "graphml" from the info log. (And maybe search to check if other log messages or comments refer to graphml).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated these and also the temporary filename for the graph in controller.c.

</graphml>
gml: |
graph [
prefer_direct_paths 1
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this need directed 0 like shown in the other GML graphs?

Copy link
Copy Markdown
Contributor Author

@stevenengler stevenengler May 19, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The default for gml is undirected, so if the graph is undirected, networkx doesn't include the directed key. I'll update the xml to use the edgedefault="directed" attribute in this conversion test so that we can make sure networkx sets this correctly (directed 1).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you look at the other GML graphs in this commit, why do those list directed 0?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I hand-wrote those graphs and included it just to be explicit, but I can remove those if it's more clear.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahh, OK, this all makes sense now! I think you can just ignore this comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Component: Main Composing the core Shadow executable Component: Tools Peripheral tools like parsing log files or visualizing results Type: Enhancement New functionality or improved design

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants