Skip to content

Commit

Permalink
Roll v0.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
j6k4m8 committed Feb 13, 2024
1 parent 0fab013 commit ab42740
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 9 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Expand Up @@ -10,6 +10,10 @@
- Support for string operators, like `CONTAINS`, `STARTS WITH`, and `ENDS WITH` (#33)
- Support for negation of clauses with `NOT` (#33)

#### Performance

- Huge performance boost for nonexhaustive queries via streaming matches (#34, thanks @davidmezzetti!)

#### Housekeeping

- Added more recent version of Python (3.9 through 3.11) to CI (#33)
Expand Down
9 changes: 4 additions & 5 deletions README.md
@@ -1,10 +1,10 @@
<h1 align=center>GrandCypher</h1>
<div align=center><img src="https://img.shields.io/pypi/v/grand-cypher?style=for-the-badge" /> <img alt="GitHub Workflow Status (branch)" src="https://img.shields.io/github/actions/workflow/status/aplbrain/grand-cypher/python-package.yml?branch=master&style=for-the-badge"></div>



```shell
pip install grand-cypher
# Note: You will want a version of grandiso>=2.2.0 for best performance!
pip install -U 'grandiso>=2.2.0'
```

GrandCypher is a partial (and growing!) implementation of the Cypher graph query language written in Python, for Python data structures.
Expand Down Expand Up @@ -75,11 +75,10 @@ RETURN
| Anonymous `()` nodes | ✅ Thanks @khoale88! | |
| Undirected `()-[]-()` edges | ✅ Thanks @khoale88! | |
| Boolean Arithmetic (`AND`/`OR`) | ✅ Thanks @khoale88! | |
| `OPTIONAL MATCH` | 🛣 | |
| `OPTIONAL MATCH` | 🛣 | |
| `(:Type)` node-labels | ✅ Thanks @khoale88! | |
| `[:Type]` edge-labels | ✅ Thanks @khoale88! | |
| Graph mutations (e.g. `DELETE`, `SET`,...) | 🛣 | |

| Graph mutations (e.g. `DELETE`, `SET`,...) | 🛣 | |

| | | |
| -------------- | -------------- | ---------------- |
Expand Down
8 changes: 5 additions & 3 deletions grandcypher/__init__.py
Expand Up @@ -6,6 +6,7 @@
to search in a much larger graph database.
"""

from typing import Dict, List, Callable, Tuple
import random
import string
Expand Down Expand Up @@ -142,7 +143,7 @@
start="start",
)

__version__ = "0.2.0"
__version__ = "0.5.0"


_ALPHABET = string.ascii_lowercase + string.digits
Expand Down Expand Up @@ -427,7 +428,7 @@ def _get_true_matches(self):
):
break
match[b] = match[a]
else: # For/else loop
else: # For/else loop
# Check if match matches where condition and add
if not self._where_condition or self._where_condition(
match, self._target_graph, self._return_edges
Expand All @@ -453,7 +454,8 @@ def _matches_iter(self, motif):
self._target_graph,
is_node_attr_match=_is_node_attr_match,
is_edge_attr_match=_is_edge_attr_match,
) for c in nx.weakly_connected_components(motif)
)
for c in nx.weakly_connected_components(motif)
]

# Single match clause iterator
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -5,7 +5,7 @@

setuptools.setup(
name="grand-cypher",
version="0.4.0",
version="0.5.0",
author="Jordan Matelsky",
author_email="opensource@matelsky.com",
description="Query Grand graphs using Cypher",
Expand Down

0 comments on commit ab42740

Please sign in to comment.