Skip to content

Commit 069e753

Browse files
committed
Added more user feedback for exports, more descriptive generator output.
1 parent 77707e9 commit 069e753

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

gitnet/log.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
import pandas as pd
1818
import datetime as dt
19+
import os
1920
import warnings
2021
import copy
2122
import subprocess as sub
@@ -819,8 +820,10 @@ def generate_network(self, mode1, mode2, colours=None, edge_helper=net_edges_sim
819820
graph.node[n]["colour"] = "plum"
820821
else:
821822
graph.node[n]['colour'] = 'lightgrey'
823+
print('Created a MultiGraphPlus network object with {} nodes and {} edges.'.format(graph.number_of_nodes(), graph.number_of_edges()))
822824
return graph
823825

826+
824827
def write_edges(self, fname, mode1, mode2, helper=net_edges_simple, edge_attribute=['weight', 'date']):
825828
"""
826829
Writes an edge list with attributes.
@@ -893,7 +896,7 @@ def write_edges(self, fname, mode1, mode2, helper=net_edges_simple, edge_attribu
893896
f.write("\n")
894897
# Close file and print summary.
895898
f.close()
896-
print("Wrote edgelist with attributes to {}.".format(fname))
899+
print("Wrote edgelist with attributes to {} in {}.".format(fname, os.getcwd()))
897900

898901
def write_nodes(self, fname, mode1, mode2, keep_atom1=[], keep_vector1=[], keep_atom2=[], keep_vector2=[]):
899902
"""
@@ -970,4 +973,4 @@ def write_nodes(self, fname, mode1, mode2, keep_atom1=[], keep_vector1=[], keep_
970973
else:
971974
f.write("\n")
972975
f.close()
973-
print("Wrote node attributes to {}.".format(fname))
976+
print("Wrote node attributes to {} in {}.".format(fname, os.getcwd()))

0 commit comments

Comments
 (0)