-
Notifications
You must be signed in to change notification settings - Fork 115
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
Change all pre-commit-dbt references to dbt-checkpoint #107
Change all pre-commit-dbt references to dbt-checkpoint #107
Conversation
…pre-commit-dbt-references-to-dbt-checkpoint
Codecov ReportPatch coverage:
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more Additional details and impacted files@@ Coverage Diff @@
## main #107 +/- ##
==========================================
Coverage 100.00% 100.00%
==========================================
Files 47 47
Lines 2584 2194 -390
Branches 272 272
==========================================
- Hits 2584 2194 -390
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
hooks: | ||
- id: dbt-test | ||
- repo: https://github.com/dbt-checkpoint/dbt-checkpoint | ||
rev: v1.0.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldnt this be 1.1.0?
README.md
Outdated
<p align="center"> | ||
<img src=".github/pre-commit-dbt.png" alt="dbt-pre-commit" width=600/> | ||
<h1 align="center">pre-commit-dbt</h1> | ||
<!-- <img src=".github/pre-commit-dbt.png" alt="dbt-pre-commit" width=600/> --> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can just delete this line
README.md
Outdated
|
||
## Goal | ||
|
||
*Quick ensure the quality of your `dbt` projects*. | ||
[pre-commit](https://pre-commit.com) hooks to ensure the quality of your [dbt](https://www.getdbt.com) projects. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dbt-checkpoint provides pre-commit hooks to help you better govern yourr dbt projects.
README.md
Outdated
|
||
## Goal | ||
|
||
*Quick ensure the quality of your `dbt` projects*. | ||
[pre-commit](https://pre-commit.com) hooks to ensure the quality of your [dbt](https://www.getdbt.com) projects. | ||
|
||
`dbt` is awesome, but when a number of models, sources, and macros grow it starts to be challenging to maintain quality. People often forget to update columns in schema files, add descriptions, or test. Besides, with the growing number of objects, dbt slows down, users stop running models/tests (because they want to deploy the feature quickly), and the demands on reviews increase. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dbt
is awesome, but when the number of models, sources, and macros in a project grows, it becomes challenging to maintain the same level of quality across developers.. Users forget to update columns in property(yml) files or add table and column add descriptions. Without automation the reviewer workload increases and unintentional errors may be missed. dbt-checkpoint allows organizations to add automated validations improving your code review and release process.
README.md
Outdated
|
||
`dbt` is awesome, but when a number of models, sources, and macros grow it starts to be challenging to maintain quality. People often forget to update columns in schema files, add descriptions, or test. Besides, with the growing number of objects, dbt slows down, users stop running models/tests (because they want to deploy the feature quickly), and the demands on reviews increase. | ||
|
||
If this is the case, `pre-commit-dbt` is here to help you! | ||
If this is the case, `dbt-checkpoint` is here to help you! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
delete
README.md
Outdated
|
||
--- | ||
|
||
:exclamation:**If you have an idea for a new hook or you found a bug, [let us know](https://github.com/dbt-checkpoint/dbt-checkpoint/issues/new)**:exclamation: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❗If you have a suggestion for a new hook or you find a bug, let us know❗
README.md
Outdated
## Install | ||
|
||
For detailed installation and usage, instructions see [pre-commit.com](https://pre-commit.com) site. | ||
|
||
``` | ||
pip install pre-commit | ||
``` | ||
|
||
## Setup | ||
|
||
1. Create a file named `.pre-commit-config.yaml` in your `dbt` root folder. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@BAntonellini shouldnt this say in your project's root folder?
README.md
Outdated
|
||
`pre-commit-dbt` for the most of the hooks needs `manifest.json` (see requirements section in hook documentation), that is in the `target` folder. Since this target folder is usually in `.gitignore`, you need to generate it. For that you need to run `dbt-compile` (or `dbt-run`) command. | ||
`dbt-checkpoint` for the most of the hooks needs `manifest.json` (see requirements section in hook documentation), that is in the `target` folder. Since this target folder is usually in `.gitignore`, you need to generate it. For that you need to run `dbt-compile` (or `dbt-run`) command. | ||
To be able to compile dbt, you also need [profiles.yml](https://docs.getdbt.com/dbt-cli/configure-your-profile) file with your credentials. **To provide passwords and secrets use Github Secrets** (see example). | ||
|
||
So you want to e.g. run chach on number of tests: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Say you want to check that a model contains at least two tests, you would use this configuration:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
update rev: v1.0.0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be able to run this in Github actions you need to modified it to:
@@ -185,7 +192,6 @@ jaffle_shop: | |||
|
|||
and store this file in project root `./profiles.yml`. | |||
|
|||
|
|||
### Create new workflow | |||
|
|||
- inside your Github repository create folder `.github/workflows` (unless it already exists). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@BAntonellini this is showing it configured to run only on pushes to main, can you see how we have it in Balboa? maybe we change this to pr.yml and have it run on pr creation on any branch.
No description provided.