Skip to content

Commit f399830

Browse files
committed
updating interactive visualization
1 parent 3d73a32 commit f399830

File tree

3 files changed

+528
-296
lines changed

3 files changed

+528
-296
lines changed

examples/singularity_hub/compare_builds.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
from glob import glob
99
import os
10+
import json
1011
import pandas
1112
import pickle
1213
import shutil
@@ -217,14 +218,18 @@ def get_top_os(x):
217218
make_interactive_tree
218219
)
219220

221+
from singularity.views.utils import get_template
222+
220223
# Static
221224
labels = ['-'.join(x.split('-')[1:-1]) for x in diffs.index.tolist()]
222225
fig = make_package_tree(matrix=diffs,labels=labels,title="Singularity Hub Replication Scores")
223226
fig.savefig('%s/replicate_hubdiffs_dfs.png' %base)
224227

225228
# Interactive tree
226229
tree = make_interactive_tree(matrix=diffs,labels=labels)
227-
230+
fields = {"{{ graph | safe }}",json.dumps(tree)}
231+
template = get_template("comparison_tree",fields)
232+
write_file('%s/index.html' %base,template)
228233

229234
#############################################################################
230235
# Task 3: Assess levels of reproducibility

0 commit comments

Comments
 (0)