Commit 76ee1598 authored by Yannick Chudy's avatar Yannick Chudy

limit 300 nodes when import viz

parent 43a1e8cd
......@@ -377,15 +377,14 @@ def botimport(repo, padurl, gid, content_type):
if graph.vcount() > 300 :
full = args.get("full" , "" ) == 1
if graph.vcount() > 300 and not full:
LENMIN = graph.vcount() / 100 - 5
LENMIN = 10
vfilter = lambda v : False
subgraph = ProxSubgraph() | RemoveNotConnected() | GenericVertexFilter(vfilter) # | composable()
#for v in graph.vs : print vfilter(v)
subgraph = ProxSubgraph() | GenericVertexFilter(vfilter)
length = int(args.get("length" , 3 ) )
cut = int(args.get("cut" , 50 ) )
......@@ -393,10 +392,12 @@ def botimport(repo, padurl, gid, content_type):
addloops = int(args.get("addloops" , 1 )) == 1
pzeros = args.get("pz" , "" )
pzeros = [] if not len(pzeros) else [int(e) for e in pzeros.split(',')]
print pzeros , graph.summary()
graph = subgraph(graph, length=length, cut=cut, pzeros=pzeros, add_loops=addloops, mode=mode)
print LENMIN , graph.summary()
graph = prepare_graph(graph)
data = export_graph(graph, id_attribute='uuid')
complete = True
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment