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

Aggregation functions (COUNT, SUM, MIN, MAX, AVG) #45

Merged
merged 25 commits into from
Jun 10, 2024
Merged
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
3d6caa0
Adds support for multigraphs
jackboyla May 8, 2024
1f2d658
Refactors `_is_edge_attr_match`
jackboyla May 8, 2024
aed457e
Filters relations by __label__ during `_lookup`
jackboyla May 8, 2024
849ad2f
Bundles relation attributes together for lookup
jackboyla May 9, 2024
2823281
Refactors and adds inline docs
jackboyla May 9, 2024
ee801b3
Adds tests for multigraph support
jackboyla May 9, 2024
cb2a4e9
Cleans up inline docs
jackboyla May 9, 2024
3595706
Removes slicing list twice to avoid two copies in memory
jackboyla May 9, 2024
da81cfd
Supports WHERE clause for relationships in multigraphs
jackboyla May 9, 2024
577d843
Adds test for multigraph with WHERE clause on single edge
jackboyla May 9, 2024
e759563
Accounts for WHERE with string node attributes in MultiDiGraphs
jackboyla May 21, 2024
b76b825
Unifies all unit tests to work with both DiGraphs and MultiDiGraphs
jackboyla May 21, 2024
46f5261
Merge branch 'master' into unify-tests-for-digraph-and-multidigraph
jackboyla May 22, 2024
6748db7
Completes multidigraph test for WHERE on node attribute
jackboyla May 22, 2024
022a438
Supports logical OR for relationship matching
jackboyla May 22, 2024
05f98b3
Adds tests for logical OR in MATCH for relationships
jackboyla May 22, 2024
b106914
Merge remote-tracking branch 'origin/master' into logical-or-for-rela…
jackboyla May 24, 2024
351eb6e
Implements aggregation functions
jackboyla Jun 7, 2024
72db2a8
Removes unused code
jackboyla Jun 7, 2024
aa007b9
Adds agg function results to `_return_requests`
jackboyla Jun 10, 2024
963fa8f
Handles `None` values appropriately for MIN and MAX
jackboyla Jun 10, 2024
346a044
Adds tests for agg functions and adjusts existing tests to new output
jackboyla Jun 10, 2024
3d7ebae
Adds examples page
jackboyla Jun 10, 2024
ddd4db4
Adds test for multiple agg functions
jackboyla Jun 10, 2024
d37f3d2
Removes commented code
jackboyla Jun 10, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Removes slicing list twice to avoid two copies in memory
jackboyla committed May 9, 2024
commit 3595706a8259313be5b88e12acc580253a4830a2
2 changes: 1 addition & 1 deletion grandcypher/__init__.py
Original file line number Diff line number Diff line change
@@ -693,7 +693,7 @@ def _edge_hop_motifs(self, motif: nx.MultiDiGraph) -> List[Tuple[nx.Graph, dict]
new_edges = [u] + hops + [v]
new_motif = nx.MultiDiGraph()
new_motif.add_edges_from(
list(zip(new_edges[:-1], new_edges[1:])), __labels__=edge_type
zip(new_edges, new_edges[1:]), __labels__=edge_type
)
new_motif.add_node(u, **motif.nodes[u])
new_motif.add_node(v, **motif.nodes[v])