-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement CLI entrypoint: * Add lint command
- Loading branch information
1 parent
cba523e
commit 7647ddf
Showing
4 changed files
with
68 additions
and
70 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
"""Entry point of the dbt_score. | ||
This enables module to be run directly. | ||
""" | ||
|
||
from dbt_score.cli import cli | ||
|
||
if __name__ == "__main__": | ||
cli() |
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,34 @@ | ||
"""CLI interface.""" | ||
|
||
from typing import Final | ||
|
||
import click | ||
from dbt.cli.options import MultiOption | ||
|
||
BANNER: Final[str] = r""" | ||
__ __ __ | ||
____/ // /_ / /_ _____ _____ ____ _____ ___ | ||
/ __ // __ \ / __/______ / ___// ___// __ \ / ___// _ \ | ||
/ /_/ // /_/ // /_ /_____/(__ )/ /__ / /_/ // / / __/ | ||
\__,_//_.___/ \__/ /____/ \___/ \____//_/ \___/ | ||
""" | ||
|
||
|
||
@click.version_option(message="%(version)s") | ||
@click.group(help=f"\b{BANNER}", invoke_without_command=False) | ||
def cli() -> None: | ||
"""CLI entrypoint.""" | ||
|
||
|
||
@cli.command() | ||
@click.option( | ||
"--select", | ||
"-s", | ||
help="Specify the nodes to include.", | ||
cls=MultiOption, | ||
type=tuple, | ||
multiple=True, | ||
) | ||
def lint(select: tuple[str]) -> None: | ||
"""Lint dbt models metadata.""" | ||
raise NotImplementedError() |