graphistry/pygraphistry

[BUG] shortest paths scenario failed

lmeyerov opened this issue · 1 comments

A chain query roughly like:

chain([
  n({'some': 'field'}),
  e_forward(to_fixed_point=True),
  n({'another': 'field'})
])

Was failing to find a hit that appears when doing just:

chain([
  n({'some': 'field'}),
  e_forward(to_fixed_point=True),
  n()
])

TBD if we can get the backing data for a reproduction, I'll look at getting that for us first

Minimal repro:

e = e_undirected

e_df = pd.DataFrame({
    's': ['a', 'b'],
    'd': ['b', 'c']
})

n_df = pd.DataFrame({
    'n': ['a', 'b', 'c'],
    'o': ['o', 'e', 'o'],
    'v': [0, 1, 2]
})

g = graphistry.nodes(n_df, 'n').edges(e_df, 's', 'd')

#works
assert 1 == len(g.chain([n({'n': 'a'}), e(to_fixed_point=True), n({'n': 'b'})])._edges)

#fails, 0 hits
assert 2 == len(g.chain([n({'n': 'a'}), e(to_fixed_point=True), n({'n': 'c'})])._edges)