Skip to content

Commit dbcafa5

Browse files
committed
Applied black
1 parent c5cb0e7 commit dbcafa5

17 files changed

+1795
-1138
lines changed

grim/grim.py

Lines changed: 25 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -30,29 +30,42 @@
3030
from .imputation.imputegl.networkx_graph import Graph
3131
import os
3232

33-
def graph_freqs(conf_file = "", for_em = False, em_pop=None ):
33+
34+
def graph_freqs(conf_file="", for_em=False, em_pop=None):
3435
if conf_file == "":
35-
conf_file = os.path.dirname(os.path.realpath(__file__)) + '/conf/minimal-configuration.json'
36+
conf_file = (
37+
os.path.dirname(os.path.realpath(__file__))
38+
+ "/conf/minimal-configuration.json"
39+
)
3640

41+
generate_neo4j_multi_hpf.generate_graph(
42+
config_file=conf_file, em_pop=em_pop, em=for_em
43+
)
3744

38-
generate_neo4j_multi_hpf.generate_graph(config_file=conf_file, em_pop=em_pop,
39-
em=for_em)
4045

41-
def impute(conf_file = ""):
46+
def impute(conf_file=""):
4247
project_dir_in_file, project_dir_graph = "", ""
4348
if conf_file == "":
44-
conf_file = os.path.dirname(os.path.realpath(__file__)) + '/conf/minimal-configuration.json'
45-
project_dir_graph = os.path.dirname(os.path.realpath(__file__)) + '/imputation/graph_generation/'
46-
project_dir_in_file = os.path.dirname(os.path.realpath(__file__)) + '/'
49+
conf_file = (
50+
os.path.dirname(os.path.realpath(__file__))
51+
+ "/conf/minimal-configuration.json"
52+
)
53+
project_dir_graph = (
54+
os.path.dirname(os.path.realpath(__file__))
55+
+ "/imputation/graph_generation/"
56+
)
57+
project_dir_in_file = os.path.dirname(os.path.realpath(__file__)) + "/"
4758
runfile.run_impute(conf_file, project_dir_graph, project_dir_in_file)
4859

49-
def impute_instance(config, graph, count_by_prob= None):
60+
61+
def impute_instance(config, graph, count_by_prob=None):
5062
imputation = Imputation(graph, config, count_by_prob)
5163
return imputation
5264

65+
5366
def graph_instance(config):
5467
graph = Graph(config)
55-
graph.build_graph(config["node_file"], config["top_links_file"], config["edges_file"])
68+
graph.build_graph(
69+
config["node_file"], config["top_links_file"], config["edges_file"]
70+
)
5671
return graph
57-
58-

0 commit comments

Comments
 (0)