kececilayout 0.4.5__tar.gz → 0.4.6__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: kececilayout
3
- Version: 0.4.5
3
+ Version: 0.4.6
4
4
  Summary: Çeşitli graf kütüphaneleri için sıralı-zigzag yerleşimleri sağlayan bir Python paketi.
5
5
  Home-page: https://github.com/WhiteSymmetry/kececilayout
6
6
  Author: Mehmet Keçeci
@@ -10,7 +10,7 @@ import inspect
10
10
  import warnings
11
11
 
12
12
  # Paket sürüm numarası
13
- __version__ = "0.4.5"
13
+ __version__ = "0.4.6"
14
14
 
15
15
  # =============================================================================
16
16
  # OTOMATİK İÇE AKTARMA VE __all__ OLUŞTURMA
@@ -143,3 +143,4 @@ def old_function_placeholder():
143
143
 
144
144
 
145
145
 
146
+
@@ -1,6 +1,6 @@
1
1
  # _version.py
2
2
 
3
- __version__ = "0.4.5"
3
+ __version__ = "0.4.6"
4
4
  __license__ = "MIT"
5
5
  __description__ = "A deterministic node placement algorithm used in graph visualization. In this layout, nodes are arranged sequentially along a defined primary axis. Each subsequent node is then alternately offset along a secondary, perpendicular axis, typically moving to one side of the primary axis and then the other. Often, the magnitude of this secondary offset increases as nodes progress along the primary axis, creating a characteristic zig-zag or serpentine pattern."
6
6
  __author__ = "Mehmet Keçeci"
@@ -3,8 +3,8 @@
3
3
  """
4
4
  kececilayout.py
5
5
 
6
- Bu modül, çeşitli Python graf kütüphaneleri için sıralı-zigzag ("Keçeci Layout")
7
- ve gelişmiş görselleştirme stilleri sağlar.
6
+ This module provides sequential-zigzag ("Keçeci Layout") and advanced visualization styles for various Python graph libraries.
7
+ Bu modül, çeşitli Python graf kütüphaneleri için sıralı-zigzag ("Keçeci Layout") ve gelişmiş görselleştirme stilleri sağlar.
8
8
  """
9
9
 
10
10
  import graphillion as gg
@@ -1111,11 +1111,28 @@ def to_networkx(graph):
1111
1111
  """Converts any supported graph type to a NetworkX graph."""
1112
1112
  if isinstance(graph, nx.Graph):
1113
1113
  return graph.copy()
1114
+
1114
1115
  nx_graph = nx.Graph()
1116
+
1117
+ # PyZX graph support
1118
+ try:
1119
+ import pyzx as zx
1120
+ if hasattr(graph, 'vertices') and hasattr(graph, 'edges'):
1121
+ # PyZX graph olduğunu varsay
1122
+ for v in graph.vertices():
1123
+ nx_graph.add_node(v)
1124
+ for edge in graph.edges():
1125
+ if len(edge) == 2:
1126
+ nx_graph.add_edge(edge[0], edge[1])
1127
+ return nx_graph
1128
+ except ImportError:
1129
+ pass
1130
+
1131
+ # Diğer graph kütüphaneleri...
1115
1132
  if rx and isinstance(graph, (rx.PyGraph, rx.PyDiGraph)):
1116
1133
  nx_graph.add_nodes_from(graph.node_indices())
1117
1134
  nx_graph.add_edges_from(graph.edge_list())
1118
- elif ig and isinstance(graph, ig.Graph):
1135
+ elif ig and hasattr(ig, 'Graph') and isinstance(graph, ig.Graph):
1119
1136
  nx_graph.add_nodes_from(v.index for v in graph.vs)
1120
1137
  nx_graph.add_edges_from(graph.get_edgelist())
1121
1138
  elif nk and isinstance(graph, nk.graph.Graph):
@@ -1123,16 +1140,16 @@ def to_networkx(graph):
1123
1140
  nx_graph.add_edges_from(graph.iterEdges())
1124
1141
  elif gg and isinstance(graph, gg.GraphSet):
1125
1142
  edges = graph.universe()
1126
- max_node_id = max(set(itertools.chain.from_iterable(edges))) if edges else 0
1143
+ max_node_id = find_max_node_id(edges)
1127
1144
  if max_node_id > 0:
