Skip to content

Commit

Permalink
remove usage of planarity and clean up reqs file
Browse files Browse the repository at this point in the history
  • Loading branch information
tomvanmele committed Nov 10, 2023
1 parent ba932fc commit 1355219
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
5 changes: 0 additions & 5 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,20 +1,15 @@
# flake8: noqa
cython
# ezdxf
imageio <= 2.6; python_version < '3.5'
imageio >= 2.7; python_version >= '3.5'
jsonschema >= 4.17, < 4.18
# laspy
matplotlib >= 2.2, < 3.0; python_version >= '2.7' and python_version < '3.0'
matplotlib >= 2.2, < 3.1; python_version >= '3.5' and python_version <= '3.7' and sys_platform == 'win32'
matplotlib >= 3.1; python_version >= '3.8' and sys_platform == 'win32'
matplotlib >= 2.2; python_version >= '3.5' and sys_platform != 'win32'
networkx
# numba
numpy >= 1.15.4
pillow
# planarity ; sys_platform != 'win32'
pycollada
schema
scipy >= 1.1
sympy
Expand Down
6 changes: 3 additions & 3 deletions src/compas/datastructures/network/planarity.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,12 +192,12 @@ def network_is_planar(network):
"""
try:
import planarity
import networkx as nx
except ImportError:
print("Planarity is not installed.")
print("NetworkX is not installed. Get NetworkX at https://networkx.github.io/.")
raise

return planarity.is_planar(list(network.edges()))
return nx.is_planar(network.to_networkx())


def network_is_planar_embedding(network):
Expand Down

0 comments on commit 1355219

Please sign in to comment.