Skip to content

Minimum spanning tree plugin#138

Closed
carlschroedl wants to merge 32 commits intogephi:master-forgefrom
carlschroedl:minimum-spanning-tree-plugin
Closed

Minimum spanning tree plugin#138
carlschroedl wants to merge 32 commits intogephi:master-forgefrom
carlschroedl:minimum-spanning-tree-plugin

Conversation

@carlschroedl
Copy link
Copy Markdown

Hello Gephi team! Thanks for the excellent instructions on how to contribute plugins in version 0.9. This pull request upgrades my 0.8-compatible plugin (formerly called SpanningTree) to be compatible with 0.9. Please let me know what you think!

attempting to load test graphs to verify.
already uses integers. Might change both test data and implementation
back to boolean in the future.
'com.carlschroedl.gephi.plugin.minimumspanningtree'
@carlschroedl
Copy link
Copy Markdown
Author

It looks like the only conflict is in the enumeration of plugins in the pom:

    <!-- List of modules -->
    <modules>
        <!-- Add here the paths of all modules (e.g. <module>modules/MyModule</module>) -->
<<<<<<< HEAD
        <module>modules/MinimumSpanningTree</module>
=======
        <module>modules/GeoLayout</module>
        <module>modules/LinkfluencePlugin</module>
        <module>modules/KBraceFilter</module>
        <module>modules/Multimode-Networks</module>
        <module>modules/JsonExporter</module>
        <module>modules/SigmaExporter</module>
        <module>modules/NodeColorManager</module>
        <module>modules/GraphvizLayout</module>
        <module>modules/GraphStreaming</module>
        <module>modules/DesktopStreaming</module>
        <module>modules/StreamingAPI</module>
        <module>modules/StreamingImpl</module>
        <module>modules/JettyWrapper</module>
        <module>modules/StreamingServer</module>
        <module>modules/CircularLayout</module>
        <module>modules/SemanticWebImport</module>
        <module>modules/loxawebsiteexport</module>
        <module>modules/Export-To-Earth</module>
        <module>modules/MapOfCountries</module>
        <module>modules/ScriptingPlugin</module>
        <module>modules/TwitterStreamingImporter</module>
        <module>modules/IsometricLayout</module>
        <module>modules/NetworkSplitter3D</module>
        <module>modules/ExcelCsvImporter</module>
        <module>modules/OracleDriver</module>
        <module>modules/EventGraphLayout</module>
        <module>modules/Lineage</module>
        <module>modules/MdsLayout</module>
        <module>modules/filterfromfile</module>
        <module>modules/GiveColorToNodes</module>
        <module>modules/GiveColorToEdges</module>
        <module>modules/GravityPlugin</module>
        <module>modules/MdsMetric</module>
        <module>modules/VectorCalculator</module>
        <module>modules/PrestigePlugin</module>
>>>>>>> fb3eb2af7db865b64ad3fc02cc0405e708fdd2c6
    </modules>

Is it better for me to resolve this, or for you?

* number of edges and nodes.
* All other node and edge attributes are ignored in this comparison.
*/
public class GraphTopologyEquals {
Copy link
Copy Markdown
Author

@carlschroedl carlschroedl Dec 18, 2016

Choose a reason for hiding this comment

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

I created this because I wanted my plugin's tests to assert that the result of running the algorithm was the same as a manually-verified graph loaded from file. Since I'm new to Gephi, I'm wondering if this is necessary. Are there any alternatives built in to Gephi for determining if graphs have equal topologies?

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.

I don't think there are builtin methods for this, but this is a small class. Great that you have tests!

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Ok. Cool. Thanks for confirming that I'm not duplicating existing Gephi functionality.

@@ -0,0 +1,12 @@
#!/bin/bash
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

This script is a workaround so that I can view code coverage in NetBeans while developing this plugin. I'm not sure it needs to be included. What do you think?

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.

This file is not necessary but I can omit it in the merge, no problem.

Copy link
Copy Markdown
Author

@carlschroedl carlschroedl Dec 19, 2016

Choose a reason for hiding this comment

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

Ok. That works. If it's easier for you, I have no problems with (A): git rm-ing the file on my end, or, if you prefer, I can (B): altogether eliminate the file from the history of this branch and force push to update the pull request. Of course, I don't want to rewrite history if you or another Gephi team member have already pulled this branch down somewhere and started tinkering with it :) Please let me know if I should do either (A) or (B) otherwise I will assume you will exclude it from the merge.


