kececilayout 0.2.6__tar.gz → 0.2.8__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.2.6
3
+ Version: 0.2.8
4
4
  Summary: 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.
5
5
  Home-page: https://github.com/WhiteSymmetry/kececilayout
6
6
  Author: Mehmet Keçeci
@@ -16,12 +16,13 @@ Description-Content-Type: text/markdown
16
16
  License-File: LICENSE
17
17
  Requires-Dist: networkx
18
18
  Requires-Dist: numpy
19
- Requires-Dist: rustworkx
20
- Requires-Dist: igraph
21
- Requires-Dist: networkit
22
- Requires-Dist: graphillion
23
19
  Requires-Dist: pycairo
24
20
  Requires-Dist: cairocffi
21
+ Provides-Extra: all
22
+ Requires-Dist: igraph; extra == "all"
23
+ Requires-Dist: networkit; extra == "all"
24
+ Requires-Dist: rustworkx; extra == "all"
25
+ Requires-Dist: graphillion; extra == "all"
25
26
  Dynamic: author
26
27
  Dynamic: author-email
27
28
  Dynamic: classifier
@@ -32,6 +33,7 @@ Dynamic: license
32
33
  Dynamic: license-file
33
34
  Dynamic: maintainer
34
35
  Dynamic: maintainer-email
36
+ Dynamic: provides-extra
35
37
  Dynamic: requires-dist
36
38
  Dynamic: requires-python
37
39
  Dynamic: summary
