From 82e996fcafbb0bb6c16d21a7733bf42dba6b1a24 Mon Sep 17 00:00:00 2001 From: Remi Rampin Date: Wed, 4 Nov 2020 15:35:53 -0500 Subject: [PATCH 1/4] Remove .DS_Store file --- DataProfileViewer/.DS_Store | Bin 8196 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 DataProfileViewer/.DS_Store diff --git a/DataProfileViewer/.DS_Store b/DataProfileViewer/.DS_Store deleted file mode 100644 index 0ce4e7f6a0dca6c93d0038b6fa5b51ef9ef1aba9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8196 zcmeHMT}&NC6g~%N+1-{hAcf_E^(ta1g%(N`sBOLcSxBv*m%p~?W$)d!Y+QEf-MyCr z(qP)hrpEuM(HLW5BK5^YO^gq|S)(sT5~~ls81=yyUwtroW@jL@lm}nbgq>vPo1Jsc zotbaG-O1St0N9-~TLE+cQ0U^wc2ISj!tMOpPzq#E5g}4Mq-Xt^wBx1e{>u&CQAfl; z#6ZMA#6ZMA#K8Z70XnmJQ8qdEg*B=p1|kNwBm?~Y5T}b{LgJFZ@YO+8m;w;;6d)|r zX1qZdmza>aB#n^k%!goNM~w?<9pmQB+k; zF@0g7y`{4$-rCx^*c4yrY-?+ZceJ-HE~-jZee1D-$?3WIg=ZEoz9!a$^1T41x2*B? z^$T?Te2@4*QIK6-;EmMxk#me(E@4=bC_FR9|%KC&UR_fDQ2Qr>Jl(o2h zEaN%3Y1dD&vW($ma*h#LU5=Bq=PiFcur36=b;kFyK~LzIVl3xdk6Ywt=dE7y_Q!4d zIqt?#UEaAnc2`|P^P%>mT`MKKN|{!!RgC3r-%dN$$gFJ!Q>P6-W4Wg7o;yQSxq0Jxx>g%dkmyA3Lt=Px6r;G5la~#&T&^*X8itG^^9x)@7P}PD)*(LF}tq zmuQhYtUxs!po6I&CcuIjxCB?=Dm({oz`Jk_K7`NU3%Cwn!PoE&`~W|}&+rTU3ctgj z@D~CiYFLR?sN>yuA2#4VY{WL~z$5q|9>qR9iKp;U9K>;)#588m#A(dq9M0ncUd9*k zWqbu+#kcW&T*hno0e+01h_y zm=y`@QSG=wI%V5es;l(MM3<&9;Lnr#j|BG)EW@WHwr}AE{76FkjYReb39J~)LV?v_ zE$+d+B(g@_kInc1wqqv=tp|HaXeV$8AHyUL<0z)2*erC>!}FNM02lEhF5$Cy39sN) zd>&sQ@x6p^;#)#jYjW$CI+K9!t(RLqnROk{Jx6`3^1RtSy4!jT6pAJ5Jpb?8{QLjb zBPLpL#K0C}0E>E)z1_6n&5j11YscxDq>C5sw|N4i3===|PkE*TBz~6nsyc+-j From 5581e5c53b026c003400003dff9cbfeab58c5159 Mon Sep 17 00:00:00 2001 From: Remi Rampin Date: Wed, 4 Nov 2020 15:37:11 -0500 Subject: [PATCH 2/4] Remove unnecessary dependencies --- DataProfileViewer/_plot_metadata_table.py | 6 +----- setup.py | 5 ----- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/DataProfileViewer/_plot_metadata_table.py b/DataProfileViewer/_plot_metadata_table.py index e2a7626c5..8f4622e92 100644 --- a/DataProfileViewer/_plot_metadata_table.py +++ b/DataProfileViewer/_plot_metadata_table.py @@ -1,11 +1,7 @@ import pkg_resources import string -import numpy as np -from dateutil.parser import parse import json -import networkx as nx from ._comm_api import setup_comm_api -from collections import defaultdict import copy import random import datamart_profiler @@ -40,7 +36,7 @@ def id_generator(size=15): """Helper function to generate random div ids. This is useful for embedding HTML into ipython notebooks.""" chars = list(string.ascii_uppercase) - return ''.join(np.random.choice(chars, size, replace=True)) + return ''.join(random.choices(chars, k=size)) def make_html(data_dict, id): diff --git a/setup.py b/setup.py index daabd412e..992d2ffb3 100644 --- a/setup.py +++ b/setup.py @@ -21,11 +21,6 @@ ], python_requires='>=3.6', install_requires=[ - "python-dateutil", - "numpy", - "scipy", - "scikit-learn", - "networkx", "notebook", "datamart-profiler>=0.8", "pandas" From 8095b9170df043abeb866ad05e4e7656c8855e7d Mon Sep 17 00:00:00 2001 From: Remi Rampin Date: Wed, 4 Nov 2020 15:38:22 -0500 Subject: [PATCH 3/4] Fix use of tabs --- DataProfileViewer/_plot_metadata_table.py | 76 +++++++++++------------ DataProfileViewer/js/index.tsx | 12 ++-- 2 files changed, 44 insertions(+), 44 deletions(-) diff --git a/DataProfileViewer/_plot_metadata_table.py b/DataProfileViewer/_plot_metadata_table.py index 8f4622e92..846d61f22 100644 --- a/DataProfileViewer/_plot_metadata_table.py +++ b/DataProfileViewer/_plot_metadata_table.py @@ -40,46 +40,46 @@ def id_generator(size=15): def make_html(data_dict, id): - lib_path = pkg_resources.resource_filename(__name__, "build/dataProfileVis.js") - bundle = open(lib_path, "r", encoding="utf8").read() - html_all = """ - - - - - -
-
- - - - """.format(bundle=bundle, id=id, data_dict=json.dumps(data_dict)) - return html_all + lib_path = pkg_resources.resource_filename(__name__, "build/dataProfileVis.js") + bundle = open(lib_path, "r", encoding="utf8").read() + html_all = """ + + + + + +
+
+ + + + """.format(bundle=bundle, id=id, data_dict=json.dumps(data_dict)) + return html_all def edit_profiler_make_html(data_dict, id): - lib_path = pkg_resources.resource_filename(__name__, "build/dataProfileVis.js") - bundle = open(lib_path, "r", encoding="utf8").read() - html_all = """ - - - - - -
-
- - - - """.format(bundle=bundle, id=id, data_dict=json.dumps(data_dict)) - return html_all + lib_path = pkg_resources.resource_filename(__name__, "build/dataProfileVis.js") + bundle = open(lib_path, "r", encoding="utf8").read() + html_all = """ + + + + + +
+
+ + + + """.format(bundle=bundle, id=id, data_dict=json.dumps(data_dict)) + return html_all def getSample(text): df = pandas.read_csv(StringIO(text)) diff --git a/DataProfileViewer/js/index.tsx b/DataProfileViewer/js/index.tsx index ae3bac074..e27ca79ae 100644 --- a/DataProfileViewer/js/index.tsx +++ b/DataProfileViewer/js/index.tsx @@ -6,13 +6,13 @@ import {EditProfilerView} from './EditProfilerView/EditProfilerView'; import "regenerator-runtime/runtime"; export function renderProfilerViewBundle(divName, data){ - ReactDOM.render( - - , select(divName).node()); + ReactDOM.render( + + , select(divName).node()); } export function renderEditProfilerViewBundle(divName, data){ - ReactDOM.render( - - , select(divName).node()); + ReactDOM.render( + + , select(divName).node()); } \ No newline at end of file From 7f9119e034bcf2b0d603d6cb09d38a90303f92ef Mon Sep 17 00:00:00 2001 From: Remi Rampin Date: Wed, 4 Nov 2020 15:57:49 -0500 Subject: [PATCH 4/4] Remove unused parameters --- DataProfileViewer/_plot_metadata_table.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DataProfileViewer/_plot_metadata_table.py b/DataProfileViewer/_plot_metadata_table.py index 846d61f22..52efc3cc4 100644 --- a/DataProfileViewer/_plot_metadata_table.py +++ b/DataProfileViewer/_plot_metadata_table.py @@ -86,7 +86,7 @@ def getSample(text): result = [df.columns.values.tolist()] + df.values.tolist() return result -def prepare_data_profiler(metadata, enet_alpha=0.001, enet_l1=0.1): +def prepare_data_profiler(metadata): metadata = copy.deepcopy(metadata) metadataJSON = {