Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gh-1612 - ExtractWalkVertex and test added #1613

Merged
merged 8 commits into from
Jan 17, 2018

Conversation

m607123
Copy link
Contributor

@m607123 m607123 commented Jan 10, 2018

No description provided.

@codecov-io
Copy link

codecov-io commented Jan 10, 2018

Codecov Report

Merging #1613 into develop will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@              Coverage Diff              @@
##             develop    #1613      +/-   ##
=============================================
+ Coverage      66.22%   66.22%   +<.01%     
  Complexity      1841     1841              
=============================================
  Files            768      769       +1     
  Lines          24871    24877       +6     
  Branches        3228     3228              
=============================================
+ Hits           16470    16476       +6     
  Misses          7119     7119              
  Partials        1282     1282
Impacted Files Coverage Δ Complexity Δ
...er/data/graph/function/walk/ExtractWalkVertex.java 100% <100%> (ø) 0 <0> (?)
.../main/java/uk/gov/gchq/gaffer/data/graph/Walk.java 66.15% <100%> (+0.52%) 0 <0> (ø) ⬇️

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 ee374d5...05ff7ea. Read the comment docs.

import uk.gov.gchq.gaffer.data.graph.Walk;
import uk.gov.gchq.koryphe.function.KorypheFunction;

public class ExtractWalkVertex extends KorypheFunction<Walk, Object> {
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you add some Javadoc describing this function please?

if (null == walk) {
throw new IllegalArgumentException("Walk cannot be null");
}
return Iterables.get(walk.getEntities().get(0), 0).getVertex();
Copy link
Contributor

Choose a reason for hiding this comment

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

Might there be a use case where having this functionality as part of the Walk class might be useful as well? Would methods like:

walk.getStartVertex()
or
walk.getDestinationVertices()

be useful?

@@ -188,6 +188,16 @@ public boolean isPath() {
return distinct(getVerticesOrdered());
}

@JsonIgnore
public Object getSourceVertex() {
return entities.get(0).getKey();
Copy link
Contributor

@t616178 t616178 Jan 15, 2018

Choose a reason for hiding this comment

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

Could you add some unit tests for these methods please?

@t616178 t616178 merged commit bebe620 into develop Jan 17, 2018
@t616178 t616178 deleted the gh-1612-extractwalkvertexfromhop branch January 17, 2018 12:52
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.

None yet

3 participants