Skip to content

Conversation

@KristianKarl
Copy link
Contributor

@KristianKarl KristianKarl commented Nov 18, 2019

This is a proposal to fix the issue discussed in New path generator to be recognized when defining the generator

I am implementing two new graph traversal algorithm so new path generators. I am wondering where can I set these new path generators to be recognized in the GraphWalker.
For example in the model.json file when I change the generator name to the new path generator I am implementing. -> "generator":"mynewgenerator(edge_coverage(100))"
Or
In the studio when we set the Generator field under execution tab like mynewgenerator(edge_coverage(100)) where in both cases "mynewgenerator" is my new path generator I want to be applied.

This PR would be able to scan for generators in the classpath and use them. Studio or CLI would the be run like:

java -cp graphwalker-cli-4.1.0-SNAPSHOT.jar:myLib.jar org.graphwalker.cli.CLI offline -g SimpleModel.json

Where myLib.jar contains a new [class] generator PluginGenerator, and the model SimpleModel.json has the generator defined as:

"generator": "pluginGenerator(edge_coverage(100))",

@codecov-io
Copy link

codecov-io commented Nov 18, 2019

Codecov Report

Merging #216 into master will decrease coverage by 0.09%.
The diff coverage is 75%.

@@             Coverage Diff             @@
##             master     #216     +/-   ##
===========================================
- Coverage     76.07%   75.97%   -0.1%     
- Complexity     1187     1195      +8     
===========================================
  Files           127      129      +2     
  Lines          4368     4400     +32     
  Branches        656      660      +4     
===========================================
+ Hits           3323     3343     +20     
- Misses          814      822      +8     
- Partials        231      235      +4

@KristianKarl
Copy link
Contributor Author

@nilols Good to go?

@KristianKarl KristianKarl merged commit 90a7c39 into GraphWalker:master Nov 28, 2019
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.

3 participants