natural-agi-common 0.1.31__tar.gz → 0.1.32__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.32}/PKG-INFO +1 -1
  2. {natural_agi_common-0.1.31 → natural_agi_common-0.1.32}/common/traversal/graph_traversal.py +6 -5
  3. {natural_agi_common-0.1.31 → natural_agi_common-0.1.32}/natural_agi_common.egg-info/PKG-INFO +1 -1
  4. {natural_agi_common-0.1.31 → natural_agi_common-0.1.32}/setup.py +1 -1
  5. {natural_agi_common-0.1.31 → natural_agi_common-0.1.32}/README.md +0 -0
  6. {natural_agi_common-0.1.31 → natural_agi_common-0.1.32}/common/__init__.py +0 -0
  7. {natural_agi_common-0.1.31 → natural_agi_common-0.1.32}/common/critical_graph_utils.py +0 -0
  8. {natural_agi_common-0.1.31 → natural_agi_common-0.1.32}/common/critical_point.py +0 -0
  9. {natural_agi_common-0.1.31 → natural_agi_common-0.1.32}/common/decorator.py +0 -0
  10. {natural_agi_common-0.1.31 → natural_agi_common-0.1.32}/common/graph_utils.py +0 -0
  11. {natural_agi_common-0.1.31 → natural_agi_common-0.1.32}/common/model/__init__.py +0 -0
  12. {natural_agi_common-0.1.31 → natural_agi_common-0.1.32}/common/model/dlq.py +0 -0
  13. {natural_agi_common-0.1.31 → natural_agi_common-0.1.32}/common/model/enums.py +0 -0
  14. {natural_agi_common-0.1.31 → natural_agi_common-0.1.32}/common/model/half_plane.py +0 -0
  15. {natural_agi_common-0.1.31 → natural_agi_common-0.1.32}/common/model/length_comparison_result.py +0 -0
  16. {natural_agi_common-0.1.31 → natural_agi_common-0.1.32}/common/model/point.py +0 -0
  17. {natural_agi_common-0.1.31 → natural_agi_common-0.1.32}/common/model/vector.py +0 -0
  18. {natural_agi_common-0.1.31 → natural_agi_common-0.1.32}/common/params.py +0 -0
  19. {natural_agi_common-0.1.31 → natural_agi_common-0.1.32}/common/traversal/__init__.py +0 -0
  20. {natural_agi_common-0.1.31 → natural_agi_common-0.1.32}/common/traversal/start_point_selector.py +0 -0
  21. {natural_agi_common-0.1.31 → natural_agi_common-0.1.32}/common/traversal/visitors/__init__.py +0 -0
  22. {natural_agi_common-0.1.31 → natural_agi_common-0.1.32}/common/traversal/visitors/angle_visitor.py +0 -0
  23. {natural_agi_common-0.1.31 → natural_agi_common-0.1.32}/common/traversal/visitors/direction_visitor.py +0 -0
  24. {natural_agi_common-0.1.31 → natural_agi_common-0.1.32}/common/traversal/visitors/half_plane_visitor.py +0 -0
  25. {natural_agi_common-0.1.31 → natural_agi_common-0.1.32}/common/traversal/visitors/length_comparison_visitor.py +0 -0
  26. {natural_agi_common-0.1.31 → natural_agi_common-0.1.32}/common/traversal/visitors/quadrant_visitor.py +0 -0
  27. {natural_agi_common-0.1.31 → natural_agi_common-0.1.32}/common/traversal/visitors/relative_position_visitor.py +0 -0
  28. {natural_agi_common-0.1.31 → natural_agi_common-0.1.32}/common/traversal/visitors/visitor.py +0 -0
  29. {natural_agi_common-0.1.31 → natural_agi_common-0.1.32}/common/traversal/visitors/visitor_result_persistence_service.py +0 -0
  30. {natural_agi_common-0.1.31 → natural_agi_common-0.1.32}/natural_agi_common.egg-info/SOURCES.txt +0 -0
  31. {natural_agi_common-0.1.31 → natural_agi_common-0.1.32}/natural_agi_common.egg-info/dependency_links.txt +0 -0
  32. {natural_agi_common-0.1.31 → natural_agi_common-0.1.32}/natural_agi_common.egg-info/requires.txt +0 -0
  33. {natural_agi_common-0.1.31 → natural_agi_common-0.1.32}/natural_agi_common.egg-info/top_level.txt +0 -0
  34. {natural_agi_common-0.1.31 → natural_agi_common-0.1.32}/pyproject.toml +0 -0
  35. {natural_agi_common-0.1.31 → natural_agi_common-0.1.32}/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.32
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,17 @@ 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):
17
18
  source_node, target_node = edge
18
- if target_node in visited:
19
+ if source_node in visited_vector or target_node in visited_vector:
19
20
  continue
20
21
 
21
- visited.add(target_node)
22
-
23
22
  # Convert to your Point and Vector objects
24
23
  source_data = self.graph.nodes[source_node]
25
24
  target_data = self.graph.nodes[target_node]
@@ -31,11 +30,13 @@ class GraphTraversal:
31
30
  point = Point.from_node_data(source_data)
32
31
  elif self._is_vector(source_data):
33
32
  vector = Vector.from_node_data(source_data)
33
+ visited_vector.add(source_node)
34
34
 
35
35
  if self._is_point(target_data):
36
36
  point = Point.from_node_data(target_data)
37
37
  elif self._is_vector(target_data):
38
38
  vector = Vector.from_node_data(target_data)
39
+ visited_vector.add(target_node)
39
40
 
40
41
  if point is None and vector is None:
41
42
  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.32
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.32",
6
6
  packages=find_packages(include=["common", "common.*"]),
7
7
  install_requires=["pydantic", "networkx", "neo4j"],
8
8
  )