Skip to content
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

Merged
merged 14 commits into from
May 23, 2017
Merged

colorized dbt output #441

merged 14 commits into from
May 23, 2017

Conversation

drewbanin
Copy link
Contributor

@drewbanin drewbanin commented May 22, 2017

TODO:

  • Test on windows
  • Add option to turn this off?

@drewbanin drewbanin requested a review from cmcarthur May 23, 2017 00:48
Copy link
Member

@cmcarthur cmcarthur left a 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)
Copy link
Member

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
Copy link
Member

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)
Copy link
Member

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)
Copy link
Member

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

@drewbanin drewbanin changed the title Crayola colorized dbt output May 23, 2017
@drewbanin drewbanin modified the milestone: 0.8.2 Release May 23, 2017
@cmcarthur
Copy link
Member

:shipit: !!

@drewbanin drewbanin merged commit dfb24fd into development May 23, 2017
@drewbanin drewbanin deleted the crayola branch May 23, 2017 18:52
@drewbanin
Copy link
Contributor Author

fixes #357

iknox-fa pushed a commit that referenced this pull request Feb 8, 2022
colorize dbt output

automatic commit by git-black, original commits:
  dfb24fd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants