-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Output metadata from the pipeline, then gather it in the run_all scri…
…pt to make a table. #33
- Loading branch information
1 parent
ec42039
commit 983ed9c
Showing
3 changed files
with
49 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import json | ||
import sys | ||
# This has a dependency on `pip install py-markdown-table` | ||
from markdownTable import markdownTable | ||
|
||
rows = [] | ||
for arg in sys.argv[1:]: | ||
with open(arg) as f: | ||
data = json.load(f) | ||
# TODO Pipeline runtime | ||
# TODO Just for routing | ||
# TODO Just for tippecanoe | ||
# TODO Prettyprint numbers | ||
rows.append({ | ||
"name": arg.split("/")[0], | ||
"num_requests": data["num_requests"], | ||
"num_edges_with_count": data["num_edges_with_count"], | ||
}) | ||
|
||
# Print as a Markdown table for convenience | ||
with open("md_table", "w") as f: | ||
f.write(markdownTable(rows).setParams(row_sep="markdown", quote=False).getMarkdown()) |