1128
1145
  nx_graph.add_nodes_from(range(1, max_node_id + 1))
1129
1146
  nx_graph.add_edges_from(edges)
1130
1147
  else:
1131
1148
  # This block is rarely reached as _get_nodes_from_graph would fail first
1132
- raise TypeError(f"Unsupported graph type {type(graph)} could not be converted to NetworkX.")
1133
1149
  #raise TypeError(f"Desteklenmeyen graf tipi {type(graph)} NetworkX'e dönüştürülemedi.")
1134
- return nx_graph
1150
+ raise TypeError(f"Unsupported graph type {type(graph)} could not be converted to NetworkX.")
1135
1151
 
1152
+ return nx_graph
1136
1153
 
1137
1154
  def _kececi_layout_3d_helix(nx_graph):
1138
1155
  """Internal function: Arranges nodes in a helix along the Z-axis."""
@@ -1319,7 +1336,7 @@ def _draw_internal(nx_graph, ax, style, **kwargs):
1319
1336
  ax.set_title("Keçeci Layout: 3D Helix")
1320
1337
  ax.set_axis_off()
1321
1338
  ax.view_init(elev=20, azim=-60)
1322
- """
1339
+ """
1323
1340
  def _draw_internal(nx_graph, ax, style, **kwargs):
1324
1341
  #Internal router that handles the different drawing styles.
1325
1342
  layout_params = {
@@ -1443,7 +1460,3 @@ if __name__ == '__main__':
1443
1460
  plt.show()
1444
1461
 
1445
1462
 
1446
-
1447
-
1448
-
1449
-
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: kececilayout
3
- Version: 0.4.5
3
+ Version: 0.4.6
4
4
  Summary: Çeşitli graf kütüphaneleri için sıralı-zigzag yerleşimleri sağlayan bir Python paketi.
5
5
  Home-page: https://github.com/WhiteSymmetry/kececilayout
6
6
  Author: Mehmet Keçeci
@@ -1,12 +1,12 @@
1
1
  # pyproject.toml
2
2
 
3
3
  [build-system]
4
- requires = ["setuptools>=61.0", "wheel"]
4
+ requires = ["setuptools>=77.0"]
5
5
  build-backend = "setuptools.build_meta"
6
6
 
7
7
  [project]
8
8
  name = "kececilayout"
9
- version = "0.4.5"
9
+ version = "0.4.6"
10
10
 
11
11
  # Diğer proje bilgileri (isteğe bağlı ama tavsiye edilir)
12
12
  authors = [
@@ -45,8 +45,28 @@ test = [
45
45
  "graphillion",
46
46
  ]
47
47
 
48
+ [dependency-groups]
49
+ dev = [{include-group = "test"}]
50
+ test = ["pytest"]
51
+
52
+ [tool.pytest.ini_options]
53
+ log_level = "INFO"
54
+ xfail_strict = true
55
+ addopts = ["-ra", "--strict-config", "--strict-markers"]
56
+ filterwarnings = ["error"]
57
+ minversion = "6.0"
58
+ testpaths = [
59
+ "tests",
60
+ "integration",
61
+ ]
62
+
63
+ [tool.readthedocs]
64
+ version = 2
65
+ build.image = "stable"
66
+ python.version = "3.11"
67
+ configuration = "docs/conf.py" # Build konfigürasyonu belirtin
68
+
48
69
  [project.urls]
49
70
  "Homepage" = "https://github.com/WhiteSymmetry/kececilayout"
50
71
  "Bug Tracker" = "https://github.com/WhiteSymmetry/kececilayout/issues"
51
72
 
52
-
@@ -24,7 +24,6 @@ def get_version():
24
24
 
25
25
  setup(
26
26
  name="kececilayout",
27
- #version="0.2.9",
28
27
  version=get_version(),
29
28
  description="A deterministic node placement algorithm used in graph visualization. In this layout, nodes are arranged sequentially along a defined primary axis. Each subsequent node is then alternately offset along a secondary, perpendicular axis, typically moving to one side of the primary axis and then the other. Often, the magnitude of this secondary offset increases as nodes progress along the primary axis, creating a characteristic zig-zag or serpentine pattern.",
30
29
  long_description=long_description,
@@ -56,3 +55,4 @@ setup(
56
55
 
57
56
 
58
57
 
58
+
File without changes
File without changes
File without changes
File without changes