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

Make printer width configurable #1247

Closed

Conversation

kasanchez
Copy link
Contributor

@kasanchez kasanchez commented Jan 17, 2019

closes #1026

Tests to come.
I'm open to feedback!

Copy link
Contributor

@drewbanin drewbanin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR @kasanchez! This looks really great!

I think there were some unit test failures around pep8 (our coding style guide). I just dropped some comments in indicating where a few more newlines are required.

Overall though, I think this is super slick and will be a great improvement to dbt :). I'm really impressed with the quality of this code and I'm excited to merge it when the tests pass!

Lmk if you need a pointer for where to add tests, happy to help

@@ -130,6 +130,8 @@ def initialize_config_values(parsed):
if cfg.use_colors:
dbt.ui.printer.use_colors()

if cfg.printer_width:
dbt.ui.printer.printer_width(cfg.printer_width)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pep8: can you add an extra newline here (there should be two lines between functions)


def use_colors():
global USE_COLORS
USE_COLORS = True

def printer_width(printer_width):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pep8: can you add an extra newline above and below this function?

@kasanchez
Copy link
Contributor Author

hey @drewbanin thanks for the feedback! I could use a pointer on where to add some tests. I'll update my pr to address the pep8 comments above as well

@drewbanin
Copy link
Contributor

@kasanchez you can make some tiny additions to this function: https://github.com/fishtown-analytics/dbt/blob/dev/stephen-girard/test/unit/test_config.py#L229

I'd try editing the default_profile_data['config'] dict to set a custom printer_width, then add an assertEqual call below to make sure that the value you pass in comes out the other side :)

@drewbanin
Copy link
Contributor

drewbanin commented Mar 26, 2019

@kasanchez what's the happs with this PR? I think we'll want to rebase it against the dev/wilt-chamberlain branch -- let me know if you'd like a hand with it!

The code here all LGTM, but looks like something funky happened with the integration tests :/

@drewbanin
Copy link
Contributor

@kasanchez I merged this over in #1459 with a tiny additional test. I did some git magic to make sure you get credit for the commit -- thanks for your contribution to dbt!!

🎉

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