From fff7651f5af821700baa49e7d81d5f7946fda299 Mon Sep 17 00:00:00 2001 From: Jordan Matelsky Date: Fri, 10 Jan 2025 12:23:02 -0500 Subject: [PATCH] v0.12.0 --- CHANGELOG.md | 12 ++++++++++++ grandcypher/__init__.py | 9 ++++----- setup.py | 2 +- 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 87c97cd..40171aa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,17 @@ # CHANGELOG +### **0.12.0** (January 10 2025) + +#### Housekeeping + +- Switch to maintained `lark` parser (#60, thanks @ntjess!) + +### **0.11.0** (December 4 2024) + +#### Features + +- Support multidigraph/digraph without up-conversion (#55, thanks @jackboyla!) + ### **0.10.0** (October 18 2024) > Bugfix for searching multigraphs, and other improvements for multigraphs. diff --git a/grandcypher/__init__.py b/grandcypher/__init__.py index ac08724..d67aec4 100644 --- a/grandcypher/__init__.py +++ b/grandcypher/__init__.py @@ -20,8 +20,7 @@ from lark import Lark, Transformer, v_args, Token, Tree logging.basicConfig( - level=logging.INFO, - format="%(asctime)s - %(name)s - %(levelname)s - %(message)s" + level=logging.INFO, format="%(asctime)s - %(name)s - %(levelname)s - %(message)s" ) logger = logging.getLogger(__name__) @@ -169,7 +168,7 @@ start="start", ) -__version__ = "0.10.1" +__version__ = "0.12.0" _ALPHABET = string.ascii_lowercase + string.digits @@ -270,7 +269,7 @@ def _get_edge_attributes(graph: Union[nx.Graph, nx.MultiDiGraph], u, v) -> Dict: return graph.get_edge_data(u, v) else: data = graph.get_edge_data(u, v) - return {0: data} # Wrap in dict to mimic MultiDiGraph structure + return {0: data} # Wrap in dict to mimic MultiDiGraph structure def _aggregate_edge_labels(edges: Dict) -> Dict: @@ -989,7 +988,7 @@ def _edge_hop_motifs(self, motif: nx.MultiDiGraph) -> List[Tuple[nx.Graph, dict] if motif.out_degree(n) == 0 and motif.in_degree(n) == 0: new_motif.add_node(n, **motif.nodes[n]) motifs: List[Tuple[nx.DiGraph, dict]] = [(new_motif, {})] - + if motif.is_multigraph(): edge_iter = motif.edges(keys=True) else: diff --git a/setup.py b/setup.py index b71bae0..3a7e3cb 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setuptools.setup( name="grand-cypher", - version="0.10.0", + version="0.12.0", author="Jordan Matelsky", author_email="opensource@matelsky.com", description="Query Grand graphs using Cypher",