aplbrain / dotmotif

A performant, powerful query framework to search for network motifs
https://bossdb.org/tools/dotmotif
Apache License 2.0
81 stars 9 forks source link

Add macro edge aliases #121

Closed j6k4m8 closed 2 years ago

j6k4m8 commented 2 years ago

This adds support for complex edge constraints in macros:

decreasing_edge_weights(a, b, c) {
    a -> b as ab
    b -> c as bc
    ab.weight > bc.weight
}

...

In increasing levels of challengingness:

This fixes #110 and finishes work started in #119.

codecov-commenter commented 2 years ago

Codecov Report

Merging #121 (b493ac6) into master (16e5f84) will increase coverage by 1.20%. The diff coverage is 97.15%.

@@            Coverage Diff             @@
##           master     #121      +/-   ##
==========================================
+ Coverage   90.12%   91.33%   +1.20%     
==========================================
  Files          22       22              
  Lines        1793     2112     +319     
==========================================
+ Hits         1616     1929     +313     
- Misses        177      183       +6     
Impacted Files Coverage Δ
dotmotif/parsers/v2/__init__.py 93.93% <92.64%> (-1.48%) :arrow_down:
dotmotif/__init__.py 97.59% <100.00%> (+3.33%) :arrow_up:
dotmotif/executors/GrandIsoExecutor.py 83.33% <100.00%> (+0.47%) :arrow_up:
dotmotif/executors/Neo4jExecutor.py 72.61% <100.00%> (+1.01%) :arrow_up:
dotmotif/executors/NetworkXExecutor.py 93.00% <100.00%> (+1.53%) :arrow_up:
dotmotif/executors/test_dm_cypher.py 100.00% <100.00%> (ø)
dotmotif/executors/test_grandisoexecutor.py 100.00% <100.00%> (ø)
dotmotif/executors/test_networkxexecutor.py 100.00% <100.00%> (ø)
dotmotif/parsers/v2/test_v2_parser.py 100.00% <100.00%> (ø)
... and 1 more

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 07e3b7c...b493ac6. Read the comment docs.