Skip to content

Commit

Permalink
dbt docs generate works with click (dbt-labs#6681)
Browse files Browse the repository at this point in the history
  • Loading branch information
MichelleArk authored Jan 20, 2023
1 parent 9823a56 commit a0ade13
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .changes/unreleased/Under the Hood-20230119-211040.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: Under the Hood
body: dbt docs generate works with new click framework
time: 2023-01-19T21:10:40.698851-05:00
custom:
Author: michelleark
Issue: "5543"
11 changes: 9 additions & 2 deletions core/dbt/cli/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
from dbt.task.freshness import FreshnessTask
from dbt.task.run_operation import RunOperationTask
from dbt.task.build import BuildTask
from dbt.task.generate import GenerateTask


# CLI invocation
Expand Down Expand Up @@ -175,10 +176,16 @@ def docs(ctx, **kwargs):
@p.vars
@p.version_check
@requires.preflight
@requires.profile
@requires.project
def docs_generate(ctx, **kwargs):
"""Generate the documentation website for your project"""
click.echo(f"`{inspect.stack()[0][3]}` called\n flags: {ctx.obj['flags']}")
return None, True
config = RuntimeConfig.from_parts(ctx.obj["project"], ctx.obj["profile"], ctx.obj["flags"])
task = GenerateTask(ctx.obj["flags"], config)

results = task.run()
success = task.interpret_results(results)
return results, success


# dbt docs serve
Expand Down

0 comments on commit a0ade13

Please sign in to comment.