@@ -41,9 +43,406 @@ Dynamic: summary
41
43
  [![PyPI version](https://badge.fury.io/py/kececilayout.svg)](https://badge.fury.io/py/kececilayout)
42
44
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
43
45
 
44
- [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.15313946.svg)](https://doi.org/10.5281/zenodo.15313946)
45
- [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.15314329.svg)](https://doi.org/10.5281/zenodo.15314329)
46
- [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.15353535.svg)](https://doi.org/10.5281/zenodo.15353535)
46
+ [![Zenodo DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.15313946.svg)](https://doi.org/10.5281/zenodo.15313946)
47
+ [![Zenodo DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.15314328.svg)](https://doi.org/10.5281/zenodo.15314328)
48
+ [![Zenodo DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.15353535.svg)](https://doi.org/10.5281/zenodo.15353535)
49
+
50
+ [![WorkflowHub DOI](https://img.shields.io/badge/DOI-10.48546%2Fworkflowhub.datafile.17.1-blue)](https://doi.org/10.48546/workflowhub.datafile.17.1)
51
+
52
+ [![Anaconda-Server Badge](https://anaconda.org/bilgi/kececilayout/badges/version.svg)](https://anaconda.org/bilgi/kececilayout)
53
+ [![Anaconda-Server Badge](https://anaconda.org/bilgi/kececilayout/badges/latest_release_date.svg)](https://anaconda.org/bilgi/kececilayout)
54
+ [![Anaconda-Server Badge](https://anaconda.org/bilgi/kececilayout/badges/platforms.svg)](https://anaconda.org/bilgi/kececilayout)
55
+ [![Anaconda-Server Badge](https://anaconda.org/bilgi/kececilayout/badges/license.svg)](https://anaconda.org/bilgi/kececilayout)
56
+
57
+ [![Open Source](https://img.shields.io/badge/Open%20Source-Open%20Source-brightgreen.svg)](https://opensource.org/)
58
+ [![Documentation Status](https://app.readthedocs.org/projects/kececilayout/badge/?version=latest)](https://kececilayout.readthedocs.io/en/latest)
59
+
60
+ [![OpenSSF Best Practices](https://www.bestpractices.dev/projects/10531/badge)](https://www.bestpractices.dev/projects/10531)
61
+
62
+ [![Python CI](https://github.com/WhiteSymmetry/kececilayout/actions/workflows/python_ci.yml/badge.svg?branch=main)](https://github.com/WhiteSymmetry/kececilayout/actions/workflows/python_ci.yml)
63
+ [![codecov](https://codecov.io/gh/WhiteSymmetry/kececilayout/graph/badge.svg?token=1SDH8E9RAJ)](https://codecov.io/gh/WhiteSymmetry/kececilayout)
64
+ [![Binder](https://terrarium.evidencepub.io/badge_logo.svg)](https://terrarium.evidencepub.io/v2/gh/WhiteSymmetry/kececilayout/HEAD)
65
+ [![PyPI Downloads](https://static.pepy.tech/badge/kececilayout)](https://pepy.tech/projects/kececilayout)
66
+ [![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg)](CODE_OF_CONDUCT.md)
67
+ [![CI/CD](https://github.com/WhiteSymmetry/kececilayout/actions/workflows/ci-cd.yml/badge.svg)](https://github.com/WhiteSymmetry/kececilayout/actions/workflows/ci-cd.yml)
68
+ [![Linted with Ruff](https://img.shields.io/badge/Linted%20with-Ruff-green?logo=python&logoColor=white)](https://github.com/astral-sh/ruff)
69
+
70
+ | **Documentation** | **Paper** |
71
+ |:-----------------:|:---------:|
72
+ | [![](https://img.shields.io/badge/docs-stable-blue.svg)](https://kececilayout.readthedocs.io/) | [![Zenodo](https://zenodo.org/badge/DOI/10.5281/zenodo.15314328.svg)](https://doi.org/10.5281/zenodo.15314328) |
73
+
74
+ ---
75
+
76
+ ## 🌐 English
77
+
78
+ ### Kececi Layout (Keçeci Yerleşimi)
79
+
80
+ **KececiLayout** is a deterministic graph layout algorithm designed for visualizing linear or sequential structures with a characteristic "zig-zag" or "serpentine" pattern.
81
+
82
+ *Python implementation of the Keçeci layout algorithm for graph visualization.*
83
+
84
+ ---
85
+
86
+ ### Description
87
+
88
+ This algorithm arranges nodes sequentially along a primary axis and offsets them alternately along a secondary axis. It's particularly useful for path graphs, chains, or showing progression.
89
+
90
+ **Key Features:**
91
+ * **Linear Focus:** Ideal for visualizing paths, chains, or ordered processes.
92
+ * **Deterministic:** Produces identical results for the same input.
93
+ * **Overlap Reduction:** Prevents node collisions by spreading them across axes.
94
+ * **Parametric:** Fully customizable with parameters like `primary_spacing`, `secondary_spacing`, `primary_direction`, and `secondary_start`.
95
+
96
+ => **v0.2.7**: Curved, transparent, 3D, and `expanding=True` styles supported.
97
+
98
+ ---
99
+
100
+ ### Installation
101
+
102
+ ```bash
103
+ conda install bilgi::kececilayout -y
104
+ pip install kececilayout
105
+ ```
106
+
107
+ 🔗 [PyPI](https://pypi.org/project/kececilayout/) | [Conda](https://anaconda.org/bilgi/kececilayout) | [GitHub](https://github.com/WhiteSymmetry/kececilayout)
108
+
109
+ ---
110
+
111
+ ### Usage
112
+
113
+ #### Example with NetworkX
114
+
115
+ ```python
116
+ import networkx as nx
117
+ import matplotlib.pyplot as plt
118
+ import kececilayout as kl
119
+
120
+ G = nx.path_graph(10)
121
+ pos = kl.kececi_layout_v4(
122
+ G,
123
+ primary_spacing=1.0,
124
+ secondary_spacing=0.5,
125
+ primary_direction='top-down',
126
+ secondary_start='right'
127
+ )
128
+
129
+ plt.figure(figsize=(6, 8))
130
+ nx.draw(G, pos=pos, with_labels=True, node_color='skyblue', node_size=500)
131
+ plt.title("Kececi Layout with NetworkX")
132
+ plt.axis('equal')
133
+ plt.show()
134
+ ```
135
+
136
+ ![NetworkX Example](https://github.com/WhiteSymmetry/kececilayout/blob/main/examples/nx-1.png?raw=true)
137
+
138
+ #### Example with iGraph
139
+
140
+ ```python
141
+ import igraph as ig
142
+ import matplotlib.pyplot as plt
143
+ from kececilayout import kececi_layout_v4_igraph
144
+
145
+ G = ig.Graph.Ring(10, circular=False)
146
+ pos_list = kececi_layout_v4_igraph(G, primary_direction='left-to-right', secondary_start='up')
147
+ layout = ig.Layout(pos_list)
148
+
149
+ fig, ax = plt.subplots(figsize=(8, 6))
150
+ ig.plot(G, target=ax, layout=layout, vertex_label=[f"N{i}" for i in range(10)])
151
+ ax.set_aspect('equal')
152
+ plt.show()
153
+ ```
154
+
155
+ ![iGraph Example](https://github.com/WhiteSymmetry/kececilayout/blob/main/examples/ig-1.png?raw=true)
156
+
157
+ #### Example with RustworkX
158
+
159
+ ```python
160
+ import rustworkx as rx
161
+ import kececilayout as kl
162
+ import matplotlib.pyplot as plt
163
+
164
+ G = rx.generators.path_graph(10)
165
+ pos = kl.kececi_layout_v4(G, primary_direction='bottom-up')
166
+ # Use matplotlib for drawing (see full example in repo)
167
+ ```
168
+
169
+ ![Rustworkx Example](https://github.com/WhiteSymmetry/kececilayout/blob/main/examples/rx-1.png?raw=true)
170
+
171
+ #### Example with Networkit
172
+
173
+ ```python
174
+ import networkit as nk
175
+ import kececilayout as kl
176
+ import matplotlib.pyplot as plt
177
+
178
+ G = nk.graph.Graph(10)
179
+ for i in range(9):
180
+ G.addEdge(i, i+1)
181
+ pos = kl.kececi_layout_v4(G)
182
+ # Draw with matplotlib
183
+ ```
184
+
185
+ ![Networkit Example](https://github.com/WhiteSymmetry/kececilayout/blob/main/examples/nk-1.png?raw=true)
186
+
187
+ #### Example with Graphillion
188
+
189
+ ```python
190
+ import graphillion as gg
191
+ import kececilayout as kl
192
+ import matplotlib.pyplot as plt
193
+
194
+ universe = [(i, i+1) for i in range(1, 10)]
195
+ gg.GraphSet.set_universe(universe)
196
+ gs = gg.GraphSet()
197
+ pos = kl.kececi_layout_v4(gs)
198
+ # Draw with matplotlib
199
+ ```
200
+
201
+ ![Graphillion Example](https://github.com/WhiteSymmetry/kececilayout/blob/main/examples/gg-1.png?raw=true)
202
+
203
+ ---
204
+
205
+ ### Supported Backends
206
+
207
+ - **NetworkX**
208
+ - **igraph**
209
+ - **Rustworkx**
210
+ - **Networkit**
211
+ - **Graphillion**
212
+
213
+ *Note: All backends are supported via unified `kececi_layout_v4` function.*
214
+
215
+ ---
216
+
217
+ ### Advanced Drawing Styles
218
+
219
+ Use `draw_kececi` for enhanced visualizations:
220
+
221
+ ```python
222
+ kl.draw_kececi(G, style='curved') # Smooth curved edges
223
+ kl.draw_kececi(G, style='transparent') # Opacity based on edge length
224
+ kl.draw_kececi(G, style='3d') # 3D helix layout
225
+ ```
226
+
227
+ ---
228
+
229
+ ### License
230
+
231
+ MIT License. See [LICENSE](LICENSE) for details.
232
+
233
+ ---
234
+
235
+ ### Citation
236
+
237
+ If this library was useful in your research, please cite:
238
+
239
+ ```bibtex
240
+ @misc{kececi_2025_15313946,
241
+ author = {Keçeci, Mehmet},
242
+ title = {kececilayout},
243
+ month = may,
244
+ year = 2025,
245
+ publisher = {Zenodo},
246
+ version = {0.2.7},
247
+ doi = {10.5281/zenodo.15313946},
248
+ url = {https://doi.org/10.5281/zenodo.15313946}
249
+ }
250
+ ```
251
+
252
+ ---
253
+
254
+ ## 🇹🇷 Türkçe
255
+
256
+ ### Keçeci Yerleşimi (Kececi Layout)
257
+
258
+ **KececiLayout**, doğrusal veya ardışık yapıları görselleştirmek için tasarlanmış, karakteristik bir "zıgzag" veya "yılanvari" desen oluşturan deterministik bir graf yerleşim algoritmasıdır.
259
+
260
+ *Graf görselleştirme için Keçeci yerleşim algoritmasının Python uygulaması.*
261
+
262
+ ---
263
+
264
+ ### Açıklama
265
+
266
+ Bu algoritma, düğümleri birincil eksen boyunca sıralı olarak yerleştirir ve ikincil eksen boyunca dönüşümlü olarak kaydırır. Yol grafları, zincirler veya ilerlemeyi göstermek için özellikle kullanışlıdır.
267
+
268
+ **Temel Özellikler:**
269
+ * **Doğrusal Odak:** Yollar, zincirler veya sıralı süreçler için idealdir.
270
+ * **Deterministik:** Aynı giriş için her zaman aynı çıktıyı üretir.
271
+ * **Çakışmayı Azaltma:** Düğümleri eksenler boyunca yayarak çakışmaları önler.
272
+ * **Parametrik:** `primary_spacing`, `secondary_spacing`, `primary_direction`, `secondary_start` gibi parametrelerle özelleştirilebilir.
273
+
274
+ => **v0.2.7**: Eğri, şeffaf, 3B ve `expanding=True` stilleri desteklenir.
275
+
276
+ ---
277
+
278
+ ### Kurulum
279
+
280
+ ```bash
281
+ conda install bilgi::kececilayout -y
282
+ pip install kececilayout
283
+ ```
284
+
285
+ 🔗 [PyPI](https://pypi.org/project/kececilayout/) | [Conda](https://anaconda.org/bilgi/kececilayout) | [GitHub](https://github.com/WhiteSymmetry/kececilayout)
286
+
287
+ ---
288
+
289
+ ### Kullanım
290
+
291
+ #### NetworkX ile Örnek
292
+
293
+ ```python
294
+ import networkx as nx
295
+ import matplotlib.pyplot as plt
296
+ import kececilayout as kl
297
+
298
+ G = nx.path_graph(10)
299
+ pos = kl.kececi_layout_v4(
300
+ G,
301
+ primary_spacing=1.0,
302
+ secondary_spacing=0.5,
303
+ primary_direction='top-down',
304
+ secondary_start='right'
305
+ )
306
+
307
+ plt.figure(figsize=(6, 8))
308
+ nx.draw(G, pos=pos, with_labels=True, node_color='skyblue', node_size=500)
309
+ plt.title("Kececi Layout with NetworkX")
310
+ plt.axis('equal')
311
+ plt.show()
312
+ ```
313
+
314
+ ![NetworkX Örneği](https://github.com/WhiteSymmetry/kececilayout/blob/main/examples/nx-1.png?raw=true)
315
+
316
+ #### iGraph ile Örnek
317
+
318
+ ```python
319
+ import igraph as ig
320
+ import matplotlib.pyplot as plt
321
+ from kececilayout import kececi_layout_v4_igraph
322
+
323
+ G = ig.Graph.Ring(10, circular=False)
324
+ pos_list = kececi_layout_v4_igraph(G, primary_direction='left-to-right', secondary_start='up')
325
+ layout = ig.Layout(pos_list)
326
+
327
+ fig, ax = plt.subplots(figsize=(8, 6))
328
+ ig.plot(G, target=ax, layout=layout, vertex_label=[f"N{i}" for i in range(10)])
329
+ ax.set_aspect('equal')
330
+ plt.show()
331
+ ```
332
+
333
+ ![iGraph Örneği](https://github.com/WhiteSymmetry/kececilayout/blob/main/examples/ig-1.png?raw=true)
334
+
335
+ #### RustworkX ile Örnek
336
+
337
+ ```python
338
+ import rustworkx as rx
339
+ import kececilayout as kl
340
+ import matplotlib.pyplot as plt
341
+
342
+ G = rx.generators.path_graph(10)
343
+ pos = kl.kececi_layout_v4(G, primary_direction='bottom-up')
344
+ # Matplotlib ile çizim yapılabilir
345
+ ```
346
+
347
+ ![RustworkX Örneği](https://github.com/WhiteSymmetry/kececilayout/blob/main/examples/rx-1.png?raw=true)
348
+
349
+ #### Networkit ile Örnek
350
+
351
+ ```python
352
+ import networkit as nk
353
+ import kececilayout as kl
354
+ import matplotlib.pyplot as plt
355
+
356
+ G = nk.graph.Graph(10)
357
+ for i in range(9):
358
+ G.addEdge(i, i+1)
359
+ pos = kl.kececi_layout_v4(G)
360
+ # Matplotlib ile çizim
361
+ ```
362
+
363
+ ![Networkit Örneği](https://github.com/WhiteSymmetry/kececilayout/blob/main/examples/nk-1.png?raw=true)
364
+
365
+ #### Graphillion ile Örnek
366
+
367
+ ```python
368
+ import graphillion as gg
369
+ import kececilayout as kl
370
+ import matplotlib.pyplot as plt
371
+
372
+ universe = [(i, i+1) for i in range(1, 10)]
373
+ gg.GraphSet.set_universe(universe)
374
+ gs = gg.GraphSet()
375
+ pos = kl.kececi_layout_v4(gs)
376
+ # Matplotlib ile çizim
377
+ ```
378
+
379
+ ![Graphillion Örneği](https://github.com/WhiteSymmetry/kececilayout/blob/main/examples/gg-1.png?raw=true)
380
+
381
+ ---
382
+
383
+ ### Desteklenen Kütüphaneler
384
+
385
+ - **NetworkX**
386
+ - **igraph**
387
+ - **Rustworkx**
388
+ - **Networkit**
389
+ - **Graphillion**
390
+
391
+ *Not: Tüm kütüphaneler `kececi_layout_v4` fonksiyonu ile desteklenir.*
392
+
393
+ ---
394
+
395
+ ### Gelişmiş Çizim Stilleri
396
+
397
+ `draw_kececi` ile gelişmiş görselleştirmeler:
398
+
399
+ ```python
400
+ kl.draw_kececi(G, style='curved') # Eğri kenarlar
401
+ kl.draw_kececi(G, style='transparent') # Kenar uzunluğuna göre şeffaflık
402
+ kl.draw_kececi(G, style='3d') # 3B heliks yerleşimi
403
+ ```
404
+
405
+ ---
406
+
407
+ ### Lisans
408
+
409
+ MIT Lisansı. Detaylar için [LICENSE](LICENSE) dosyasına bakın.
410
+
411
+ ---
412
+
413
+ ### Atıf
414
+
415
+ Araştırmanızda bu kütüphaneyi kullandıysanız, lütfen aşağıdaki gibi atıf yapın:
416
+
417
+ ```bibtex
418
+ @misc{kececi_2025_15313946,
419
+ author = {Keçeci, Mehmet},
420
+ title = {kececilayout},
421
+ month = may,
422
+ year = 2025,
423
+ publisher = {Zenodo},
424
+ version = {0.2.7},
425
+ doi = {10.5281/zenodo.15313946},
426
+ url = {https://doi.org/10.5281/zenodo.15313946}
427
+ }
428
+ ```
429
+
430
+ ---
431
+
432
+ ## 📚 Documentation
433
+
434
+ For full documentation, visit:
435
+ [**https://kececilayout.readthedocs.io**](https://kececilayout.readthedocs.io)
436
+
437
+ ---
438
+ # KececiLayout
439
+
440
+ [![PyPI version](https://badge.fury.io/py/kececilayout.svg)](https://badge.fury.io/py/kececilayout)
441
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
442
+
443
+ [![Zenodo DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.15313946.svg)](https://doi.org/10.5281/zenodo.15313946)
444
+ [![Zenodo DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.15314328.svg)](https://doi.org/10.5281/zenodo.15314328)
445
+ [![Zenodo DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.15353535.svg)](https://doi.org/10.5281/zenodo.15353535)
47
446
 
48
447
  [![WorkflowHub DOI](https://img.shields.io/badge/DOI-10.48546%2Fworkflowhub.datafile.17.1-blue)](https://doi.org/10.48546/workflowhub.datafile.17.1)
49
448
 
@@ -67,6 +466,10 @@ Dynamic: summary
67
466
  [![CI/CD](https://github.com/WhiteSymmetry/kececilayout/actions/workflows/ci-cd.yml/badge.svg)](https://github.com/WhiteSymmetry/kececilayout/actions/workflows/ci-cd.yml)
68
467
  [![Linted with Ruff](https://img.shields.io/badge/Linted%20with-Ruff-green?logo=python&logoColor=white)](https://github.com/astral-sh/ruff)
69
468
 
469
+ | **Documentation**| **Paper**|
470
+ |:----------------:|:--------:|
471
+ |[![](https://img.shields.io/badge/docs-stable-blue.svg)](https://whitesymmetry.github.io/kececilayout/)|[![Zenodo](https://zenodo.org/badge/DOI/10.5281/zenodo.15314328.svg)](https://doi.org/10.5281/zenodo.15314328)|
472
+
70
473
  ---
71
474
 
72
475
  <p align="left">
@@ -120,6 +523,8 @@ This algorithm arranges nodes sequentially along a primary axis and offsets them
120
523
 
121
524
  *Bu algoritma, düğümleri birincil eksen boyunca sıralı olarak yerleştirir ve ikincil eksen boyunca dönüşümlü olarak kaydırır. Yol grafları, zincirler veya ilerlemeyi göstermek için özellikle kullanışlıdır.*
122
525
 
526
+ => 0.2.6: Curved, transparent, 3d, expanding=True
527
+
123
528
  ---
124
529
 
125
530
  ### English Description
@@ -808,7 +1213,11 @@ Keçeci, Mehmet. kececilayout [Data set]. WorkflowHub, 2025. https://doi.org/10.
808
1213
 
809
1214
  Keçeci, Mehmet. "Kececilayout". Open Science Articles (OSAs), Zenodo, 2025. https://doi.org/10.5281/zenodo.15313946.
810
1215
 
811
- Keçeci, Mehmet. "Keçeci Layout". Open Science Articles (OSAs), Zenodo, 2025. https://doi.org/10.5281/zenodo.15314329.
1216
+ Keçeci, Mehmet. "Keçeci Layout". Open Science Articles (OSAs), Zenodo, 2025. https://doi.org/10.5281/zenodo.15314328.
812
1217
  ```
813
1218
 
814
1219
 
1220
+
1221
+
1222
+
1223
+