natural-agi-common 0.1.31__tar.gz → 0.1.33__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. {natural_agi_common-0.1.31 → natural_agi_common-0.1.33}/PKG-INFO +1 -1
  2. {natural_agi_common-0.1.31 → natural_agi_common-0.1.33}/common/traversal/graph_traversal.py +8 -5
  3. {natural_agi_common-0.1.31 → natural_agi_common-0.1.33}/natural_agi_common.egg-info/PKG-INFO +1 -1
  4. {natural_agi_common-0.1.31 → natural_agi_common-0.1.33}/setup.py +1 -1
  5. {natural_agi_common-0.1.31 → natural_agi_common-0.1.33}/README.md +0 -0
  6. {natural_agi_common-0.1.31 → natural_agi_common-0.1.33}/common/__init__.py +0 -0
  7. {natural_agi_common-0.1.31 → natural_agi_common-0.1.33}/common/critical_graph_utils.py +0 -0
  8. {natural_agi_common-0.1.31 → natural_agi_common-0.1.33}/common/critical_point.py +0 -0
  9. {natural_agi_common-0.1.31 → natural_agi_common-0.1.33}/common/decorator.py +0 -0
  10. {natural_agi_common-0.1.31 → natural_agi_common-0.1.33}/common/graph_utils.py +0 -0
  11. {natural_agi_common-0.1.31 → natural_agi_common-0.1.33}/common/model/__init__.py +0 -0
  12. {natural_agi_common-0.1.31 → natural_agi_common-0.1.33}/common/model/dlq.py +0 -0
  13. {natural_agi_common-0.1.31 → natural_agi_common-0.1.33}/common/model/enums.py +0 -0
  14. {natural_agi_common-0.1.31 → natural_agi_common-0.1.33}/common/model/half_plane.py +0 -0
  15. {natural_agi_common-0.1.31 → natural_agi_common-0.1.33}/common/model/length_comparison_result.py +0 -0
  16. {natural_agi_common-0.1.31 → natural_agi_common-0.1.33}/common/model/point.py +0 -0
  17. {natural_agi_common-0.1.31 → natural_agi_common-0.1.33}/common/model/vector.py +0 -0
  18. {natural_agi_common-0.1.31 → natural_agi_common-0.1.33}/common/params.py +0 -0
  19. {natural_agi_common-0.1.31 → natural_agi_common-0.1.33}/common/traversal/__init__.py +0 -0
  20. {natural_agi_common-0.1.31 → natural_agi_common-0.1.33}/common/traversal/start_point_selector.py +0 -0
  21. {natural_agi_common-0.1.31 → natural_agi_common-0.1.33}/common/traversal/visitors/__init__.py +0 -0
  22. {natural_agi_common-0.1.31 → natural_agi_common-0.1.33}/common/traversal/visitors/angle_visitor.py +0 -0
  23. {natural_agi_common-0.1.31 → natural_agi_common-0.1.33}/common/traversal/visitors/direction_visitor.py +0 -0
  24. {natural_agi_common-0.1.31 → natural_agi_common-0.1.33}/common/traversal/visitors/half_plane_visitor.py +0 -0
  25. {natural_agi_common-0.1.31 → natural_agi_common-0.1.33}/common/traversal/visitors/length_comparison_visitor.py +0 -0
  26. {natural_agi_common-0.1.31 → natural_agi_common-0.1.33}/common/traversal/visitors/quadrant_visitor.py +0 -0
  27. {natural_agi_common-0.1.31 → natural_agi_common-0.1.33}/common/traversal/visitors/relative_position_visitor.py +0 -0
  28. {natural_agi_common-0.1.31 → natural_agi_common-0.1.33}/common/traversal/visitors/visitor.py +0 -0
  29. {natural_agi_common-0.1.31 → natural_agi_common-0.1.33}/common/traversal/visitors/visitor_result_persistence_service.py +0 -0
  30. {natural_agi_common-0.1.31 → natural_agi_common-0.1.33}/natural_agi_common.egg-info/SOURCES.txt +0 -0
  31. {natural_agi_common-0.1.31 → natural_agi_common-0.1.33}/natural_agi_common.egg-info/dependency_links.txt +0 -0
  32. {natural_agi_common-0.1.31 → natural_agi_common-0.1.33}/natural_agi_common.egg-info/requires.txt +0 -0
  33. {natural_agi_common-0.1.31 → natural_agi_common-0.1.33}/natural_agi_common.egg-info/top_level.txt +0 -0
  34. {natural_agi_common-0.1.31 → natural_agi_common-0.1.33}/pyproject.toml +0 -0
  35. {natural_agi_common-0.1.31 → natural_agi_common-0.1.33}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: natural-agi-common
3
- Version: 0.1.31
3
+ Version: 0.1.33
4
4
  Requires-Dist: pydantic
5
5
  Requires-Dist: networkx
6
6
  Requires-Dist: neo4j
@@ -1,6 +1,6 @@
1
1
  from typing import Generator, Any, Tuple, Optional
2
2
  import networkx as nx
3
-
3
+ import logging
4
4
  from ..model.point import Point
5
5
  from ..model.vector import Vector
6
6
 
@@ -8,18 +8,19 @@ from ..model.vector import Vector
8
8
  class GraphTraversal:
9
9
  def __init__(self, graph: nx.Graph):
10
10
  self.graph = graph
11
+ self.logger = logging.getLogger(__name__)
11
12
 
12
13
  def dfs_traversal(
13
14
  self, start_node: Any
14
15
  ) -> Generator[Tuple[Point, Optional[Vector]], None, None]:
15
- visited = set()
16
+ visited_vector = set()
16
17
  for edge in nx.dfs_edges(self.graph, start_node):
18
+ self.logger.info(f"Visiting edge: {edge}")
17
19
  source_node, target_node = edge
18
- if target_node in visited:
20
+ if source_node in visited_vector or target_node in visited_vector:
21
+ self.logger.info(f"Skipping edge: {edge} because vector was already visited")
19
22
  continue
20
23
 
21
- visited.add(target_node)
22
-
23
24
  # Convert to your Point and Vector objects
24
25
  source_data = self.graph.nodes[source_node]
25
26
  target_data = self.graph.nodes[target_node]
@@ -31,11 +32,13 @@ class GraphTraversal:
31
32
  point = Point.from_node_data(source_data)
32
33
  elif self._is_vector(source_data):
33
34
  vector = Vector.from_node_data(source_data)
35
+ visited_vector.add(source_node)
34
36
 
35
37
  if self._is_point(target_data):
36
38
  point = Point.from_node_data(target_data)
37
39
  elif self._is_vector(target_data):
38
40
  vector = Vector.from_node_data(target_data)
41
+ visited_vector.add(target_node)
39
42
 
40
43
  if point is None and vector is None:
41
44
  raise ValueError(f"Invalid node data: {source_data} or {target_data}")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: natural-agi-common
3
- Version: 0.1.31
3
+ Version: 0.1.33
4
4
  Requires-Dist: pydantic
5
5
  Requires-Dist: networkx
6
6
  Requires-Dist: neo4j
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
2
2
 
3
3
  setup(
4
4
  name="natural-agi-common",
5
- version="0.1.31",
5
+ version="0.1.33",
6
6
  packages=find_packages(include=["common", "common.*"]),
7
7
  install_requires=["pydantic", "networkx", "neo4j"],
8
8
  )