natural-agi-common 0.1.27__tar.gz → 0.1.29__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.27 → natural_agi_common-0.1.29}/PKG-INFO +1 -1
  2. {natural_agi_common-0.1.27 → natural_agi_common-0.1.29}/common/traversal/graph_traversal.py +6 -0
  3. {natural_agi_common-0.1.27 → natural_agi_common-0.1.29}/common/traversal/visitors/angle_visitor.py +7 -7
  4. {natural_agi_common-0.1.27 → natural_agi_common-0.1.29}/natural_agi_common.egg-info/PKG-INFO +1 -1
  5. {natural_agi_common-0.1.27 → natural_agi_common-0.1.29}/setup.py +1 -1
  6. {natural_agi_common-0.1.27 → natural_agi_common-0.1.29}/README.md +0 -0
  7. {natural_agi_common-0.1.27 → natural_agi_common-0.1.29}/common/__init__.py +0 -0
  8. {natural_agi_common-0.1.27 → natural_agi_common-0.1.29}/common/critical_graph_utils.py +0 -0
  9. {natural_agi_common-0.1.27 → natural_agi_common-0.1.29}/common/critical_point.py +0 -0
  10. {natural_agi_common-0.1.27 → natural_agi_common-0.1.29}/common/decorator.py +0 -0
  11. {natural_agi_common-0.1.27 → natural_agi_common-0.1.29}/common/graph_utils.py +0 -0
  12. {natural_agi_common-0.1.27 → natural_agi_common-0.1.29}/common/model/__init__.py +0 -0
  13. {natural_agi_common-0.1.27 → natural_agi_common-0.1.29}/common/model/dlq.py +0 -0
  14. {natural_agi_common-0.1.27 → natural_agi_common-0.1.29}/common/model/enums.py +0 -0
  15. {natural_agi_common-0.1.27 → natural_agi_common-0.1.29}/common/model/half_plane.py +0 -0
  16. {natural_agi_common-0.1.27 → natural_agi_common-0.1.29}/common/model/length_comparison_result.py +0 -0
  17. {natural_agi_common-0.1.27 → natural_agi_common-0.1.29}/common/model/point.py +0 -0
  18. {natural_agi_common-0.1.27 → natural_agi_common-0.1.29}/common/model/vector.py +0 -0
  19. {natural_agi_common-0.1.27 → natural_agi_common-0.1.29}/common/params.py +0 -0
  20. {natural_agi_common-0.1.27 → natural_agi_common-0.1.29}/common/traversal/__init__.py +0 -0
  21. {natural_agi_common-0.1.27 → natural_agi_common-0.1.29}/common/traversal/start_point_selector.py +0 -0
  22. {natural_agi_common-0.1.27 → natural_agi_common-0.1.29}/common/traversal/visitors/__init__.py +0 -0
  23. {natural_agi_common-0.1.27 → natural_agi_common-0.1.29}/common/traversal/visitors/direction_visitor.py +0 -0
  24. {natural_agi_common-0.1.27 → natural_agi_common-0.1.29}/common/traversal/visitors/half_plane_visitor.py +0 -0
  25. {natural_agi_common-0.1.27 → natural_agi_common-0.1.29}/common/traversal/visitors/length_comparison_visitor.py +0 -0
  26. {natural_agi_common-0.1.27 → natural_agi_common-0.1.29}/common/traversal/visitors/quadrant_visitor.py +0 -0
  27. {natural_agi_common-0.1.27 → natural_agi_common-0.1.29}/common/traversal/visitors/relative_position_visitor.py +0 -0
  28. {natural_agi_common-0.1.27 → natural_agi_common-0.1.29}/common/traversal/visitors/visitor.py +0 -0
  29. {natural_agi_common-0.1.27 → natural_agi_common-0.1.29}/common/traversal/visitors/visitor_result_persistence_service.py +0 -0
  30. {natural_agi_common-0.1.27 → natural_agi_common-0.1.29}/natural_agi_common.egg-info/SOURCES.txt +0 -0
  31. {natural_agi_common-0.1.27 → natural_agi_common-0.1.29}/natural_agi_common.egg-info/dependency_links.txt +0 -0
  32. {natural_agi_common-0.1.27 → natural_agi_common-0.1.29}/natural_agi_common.egg-info/requires.txt +0 -0
  33. {natural_agi_common-0.1.27 → natural_agi_common-0.1.29}/natural_agi_common.egg-info/top_level.txt +0 -0
  34. {natural_agi_common-0.1.27 → natural_agi_common-0.1.29}/pyproject.toml +0 -0
  35. {natural_agi_common-0.1.27 → natural_agi_common-0.1.29}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: natural-agi-common
3
- Version: 0.1.27
3
+ Version: 0.1.29
4
4
  Requires-Dist: pydantic
5
5
  Requires-Dist: networkx
6
6
  Requires-Dist: neo4j
@@ -12,8 +12,14 @@ class GraphTraversal:
12
12
  def dfs_traversal(
13
13
  self, start_node: Any
14
14
  ) -> Generator[Tuple[Point, Optional[Vector]], None, None]:
15
+ visited = set()
15
16
  for edge in nx.dfs_edges(self.graph, start_node):
16
17
  source_node, target_node = edge
18
+ if source_node in visited or target_node in visited:
19
+ continue
20
+
21
+ visited.add(source_node)
22
+ visited.add(target_node)
17
23
 
18
24
  # Convert to your Point and Vector objects
19
25
  source_data = self.graph.nodes[source_node]
@@ -115,15 +115,15 @@ class AngleVisitor(Visitor):
115
115
  node for node, data in self.graph.nodes(data=True) if data["id"] == point.id
116
116
  ][0]
117
117
  for neighbor in self.graph.neighbors(node):
118
- edge_data = self.graph.get_edge_data(node, neighbor)
118
+ vector_data = self.graph.nodes[neighbor]
119
119
  connected_lines.append(
120
120
  Vector(
121
- id=edge_data["id"],
122
- x1=edge_data["x1"],
123
- y1=edge_data["y1"],
124
- x2=edge_data["x2"],
125
- y2=edge_data["y2"],
126
- length=edge_data["length"],
121
+ id=vector_data["id"],
122
+ x1=vector_data["x1"],
123
+ y1=vector_data["y1"],
124
+ x2=vector_data["x2"],
125
+ y2=vector_data["y2"],
126
+ length=vector_data["length"],
127
127
  )
128
128
  )
129
129
  return connected_lines
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: natural-agi-common
3
- Version: 0.1.27
3
+ Version: 0.1.29
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.27",
5
+ version="0.1.29",
6
6
  packages=find_packages(include=["common", "common.*"]),
7
7
  install_requires=["pydantic", "networkx", "neo4j"],
8
8
  )