Skip to content

add support for path type #53

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

Merged
merged 7 commits into from
Nov 3, 2019
Merged

add support for path type #53

merged 7 commits into from
Nov 3, 2019

Conversation

DvirDukhan
Copy link
Contributor

No description provided.

@DvirDukhan DvirDukhan requested a review from swilly22 October 28, 2019 06:46
@lgtm-com
Copy link

lgtm-com bot commented Oct 28, 2019

This pull request introduces 2 alerts when merging 529502e into 7a70219 - view on LGTM.com

new alerts:

  • 1 for Inconsistent equality and inequality
  • 1 for Inconsistent equality and hashing

def parse_path(self, cell):
nodes = self.parse_scalar(cell[0])
relationships = self.parse_scalar(cell[1])
return Path(nodes, relationships)
Copy link
Contributor

Choose a reason for hiding this comment

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

Assert both nodes and relationships types, consider performing the assertion in Path's constructor

@lgtm-com
Copy link

lgtm-com bot commented Oct 28, 2019

This pull request introduces 2 alerts when merging 24abf0a into 7a70219 - view on LGTM.com

new alerts:

  • 1 for Inconsistent equality and inequality
  • 1 for Inconsistent equality and hashing

test.py Outdated
redis_graph.add_edge(edge01)
redis_graph.add_edge(edge12)

redis_graph.commit()
Copy link
Contributor

Choose a reason for hiding this comment

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

.flush()

Comment on lines 16 to 19
@classmethod
def new_path(cls, nodes, edges):
return cls(nodes, edges)

Copy link
Contributor

Choose a reason for hiding this comment

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

Remove this function, use constructor.

@lgtm-com
Copy link

lgtm-com bot commented Oct 28, 2019

This pull request introduces 2 alerts when merging 229b3d6 into 7a70219 - view on LGTM.com

new alerts:

  • 1 for Inconsistent equality and inequality
  • 1 for Inconsistent equality and hashing

@codecov
Copy link

codecov bot commented Oct 29, 2019

Codecov Report

Merging #53 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #53   +/-   ##
=======================================
  Coverage   80.62%   80.62%           
=======================================
  Files           7        7           
  Lines         387      387           
=======================================
  Hits          312      312           
  Misses         75       75

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 7a70219...a01df09. Read the comment docs.

Copy link
Contributor

@swilly22 swilly22 left a comment

Choose a reason for hiding this comment

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

Just a single comment, nothing fancy.

def add_node(self, node):
assert(isinstance(node, self.append_type))
self.nodes.append(node)
self.append_type = Edge
Copy link
Contributor

Choose a reason for hiding this comment

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

self.append_type = type(Edge) seems more aligned with the naming.
but then assert(isinstance(node, self.append_type)) should be updated to
assert(type(node) == self.append_type)

return self

def add_edge(self, edge):
assert(isinstance(edge, self.append_type))
Copy link
Contributor

Choose a reason for hiding this comment

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

See above comment.

@lgtm-com
Copy link

lgtm-com bot commented Oct 31, 2019

This pull request introduces 2 alerts when merging 7db8259 into 7a70219 - view on LGTM.com

new alerts:

  • 1 for Inconsistent equality and inequality
  • 1 for Inconsistent equality and hashing

README.md Outdated
Comment on lines 58 to 59
# See path.py for more path API.
print(path.edge_count(), path.nodes_count())
Copy link
Contributor

Choose a reason for hiding this comment

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

The example should print the path, don't refer users to source code within the readme.

README.md Outdated
# Iterate through resultset
for record in result.result_set:
path = record[0]
# See path.py for more path API.
Copy link
Contributor

Choose a reason for hiding this comment

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

Please remove this comment.

@lgtm-com
Copy link

lgtm-com bot commented Nov 3, 2019

This pull request introduces 2 alerts when merging 02710d6 into 7a70219 - view on LGTM.com

new alerts:

  • 1 for Inconsistent equality and inequality
  • 1 for Inconsistent equality and hashing

@swilly22 swilly22 merged commit 13d1534 into master Nov 3, 2019
@swilly22 swilly22 deleted the path_type branch November 3, 2019 12:22
@lgtm-com
Copy link

lgtm-com bot commented Nov 3, 2019

This pull request introduces 2 alerts when merging a01df09 into 7a70219 - view on LGTM.com

new alerts:

  • 1 for Inconsistent equality and inequality
  • 1 for Inconsistent equality and hashing

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