Skip to content

Commit e49e80f

Browse files
committed
print traces and warnings disabled to clean stdout
1 parent 09d8b90 commit e49e80f

File tree

6 files changed

+19
-12
lines changed

6 files changed

+19
-12
lines changed

pyjviz/fstriplestore.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,6 @@ def dump_triple(self, s, p, o):
9898

9999

100100
def set_triple_store__(o):
101-
print("setting up triple_store:", o)
101+
#print("setting up triple_store:", o)
102102
global triple_store
103103
triple_store = o

pyjviz/method_call.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def add_args_l_entry__(self, arg_name, arg_obj):
3131
self.args_l.append((arg_name, arg_obj))
3232
elif isinstance(arg_obj, pd.DataFrame) or isinstance(arg_obj, pd.Series):
3333
arg_obj_id, found = obj_tracking.get_tracking_obj(arg_obj)
34-
print("arg id:", id(arg_obj), found)
34+
#print("arg id:", id(arg_obj), found)
3535
if found:
3636
arg_obj_state = arg_obj_id.last_obj_state
3737
else:
@@ -87,7 +87,8 @@ def handle_start_method_call(self, method_name, method_signature, method_args, m
8787
for arg_name in args_w_specified_values:
8888
arg_value = self.method_bound_args.arguments.get(arg_name)
8989
arg_kind = method_signature.parameters.get(arg_name).kind
90-
print(method_name, arg_name, arg_kind)
90+
91+
#print(method_name, arg_name, arg_kind)
9192
if arg_kind == inspect.Parameter.VAR_KEYWORD:
9293
# case for lambda args of assign
9394
updates_d = {}

pyjviz/nb_utils.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
1+
import warnings
12
import graphviz
23
from bs4 import BeautifulSoup
34
from IPython.display import display, HTML
45

56
from . import viz_nodes
67

8+
warnings.filterwarnings("ignore", category = DeprecationWarning)
9+
710
def replace_a_href_with_onclick(output):
811
soup = BeautifulSoup(output, features="xml")
912

@@ -12,7 +15,7 @@ def replace_a_href_with_onclick(output):
1215
on_click_code = on_click_code.replace('javascript:', '')
1316
# NB: really bad way to do string replacement, quadratic complexity for overall code execution
1417
for k, v in viz_nodes.big_strings_table.items():
15-
print("replace", k)
18+
#print("replace", k)
1619
on_click_code = on_click_code.replace(f'%%{k}%%', v)
1720
a_tag.parent.attrs['onclick'] = on_click_code
1821
a_tag.parent.attrs['cursor'] = 'pointer'

pyjviz/obj_utils.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ def incr_version(self):
3939

4040
class ObjState(dia_objs.DiagramObj):
4141
def __init__(self, obj, obj_id):
42-
print("ObjState ctor", id(obj), obj_id)
4342
self.obj = obj
4443
self.back = obj_utils_rdf.ObjStateRDF(self)
4544
self.obj_id = obj_id

pyjviz/pf_pandas.py

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import warnings
12
import pandas as pd
23
import pandas_flavor as pf
34
import pandas_flavor.register
@@ -7,6 +8,7 @@
78
from . import wb_stack
89
from . import method_call
910

11+
warnings.filterwarnings("ignore", category = UserWarning)
1012

1113
class DataFrameFunc:
1214
def __init__(self, func_name, func):
@@ -95,18 +97,21 @@ def pin(s: pd.Series, output_type="head"):
9597
def pin(df: pd.DataFrame, output_type="head"):
9698
return df
9799

98-
old_describe = pd.DataFrame.describe
99-
# del pd.DataFrame.describe
100+
if 0:
101+
old_describe = pd.DataFrame.describe
102+
# del pd.DataFrame.describe
100103

101-
@pf.register_dataframe_method
102-
def describe(df: pd.DataFrame) -> pd.DataFrame:
103-
print("override describe")
104-
return old_describe(df)
104+
@pf.register_dataframe_method
105+
def describe(df: pd.DataFrame) -> pd.DataFrame:
106+
print("override describe")
107+
return old_describe(df)
105108

106109
old_dropna = pd.DataFrame.dropna
107110
del pd.DataFrame.dropna
111+
108112
old_drop = pd.DataFrame.drop
109113
del pd.DataFrame.drop
114+
110115
old_rename = pd.DataFrame.rename
111116
del pd.DataFrame.rename
112117
old_assign = pd.DataFrame.assign

pyjviz/viz_nodes.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@ def __init__(self, g, obj_state, popup_output):
104104
self.href = ""
105105

106106
def build_label(self):
107-
print("obj_state:", self.obj_state)
108107
obj_state_rq = """
109108
select ?obj_type ?version {
110109
?obj_state <obj> ?obj; <version> ?version.

0 commit comments

Comments
 (0)