-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
colorized dbt output #441
colorized dbt output #441
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is really close
dbt/config.py
Outdated
|
||
return True | ||
def send_anonymous_usage_stats(config): | ||
return config.get('send_anonymous_usage_stats', True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@drewbanin I'm not sure this works. There are some unit test failures in circle & appveyor
dbt/runner.py
Outdated
@@ -19,15 +17,17 @@ | |||
import dbt.schema | |||
import dbt.graph.selector | |||
import dbt.model | |||
import dbt.printer as printer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you change this file to use the globally qualified name?
dbt/printer.py
Outdated
stats_line = "Done. PASS={pass} ERROR={error} SKIP={skip} TOTAL={total}" | ||
stats_line = stats_line.format(**stats) | ||
|
||
return "{}\n{}".format(message, stats_line) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
love that all this got pulled out of runner
dbt/printer.py
Outdated
|
||
def color(text, color_code): | ||
if USE_COLORS: | ||
return "{}{}{}".format(color_code, text, colorama.Style.RESET_ALL) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@drewbanin is it possible to create an enumeration of available colors here, like:
RED_FOREGROUND = colorama.Fore.RED
GREEN_FOREGROUND = colorama.Fore.GREEN
YELLOW_FOREGROUND = colorama.Fore.YELLOW
...
and then reference those constants directly?
I'm thinking that would make it easy to override the colors when using dbt as a library
!! |
fixes #357 |
colorize dbt output automatic commit by git-black, original commits: dfb24fd
TODO: