File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1111import networkx as nx
1212import pybel
1313
14- from .constants import OUTPUT , METHODS
14+ from .constants import OUTPUT , METHODS , EMOJI
1515from .kernels import regularised_laplacian_kernel
1616
1717logger = logging .getLogger (__name__ )
@@ -60,7 +60,7 @@ def kernel(
6060 logging .basicConfig (level = logging .INFO )
6161 logger .setLevel (logging .INFO )
6262
63- click .echo (f'Loading graph from { network } ' )
63+ click .secho (f'{ EMOJI } Loading graph from { network } { EMOJI } ' )
6464
6565 # TODO Here goes a function that loads a graph using pandas from csv file and returns a networkx object
6666 # Temporary is used the PyBEL import function
@@ -73,7 +73,8 @@ def kernel(
7373 for node in nx .isolates (graph )
7474 })
7575
76- click .echo ("Calculating regulatised Laplacian kernel. This might take a while..." )
76+ click .secho (f'{ EMOJI } Calculating regulatised Laplacian kernel. This might take a while... { EMOJI } ' )
77+
7778
7879 exe_t_0 = time .time ()
7980 background_mat = regularised_laplacian_kernel (graph )
@@ -87,7 +88,7 @@ def kernel(
8788
8889 running_time = exe_t_f - exe_t_0
8990
90- click .echo (f'Kernel exported to: { output_file } in { running_time } seconds" ' )
91+ click .secho (f'{ EMOJI } Kernel exported to: { output_file } in { running_time } seconds { EMOJI } ' )
9192
9293
9394@main .command ()
Original file line number Diff line number Diff line change @@ -17,19 +17,17 @@ def ensure_output_dirs():
1717
1818ensure_output_dirs ()
1919
20- # TODO: Change to a dictionary where keys are better explanatory terms of each methode.
21- # ANSWER: The explanation is long and tedious, it is on diffuse.py header documentation.
22- # Should I provide it here too?
23-
2420# Available methods for diffusion, as a character vector
2521# Check diffuse docs for the detailed explanation of each
2622
23+ EMOJI = "🌐"
24+
2725METHODS = {
2826 "raw" ,
2927 "ml" ,
3028 "gm" ,
3129 "mc" ,
3230 "z" ,
3331 "ber_s" ,
34- "ber_p"
32+ "ber_p" ,
3533}
You can’t perform that action at this time.
0 commit comments