-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce pre-commit hooks for linting and best practices.
Fixes some linting errors and adds a lot of table descriptions.
- Loading branch information
1 parent
1e3cba9
commit 60b6288
Showing
37 changed files
with
703 additions
and
372 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -11,4 +11,4 @@ venv/ | |
env/ | ||
test.env | ||
__pycache__ | ||
None.yml | ||
None.yml |
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,33 @@ | ||
repos: | ||
- repo: https://github.com/datacoves/pre-commit-dbt | ||
rev: v2.0.0 | ||
hooks: | ||
- id: dbt-compile | ||
- id: check-script-semicolon | ||
files: ^models | ||
- id: check-script-has-no-table-name | ||
files: ^models | ||
- id: unify-column-description | ||
- id: check-column-name-contract | ||
args: [--pattern, "(is|has|do)_.*", --dtype, boolean] | ||
- id: check-model-has-all-columns | ||
name: Check columns - mart | ||
files: ^models/mesa/mart | ||
- id: check-model-has-tests | ||
args: ["--test-cnt", "1", "--"] | ||
- id: check-model-columns-have-desc | ||
files: ^models/mesa/mart | ||
- id: dbt-test | ||
- id: dbt-docs-generate | ||
|
||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.4.0 | ||
hooks: | ||
- id: end-of-file-fixer | ||
exclude: ^.bumpversion.cfg | ||
- id: trailing-whitespace | ||
exclude: ^.bumpversion.cfg | ||
- repo: https://github.com/pre-commit/mirrors-prettier | ||
rev: "v3.0.0-alpha.4" | ||
hooks: | ||
- id: prettier |
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
target/ | ||
dbt_packages/ | ||
macros/ | ||
macros/ |
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
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{%- macro pacific_timestamp(timestamp_str) -%} | ||
{{ dbt_date.convert_timezone(timestamp_str, "America/Los_Angeles", 'UTC') }} | ||
{%- endmacro -%} | ||
{%- endmacro -%} |
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 |
---|---|---|
|
@@ -80,4 +80,4 @@ | |
"editor.quickSuggestions": { | ||
"strings": true | ||
} | ||
} | ||
} |
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
Oops, something went wrong.