<groupId>com.carlschroedl.gephi</groupId>
<artifactId>spanning-tree-plugin</artifactId>
<version>1.0.0</version>
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Is it ok that this is a release version instead of a SNAPSHOT?

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.

No problem, your plugin can declare any version number you want. Just future updates will need to increase it.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Sounds good!

<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
<version>2.6</version>
Copy link
Copy Markdown
Author

@carlschroedl carlschroedl Dec 18, 2016

Choose a reason for hiding this comment

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

Unfortunately, when triggering code coverage collection in the NetBeans UI, it disgregards the version of the coverage plugin that is specified in the pom. Instead, NetBeans uses the most recent stable release of the plugin. In this case, there are integration problems between NetBeans 8.2 and the most recent stable release of the cobertura-maven-plugin (2.7). By running the cover.sh script I included above, a user can at least view their code lines painted in red, yellow, or green depending on test coverage. While you can't trigger the collection of code coverage data via the NetBeans UI, you can still view the results in NetBeans.

+ "<br/> The minimum spanning tree can be visualized by creating a Filter on the Attribute \"" + ST_COL_NAME + "\" with value = \"1\"";
}

// <editor-fold defaultstate="collapsed" desc="Inner Helper Classes">
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

When I was a student I made the unfortunate decision to write many of the following classes as inner classes. I hope to convert these into standalone public classes in a subsequent refactor (carlschroedl#4).

* workspace or project after loading.
* @param file The file containing a graph
* @return the GraphModel
*/
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I wrote this method so that I could concisely and reliably load graphs from file into memory for comparison during my plugin's tests. Is there functionality built-in Gephi to accomplish something like this?

@eduramiba
Copy link
Copy Markdown
Member

Thanks for the pull request! I will review it as soon as possible.
Don't worry about that conflict, it always needs to be resolved manually.

@carlschroedl
Copy link
Copy Markdown
Author

Thanks for volunteering to resolve the conflict!

@carlschroedl
Copy link
Copy Markdown
Author

carlschroedl commented Dec 19, 2016

Apologies, this pull request includes several test resources that are not used. The only ones used are:

  • wiki_kruskal_example_initial.graphml
  • wiki_kruskal_example_mst.graphml

The following are not used:

  • wiki_kruskal_example.gephi
  • wiki_kruskal_example_initial.csv
  • wiki_kruskal_example_initial.gdf
  • wiki_kruskal_example_initial.gexf
  • wiki_kruskal_example_initial.svg
  • wiki_kruskal_example_mst.csv
  • wiki_kruskal_example_mst.gdf
  • wiki_kruskal_example_mst.gml
  • wiki_kruskal_example_mst.svg
  • wiki_kruskal_example_with_mst.gephi

I believe it is prudent to delete the unused test resources. Just like I mentioned above, I can do that by either (A): simply git rm-ing the file on my end, or, if you prefer, I can (B): altogether eliminate the file from the history of this branch and force push to update the pull request. Which do you prefer?

@carlschroedl
Copy link
Copy Markdown
Author

I should mention that I've rewritten history many times in the past with native git as well as with BFG Repo-Cleaner, so there's no need to worry about me accidentally destroying the good parts of the history while eliminating the bad parts. In other words, don't be afraid that I will screw up option (B) and delete the plugin :)

@eduramiba
Copy link
Copy Markdown
Member

Hi,
I don't mind if you rewrite history, I have not cloned it yet.

Actually, remove unnecessary files if you can please. If the files are just small examples or similar we can merge them.

By the way, it's possible to include demo screenshots for your plugin that will appear in the new plugins site. Just drop them in src/img folder like https://github.com/gephi/gephi-plugins/tree/geolayout-plugin/modules/GeoLayout/src/img

@carlschroedl
Copy link
Copy Markdown
Author

Thanks! I will rewrite history to remove the unnecessary files. I didn't know about the src/img feature. I will add a couple images.

@carlschroedl
Copy link
Copy Markdown
Author

The earliest I can resume work on this pull request is January 5th.

@carlschroedl carlschroedl force-pushed the minimum-spanning-tree-plugin branch from 073b440 to d6ac100 Compare January 18, 2017 03:11
@carlschroedl
Copy link
Copy Markdown
Author

Closing this in case there are stale refs. Have opened #140 for the cleaned history.

kant added a commit to kant/gephi-plugins that referenced this pull request Oct 28, 2018
eduramiba added a commit that referenced this pull request Oct 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants