Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
23 changed files
with
117 additions
and
325 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,3 +8,4 @@ __tmp__ | |
.mypy_cache | ||
*.egg-info | ||
.eggs | ||
.coverage |
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,11 @@ | ||
exclude .gitignore | ||
exclude .coverage | ||
exclude .travis.yml | ||
include README.md | ||
include setup.cfg | ||
prune .cache | ||
prune .git | ||
prune build | ||
prune dist | ||
recursive-exclude *.egg-info * | ||
recursive-include tests * |
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
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
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 @@ | ||
__version__ = '0.1.0' |
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,41 @@ | ||
#!/usr/bin/env python3 | ||
|
||
import sys | ||
import argparse | ||
import logging | ||
|
||
from draco.run import run | ||
from draco import __version__ | ||
|
||
logging.basicConfig(level=logging.INFO) | ||
logger = logging.getLogger(__name__) | ||
|
||
|
||
def main(): | ||
parser = argparse.ArgumentParser(description="Draco Visualization recommendation system.", | ||
epilog="There is a moment in every dawn when light floats, there is the possibility of magic. Creation holds its breath.") | ||
|
||
parser.add_argument("query", nargs="?", type=argparse.FileType("r"), default=sys.stdin, | ||
help="The CompassQL query (partial Vega-Lite spec).") | ||
parser.add_argument("--out", nargs="?", type=argparse.FileType("w"), default=sys.stdout, | ||
help="specify the Vega-Lite output file") | ||
parser.add_argument('--version', action='version', | ||
version=__version__) | ||
args = parser.parse_args() | ||
|
||
logger.info(f"Processing query: {args.query.name} ...") | ||
|
||
run(args.query, args.out) | ||
|
||
# close open files | ||
if args.query is not sys.stdin: | ||
args.query.close() | ||
|
||
if args.out is not sys.stdout: | ||
args.out.close() | ||
|
||
logger.info(f"Complete task.") | ||
|
||
|
||
if __name__ == '__main__': | ||
main() |
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 |
---|---|---|
@@ -1,5 +1,3 @@ | ||
#!/usr/bin/env python3 | ||
|
||
import csv | ||
import agate | ||
import json | ||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.