Releases: moaxcp/graph-dsl
0.17.0
0.16.0
0.15.0
This release combines fixes for a few issues on github.
- #75 Vertex.name, Edge.one, and Edge.two is now @PackageScope. This only
affects code that is @CompileStatic for now due to GROOVY-3010. - #74Vertices and edges may now be deleted. A vertex cannot be deleted if
there are edges referencing it. - #73 Added EdgeWeightPlugin. This plugin adds the Weight trait to each
edge. Traversal methods are ordered by edge weight.
There were also several other changes that were not an issue on github:
Updated gradle to 3.5. Refactored gradle script to use the plugins closure when possible. gradle-gitflow does not work
with the closure because it is not in the gradle repository. This is another reason to update the plugin. Spock was also
updated to 1.1.
Added edgeTraits and vertexTraits. These methods will ensure traits are applied to current and future edges and vertices.
Added tests to provide more code coverage in jacoco.
Added more usage details to README.md
0.14.0
Just as in 0.13.0, where the config closure was removed from VertexSpec, this release removes the config closure from
EdgeSpec. Traits can be added and configured for an Edge all within the same closure.
graph.with {
edge (step1, step2) {
traits Mapping
message = "hello from edge between $one and $two"
queue = [] as LinkedList
traits Weight
weight { queue.size() }
}
}As in 0.13.0 this represents a major step in finalizing the edge api.
0.13.0
This release removes the need for the config closure when creating a vertex. It is now possible to apply traits and configure
them all within the closure passed to vertex methods.
graph.with {
vertex step1 {
traits Mapping
message = 'hello from step1'
queue = [] as LinkedList
traits Weight
weight { queue.size() }
}
}This change represents a major step in finalizing the vertex api.
0.12.0
This release introduces a new way of creating a Vertex. The new methods allow vertices to be created without using strings for names.
Vertices can now be added with the following syntax.
graph.with {
vertex step1
vertex step2(traits:Mapping)
vertex step3 {
traits Mapping
config {
label = 'step3'
}
}
vertex step4(traits:Mapping) {
config {
label = 'step4'
}
}
}This was achieve by adding propertyMissing and methodMissing to Graph which return a VertexSpec. A vertex(VertexSpec) method was
added to allow this syntax.