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

Change all pre-commit-dbt references to dbt-checkpoint #107

Merged
merged 8 commits into from
Mar 15, 2023

Conversation

BAntonellini
Copy link
Collaborator

No description provided.

@codecov-commenter
Copy link

codecov-commenter commented Mar 14, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (806dd18) 100.00% compared to head (7b2dd61) 100.00%.

📣 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     
Impacted Files Coverage Δ
dbt_checkpoint/__init__.py 100.00% <ø> (ø)
dbt_checkpoint/utils.py 100.00% <ø> (ø)
dbt_checkpoint/check_column_desc_are_same.py 100.00% <100.00%> (ø)
dbt_checkpoint/check_column_name_contract.py 100.00% <100.00%> (ø)
dbt_checkpoint/check_macro_arguments_have_desc.py 100.00% <100.00%> (ø)
dbt_checkpoint/check_macro_has_description.py 100.00% <100.00%> (ø)
dbt_checkpoint/check_model_columns_have_desc.py 100.00% <100.00%> (ø)
dbt_checkpoint/check_model_has_all_columns.py 100.00% <100.00%> (ø)
dbt_checkpoint/check_model_has_description.py 100.00% <100.00%> (ø)
dbt_checkpoint/check_model_has_meta_keys.py 100.00% <100.00%> (ø)
... and 37 more

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.
📢 Do you have feedback about the report comment? Let us know in this issue.

hooks:
- id: dbt-test
- repo: https://github.com/dbt-checkpoint/dbt-checkpoint
rev: v1.0.0
Copy link
Collaborator

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/> -->
Copy link
Collaborator

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.
Copy link
Collaborator

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.
Copy link
Collaborator

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!
Copy link
Collaborator

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:
Copy link
Collaborator

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.
Copy link
Collaborator

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:
Copy link
Collaborator

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:

Copy link
Collaborator

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

Copy link
Collaborator

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).
Copy link
Collaborator

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.

@BAntonellini BAntonellini requested a review from noel March 15, 2023 13:23
@BAntonellini BAntonellini merged commit 8e2c5e1 into main Mar 15, 2023
@BAntonellini BAntonellini deleted the pre-commit-dbt-references-to-dbt-checkpoint branch March 15, 2023 14:49
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.

None yet

3 participants