Skip to content

Commit 1355219

Browse files
committed
remove usage of planarity and clean up reqs file
1 parent ba932fc commit 1355219

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

requirements.txt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,15 @@
11
# flake8: noqa
2-
cython
32
# ezdxf
43
imageio <= 2.6; python_version < '3.5'
54
imageio >= 2.7; python_version >= '3.5'
65
jsonschema >= 4.17, < 4.18
7-
# laspy
86
matplotlib >= 2.2, < 3.0; python_version >= '2.7' and python_version < '3.0'
97
matplotlib >= 2.2, < 3.1; python_version >= '3.5' and python_version <= '3.7' and sys_platform == 'win32'
108
matplotlib >= 3.1; python_version >= '3.8' and sys_platform == 'win32'
119
matplotlib >= 2.2; python_version >= '3.5' and sys_platform != 'win32'
1210
networkx
13-
# numba
1411
numpy >= 1.15.4
1512
pillow
16-
# planarity ; sys_platform != 'win32'
17-
pycollada
1813
schema
1914
scipy >= 1.1
2015
sympy

src/compas/datastructures/network/planarity.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -192,12 +192,12 @@ def network_is_planar(network):
192192
193193
"""
194194
try:
195-
import planarity
195+
import networkx as nx
196196
except ImportError:
197-
print("Planarity is not installed.")
197+
print("NetworkX is not installed. Get NetworkX at https://networkx.github.io/.")
198198
raise
199199

200-
return planarity.is_planar(list(network.edges()))
200+
return nx.is_planar(network.to_networkx())
201201

202202

203203
def network_is_planar_embedding(network):

0 commit comments

Comments
 (0)