topologicpy 0.4.25__py3-none-any.whl → 0.4.26__py3-none-any.whl
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.
- topologicpy/DGL.py +4 -2
- topologicpy/Graph.py +23 -14
- topologicpy/Topology.py +18 -8
- topologicpy/__init__.py +2 -2
- {topologicpy-0.4.25.dist-info → topologicpy-0.4.26.dist-info}/METADATA +1 -1
- {topologicpy-0.4.25.dist-info → topologicpy-0.4.26.dist-info}/RECORD +9 -9
- {topologicpy-0.4.25.dist-info → topologicpy-0.4.26.dist-info}/LICENSE +0 -0
- {topologicpy-0.4.25.dist-info → topologicpy-0.4.26.dist-info}/WHEEL +0 -0
- {topologicpy-0.4.25.dist-info → topologicpy-0.4.26.dist-info}/top_level.txt +0 -0
topologicpy/DGL.py
CHANGED
|
@@ -1532,8 +1532,10 @@ class DGL:
|
|
|
1532
1532
|
"""
|
|
1533
1533
|
if not path:
|
|
1534
1534
|
return None
|
|
1535
|
-
|
|
1536
|
-
|
|
1535
|
+
try:
|
|
1536
|
+
file = open(path)
|
|
1537
|
+
except:
|
|
1538
|
+
print("DGL.GraphsByDGCNNPath - Error: the DGCNN file is not a valid file. Returning None.")
|
|
1537
1539
|
return None
|
|
1538
1540
|
return DGL.GraphsByDGCNNFile(file=file, categories=categories, bidirectional=bidirectional)
|
|
1539
1541
|
|
topologicpy/Graph.py
CHANGED
|
@@ -367,7 +367,7 @@ class Graph:
|
|
|
367
367
|
try:
|
|
368
368
|
from tqdm.auto import tqdm
|
|
369
369
|
except:
|
|
370
|
-
print("
|
|
370
|
+
print("Graph.BetweenessCentrality - Error: Could not import tqdm")
|
|
371
371
|
|
|
372
372
|
if not isinstance(graph, topologic.Graph):
|
|
373
373
|
print("Graph.BetweenessCentrality - Error: The input graph is not a valid graph. Returning None.")
|
|
@@ -535,16 +535,19 @@ class Graph:
|
|
|
535
535
|
if not nodes_file_path:
|
|
536
536
|
print("Graph.ByCSVPath - Error: the input edges_file_path is not a valid path. Returning None.")
|
|
537
537
|
return None
|
|
538
|
-
|
|
539
|
-
|
|
538
|
+
try:
|
|
539
|
+
graphs_file = open(graphs_file_path)
|
|
540
|
+
except:
|
|
540
541
|
print("Graph.ByCSVPath - Error: the graphs file is not a valid file. Returning None.")
|
|
541
542
|
return None
|
|
542
|
-
|
|
543
|
-
|
|
543
|
+
try:
|
|
544
|
+
edges_file = open(edges_file_path)
|
|
545
|
+
except:
|
|
544
546
|
print("Graph.ByCSVPath - Error: the edges file is not a valid file. Returning None.")
|
|
545
547
|
return None
|
|
546
|
-
|
|
547
|
-
|
|
548
|
+
try:
|
|
549
|
+
nodes_file = open(nodes_file_path)
|
|
550
|
+
except:
|
|
548
551
|
print("Graph.ByCSVPath - Error: the nodes file is not a valid file. Returning None.")
|
|
549
552
|
return None
|
|
550
553
|
return Graph.ByCSVFile(graphs_file, edges_file, nodes_file,
|
|
@@ -611,17 +614,17 @@ class Graph:
|
|
|
611
614
|
# Using split by line
|
|
612
615
|
lines = graphs_string.split('\n')[1:-1]
|
|
613
616
|
lines = [l for l in lines if lines != None or lines != ""]
|
|
614
|
-
pd_graphs = pd.DataFrame([row.split(',') for row in lines],
|
|
617
|
+
pd_graphs = pd.DataFrame([row.split(',')[0:3] for row in lines],
|
|
615
618
|
columns=[graph_id_header, graph_label_header, num_nodes_header])
|
|
616
619
|
|
|
617
620
|
lines = edges_string.split('\n')[1:-1]
|
|
618
621
|
lines = [l for l in lines if lines != None or lines != ""]
|
|
619
|
-
edges = pd.DataFrame([row.split(',') for row in lines],
|
|
622
|
+
edges = pd.DataFrame([row.split(',')[0:3] for row in lines],
|
|
620
623
|
columns=[graph_id_header, src_header, dst_header])
|
|
621
624
|
|
|
622
625
|
lines = nodes_string.split('\n')[1:-1]
|
|
623
626
|
lines = [l for l in lines if lines[-1] != None or lines[-1] != ""]
|
|
624
|
-
nodes = pd.DataFrame([row.split(',') for row in lines],
|
|
627
|
+
nodes = pd.DataFrame([row.split(',')[0:5] for row in lines],
|
|
625
628
|
columns=[graph_id_header, node_label_header, node_X_header, node_Y_header, node_Z_header])
|
|
626
629
|
|
|
627
630
|
graphs = []
|
|
@@ -648,7 +651,12 @@ class Graph:
|
|
|
648
651
|
graph_dict["node_features"] = []
|
|
649
652
|
num_nodes = num_nodes_dict[graph_id]
|
|
650
653
|
graph_label = label_dict[graph_id]
|
|
651
|
-
|
|
654
|
+
if graph_label.isnumeric():
|
|
655
|
+
if graph_label.isdecimal():
|
|
656
|
+
graph_label = int(graph_label)
|
|
657
|
+
else:
|
|
658
|
+
graph_label = float(graph_label)
|
|
659
|
+
labels.append(float(graph_label))
|
|
652
660
|
|
|
653
661
|
# Find the nodes and their labels and features
|
|
654
662
|
nodes_of_id = nodes_group.get_group(graph_id)
|
|
@@ -722,9 +730,10 @@ class Graph:
|
|
|
722
730
|
if not path:
|
|
723
731
|
print("Graph.ByDGCNNPath - Error: the input path is not a valid path. Returning None.")
|
|
724
732
|
return None
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
733
|
+
try:
|
|
734
|
+
file = open(path)
|
|
735
|
+
except:
|
|
736
|
+
print("Graph.ByDGCNNPath - Error: the DGCNN file is not a valid file. Returning None.")
|
|
728
737
|
return None
|
|
729
738
|
return Graph.ByDGCNNFile(file, key=key)
|
|
730
739
|
|
topologicpy/Topology.py
CHANGED
|
@@ -1287,9 +1287,10 @@ class Topology():
|
|
|
1287
1287
|
if not path:
|
|
1288
1288
|
print("Topology.ByBREPPath - Error: the input path is not a valid path. Returning None.")
|
|
1289
1289
|
return None
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1290
|
+
try:
|
|
1291
|
+
file = open(path)
|
|
1292
|
+
except:
|
|
1293
|
+
print("Topology.ByBREPPath - Error: the BREP file is not a valid file. Returning None.")
|
|
1293
1294
|
return None
|
|
1294
1295
|
return Topology.ByBREPFile(file)
|
|
1295
1296
|
|
|
@@ -1668,9 +1669,10 @@ class Topology():
|
|
|
1668
1669
|
if not path:
|
|
1669
1670
|
print("Topology.ByJSONPath - Error: the input path is not a valid path. Returning None.")
|
|
1670
1671
|
return None
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1672
|
+
try:
|
|
1673
|
+
file = open(path)
|
|
1674
|
+
except:
|
|
1675
|
+
print("Topology.ByJSONPath - Error: the JSON file is not a valid file. Returning None.")
|
|
1674
1676
|
return None
|
|
1675
1677
|
return Topology.ByJSONFile(file=file, tolerance=tolerance)
|
|
1676
1678
|
|
|
@@ -1959,7 +1961,11 @@ class Topology():
|
|
|
1959
1961
|
if not path:
|
|
1960
1962
|
print("Topology.ByOBJPath - Error: the input path is not a valid path. Returning None.")
|
|
1961
1963
|
return None
|
|
1962
|
-
|
|
1964
|
+
try:
|
|
1965
|
+
file = open(path)
|
|
1966
|
+
except:
|
|
1967
|
+
print("Topology.ByOBJPath - Error: the OBJ file is not a valid file. Returning None.")
|
|
1968
|
+
return None
|
|
1963
1969
|
return Topology.ByOBJFile(file, transposeAxes=transposeAxes, progressBar=progressBar, renderer=renderer, tolerance=tolerance)
|
|
1964
1970
|
|
|
1965
1971
|
@staticmethod
|
|
@@ -2184,7 +2190,11 @@ class Topology():
|
|
|
2184
2190
|
if not path:
|
|
2185
2191
|
print("Topology.ByXYZPath - Error: the input path is not a valid path. Returning None.")
|
|
2186
2192
|
return None
|
|
2187
|
-
|
|
2193
|
+
try:
|
|
2194
|
+
file = open(path)
|
|
2195
|
+
except:
|
|
2196
|
+
print("Topology.ByXYZPath - Error: the XYZ file is not a valid file. Returning None.")
|
|
2197
|
+
return None
|
|
2188
2198
|
return Topology.ByXYZFile(file, frameIdKey=frameIdKey, vertexIdKey=frameIdKey)
|
|
2189
2199
|
|
|
2190
2200
|
@staticmethod
|
topologicpy/__init__.py
CHANGED
|
@@ -2,7 +2,7 @@ import sys
|
|
|
2
2
|
import os, re
|
|
3
3
|
from sys import platform
|
|
4
4
|
|
|
5
|
-
__version__ = '0.4.
|
|
5
|
+
__version__ = '0.4.26'
|
|
6
6
|
__version_info__ = tuple([ int(num) for num in __version__.split('.')])
|
|
7
7
|
|
|
8
8
|
if platform == 'win32':
|
|
@@ -14,7 +14,7 @@ sitePackagesFolderName = os.path.join(os.path.dirname(os.path.realpath(__file__)
|
|
|
14
14
|
test1 = os.path.dirname(os.path.realpath(__file__))
|
|
15
15
|
topologicFolderName = [filename for filename in os.listdir(sitePackagesFolderName) if filename.startswith("topologic")][0]
|
|
16
16
|
topologicPath = os.path.join(sitePackagesFolderName, topologicFolderName)
|
|
17
|
-
sys.path.append(topologicPath)
|
|
17
|
+
sys.path.append(topologicPath.replace(".libs",""))
|
|
18
18
|
|
|
19
19
|
import topologic
|
|
20
20
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: topologicpy
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.26
|
|
4
4
|
Summary: An Advanced Spatial Modelling and Analysis Software Library for Architecture, Engineering, and Construction.
|
|
5
5
|
Author-email: Wassim Jabi <wassim.jabi@gmail.com>
|
|
6
6
|
Project-URL: Homepage, https://github.com/wassimj/TopologicPy
|
|
@@ -4,12 +4,12 @@ topologicpy/CellComplex.py,sha256=b-JBSWJhIEvtxaT8JYj4DnHmJwt4EiqLFe2SpufYmFg,29
|
|
|
4
4
|
topologicpy/Cluster.py,sha256=lmsZhL_dSWCB1MspsB1iOWthLIDaeWWVYHFTRvWmU4k,27935
|
|
5
5
|
topologicpy/Color.py,sha256=MWEXKVdx2OXs2W4GXEeJm-VJ7OnwDo9cmUGRhrJAflw,7914
|
|
6
6
|
topologicpy/Context.py,sha256=cPxfxUScXcJVafSTnCTCNpRzBGSbu90D5i6uu26S5us,1643
|
|
7
|
-
topologicpy/DGL.py,sha256=
|
|
7
|
+
topologicpy/DGL.py,sha256=zYCjYs07ZJ3hNINK9_dsGTlDIwYlUI5o3yHaY_Xvwns,128004
|
|
8
8
|
topologicpy/Dictionary.py,sha256=x92D7ciLUEcIlBWO5O_iHXcr93KvxVw56chsMUSBpjE,18426
|
|
9
9
|
topologicpy/Edge.py,sha256=BdQyYTIkv5bvDq-FsZqfBNAaMBlYxZ3Cvg16jaPG_3o,32540
|
|
10
10
|
topologicpy/EnergyModel.py,sha256=-E1RJB_ZZyF4W_E66MTA1ufMNTp7zfAgRdVkSZshewY,50517
|
|
11
11
|
topologicpy/Face.py,sha256=0hO0y5AyTDJxQBK_dWIZxKw-2Sccy-zhhoTDcrTYCn8,75041
|
|
12
|
-
topologicpy/Graph.py,sha256=
|
|
12
|
+
topologicpy/Graph.py,sha256=hBBZ4IKNiXl2jwtn5VZJUZiUeD1BxQk3_2Y9GgWxWnY,217219
|
|
13
13
|
topologicpy/Grid.py,sha256=rArW8J3vkhWt8dx9NDzCSyu4oMowUpsly7rEhsLPFII,16449
|
|
14
14
|
topologicpy/Helper.py,sha256=MMe2VXvC9qSzzM8NtZ28F6LoG2G_n8lqIGkDTOvip-Q,8267
|
|
15
15
|
topologicpy/Honeybee.py,sha256=Vy8e0Chv2EkzqyNcaK3y4QeSj89yY5pdbE8GZgVQyGw,19153
|
|
@@ -19,11 +19,11 @@ topologicpy/Plotly.py,sha256=bx050YMvTvdGzuvIGcU9u8mRVhUKUMiScsB7KuQofnE,89987
|
|
|
19
19
|
topologicpy/Polyskel.py,sha256=jz5k5H6p4QRWe3bbMnyYbP9Iji6EQ1wdk3qQvcnbg08,15156
|
|
20
20
|
topologicpy/Shell.py,sha256=R7P8VowcwKj1ndN7WCeNUxbcxSWvJHNrQfZ7BbeTCXw,56832
|
|
21
21
|
topologicpy/Speckle.py,sha256=65IHXjuNhHAusy4kPp70wlPF8QueSPJ-85v6dPc0uo4,11548
|
|
22
|
-
topologicpy/Topology.py,sha256=
|
|
22
|
+
topologicpy/Topology.py,sha256=a8qmMu_IQfvrJZejWXA8yaA5ra89mGvZxAKlwl92tsw,257389
|
|
23
23
|
topologicpy/Vector.py,sha256=TE0Rt7SZ4NQD0YR3ty3crhb7BYbRws_UJ-lj2ihxPXU,17988
|
|
24
24
|
topologicpy/Vertex.py,sha256=wHQAgWX5GGbk42VyrCWcSD1ikYO868Kw8SrFEW001Cw,31431
|
|
25
25
|
topologicpy/Wire.py,sha256=Xo0F0bXtxJsT1cTVX-pG0-eDlpnOqwSY99pRhpNdKNI,99555
|
|
26
|
-
topologicpy/__init__.py,sha256=
|
|
26
|
+
topologicpy/__init__.py,sha256=MwQ8fMhrnm9q_KQVOwHvSZafaPDOl65sLXzTOfoUFNc,662
|
|
27
27
|
topologicpy/bin/linux/topologic/__init__.py,sha256=qdj8gyp_GtYre27ZdFiVdLzLViOgX62woBZLTy9K91c,58
|
|
28
28
|
topologicpy/bin/linux/topologic/topologic.cpython-310-x86_64-linux-gnu.so,sha256=uvar01STZ8qu1c8fRmtYdVnK8evxBv305QScASXY9go,1852112
|
|
29
29
|
topologicpy/bin/linux/topologic/topologic.cpython-311-x86_64-linux-gnu.so,sha256=42yjVWetFu_qn6-eZcDxgd_A8SQN_wHqkdw91txKt9U,1852112
|
|
@@ -66,8 +66,8 @@ topologicpy/bin/windows/topologic/topologic.cp310-win_amd64.pyd,sha256=F0sPLuMpD
|
|
|
66
66
|
topologicpy/bin/windows/topologic/topologic.cp311-win_amd64.pyd,sha256=aBAJQj3OmJ58MOAF1ZIFybL_5fFK7FNR9hrIps6b6pc,1551872
|
|
67
67
|
topologicpy/bin/windows/topologic/topologic.cp38-win_amd64.pyd,sha256=aLgNf54nbJmGc7Tdmkuy-V0m6B9zLxabIbpRwAy7cBA,1551360
|
|
68
68
|
topologicpy/bin/windows/topologic/topologic.cp39-win_amd64.pyd,sha256=_8cp205hiRxkFHtzQQOweA4DhCPk8caH4kTVLWGQeVw,1411584
|
|
69
|
-
topologicpy-0.4.
|
|
70
|
-
topologicpy-0.4.
|
|
71
|
-
topologicpy-0.4.
|
|
72
|
-
topologicpy-0.4.
|
|
73
|
-
topologicpy-0.4.
|
|
69
|
+
topologicpy-0.4.26.dist-info/LICENSE,sha256=RUmXeeqj63bBySLJjEfhwb9OE7M8h9K6HuOBF3ASVyI,35697
|
|
70
|
+
topologicpy-0.4.26.dist-info/METADATA,sha256=cGhvrp-vK_LbwwpgbC4Tz-y89EdBjGSToQsOQ00RJnY,6973
|
|
71
|
+
topologicpy-0.4.26.dist-info/WHEEL,sha256=pkctZYzUS4AYVn6dJ-7367OJZivF2e8RA9b_ZBjif18,92
|
|
72
|
+
topologicpy-0.4.26.dist-info/top_level.txt,sha256=J30bDzW92Ob7hw3zA8V34Jlp-vvsfIkGzkr8sqvb4Uw,12
|
|
73
|
+
topologicpy-0.4.26.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|