Skip to content

Commit

Permalink
Merge pull request #5 from finn-auto/DP-2787/upgrade-dbt-checkpoint-v…
Browse files Browse the repository at this point in the history
…ersion

Dp 2787/upgrade dbt checkpoint version
  • Loading branch information
ShahbalKhan authored Jul 11, 2024
2 parents bbbb869 + 7fafe52 commit 9217361
Show file tree
Hide file tree
Showing 41 changed files with 1,972 additions and 246 deletions.
2 changes: 1 addition & 1 deletion .github/.pre-commit-config-action.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/dbt-checkpoint/dbt-checkpoint
rev: v1.1.0
rev: v1.2.0
hooks:
- id: dbt-test

29 changes: 22 additions & 7 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ jobs:
- "ubuntu-py37"
- "ubuntu-py38"
- "ubuntu-py39"
- "ubuntu-py310"
- "ubuntu-py311"
- "ubuntu-py312"
include:
- name: "ubuntu-py37"
python: "3.7"
Expand All @@ -31,11 +34,23 @@ jobs:
python: "3.9"
os: ubuntu-latest
tox_env: "py39"
- name: "ubuntu-py310"
python: "3.10"
os: ubuntu-latest
tox_env: "py310"
- name: "ubuntu-py311"
python: "3.11"
os: ubuntu-latest
tox_env: "py311"
- name: "ubuntu-py312"
python: "3.12"
os: ubuntu-latest
tox_env: "py312"

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v1
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Install dependencies
Expand All @@ -47,7 +62,7 @@ jobs:
- name: Test build with coverage
run: "tox -e cov-report"
- name: Send coverage report to codecov
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v4
with:
file: ./coverage.xml

Expand All @@ -56,8 +71,8 @@ jobs:
runs-on: "ubuntu-latest"

steps:
- uses: "actions/checkout@v2"
- uses: "actions/setup-python@v2"
- uses: "actions/checkout@v4"
- uses: "actions/setup-python@v5"
with:
python-version: "3.8"

Expand All @@ -81,8 +96,8 @@ jobs:
runs-on: "${{ matrix.os }}"

steps:
- uses: "actions/checkout@v2"
- uses: "actions/setup-python@v2"
- uses: "actions/checkout@v4"
- uses: "actions/setup-python@v5"
with:
python-version: "3.8"
- name: "Install in dev mode"
Expand Down
59 changes: 54 additions & 5 deletions .pre-commit-hooks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,18 @@
entry: check-model-has-all-columns
language: python
types_or: [sql, yaml]
- id: check-model-has-contract
name: Check model has contract
description: Check model has contract enforced = True
entry: check-model-has-contract
language: python
types_or: [yaml]
- id: check-model-has-constraints
name: Check model has constraints
description: Check model has constraints for specific columns
entry: check-model-has-constraints
language: python
types_or: [yaml]
- id: check-model-has-description
name: Check the model has description
description: Ensures that the model has description in properties file.
Expand Down Expand Up @@ -65,7 +77,7 @@
language: python
types_or: [sql, yaml]
- id: check-model-has-tests-by-group
name: Check the model has a number of tests from a group of tests.
name: Check model; number of tests from group of tests.
description: Ensures that the model has a number of tests from a group of tests.
entry: check-model-has-tests-by-group
language: python
Expand Down Expand Up @@ -95,12 +107,12 @@
language: python
types_or: [sql]
- id: check-model-parents-schema
name: Check parent models or sources are from certain schema
name: Check parent models/sources from certain schema
entry: check-model-parents-schema
language: python
types_or: [yaml, sql]
- id: check-model-parents-database
name: Check parent models or sources are from certain database
name: Check parent models/sources from certain database
entry: check-model-parents-database
language: python
types_or: [sql, yaml]
Expand Down Expand Up @@ -141,7 +153,7 @@
language: python
types_or: [sql]
- id: check-source-childs
name: Check the source has a specific number (max/min) of childs.
name: Check the source has max/min number of childs.
description: Ensures the source has a specific number (max/min) of childs.
entry: check-source-childs
language: python
Expand All @@ -153,7 +165,7 @@
language: python
types_or: [yaml]
- id: check-source-has-all-columns
name: Check the source has all columns in the properties file
name: Check source has all columns in properties file
description: Ensures that all columns in the database are specified in the properties file.
entry: check-source-has-all-columns
language: python
Expand Down Expand Up @@ -243,6 +255,13 @@
entry: dbt-docs-generate
language: python
pass_filenames: false
- id: dbt-parse
name: dbt parse
description: Generates manifest.json from source model, test, and analysis files.
entry: dbt-parse
language: python
types_or: [yaml, sql]
pass_filenames: false
- id: dbt-run
name: dbt run
description: Executes compiled sql model files.
Expand Down Expand Up @@ -318,3 +337,33 @@
entry: check-model-materialization-by-childs
language: python
types_or: [sql]
- id: check-exposure-has-meta-keys
name: Check the exposure has keys in the meta part
description: Ensures that the exposure has a list of valid meta keys.
entry: check-exposure-has-meta-keys
language: python
types_or: [yaml]
- id: check-macro-has-meta-keys
name: Check the macro has keys in the meta part
description: Ensures that the macro has a list of valid meta keys.
entry: check-macro-has-meta-keys
language: python
types_or: [yaml]
- id: check-seed-has-meta-keys
name: Check the seed has keys in the meta part
description: Ensures that the seed has a list of valid meta keys.
entry: check-seed-has-meta-keys
language: python
types_or: [yaml]
- id: check-snapshot-has-meta-keys
name: Check the snapshot has keys in the meta part
description: Ensures that the snapshot has a list of valid meta keys.
entry: check-snapshot-has-meta-keys
language: python
types_or: [sql, yaml]
- id: check-test-has-meta-keys
name: Check the test has keys in the meta part
description: Ensures that the test has a list of valid meta keys.
entry: check-test-has-meta-keys
language: python
types_or: [sql]
64 changes: 64 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,67 @@
# 2.0.2 - 2024-07-04

**Fixes:**

- Fix some typos in README.md by @Lapkonium in https://github.com/dbt-checkpoint/dbt-checkpoint/pull/217
- Fix Macro arguments schema compliance by @BAntonellini in https://github.com/dbt-checkpoint/dbt-checkpoint/pull/223

**Enhancements:**

- model has contract and model has constraints by @xasm83 in https://github.com/dbt-checkpoint/dbt-checkpoint/pull/218

**New Contributors**

- @Lapkonium made their first contribution in https://github.com/dbt-checkpoint/dbt-checkpoint/pull/217
- @xasm83 made their first contribution in https://github.com/dbt-checkpoint/dbt-checkpoint/pull/218

**Full Changelog**: https://github.com/dbt-checkpoint/dbt-checkpoint/compare/v2.0.1...v2.0.2

# 2.0.1 - 2024-04-19

**Fixes:**

- Fix/dbt parse config by @pgoslatara in https://github.com/dbt-checkpoint/dbt-checkpoint/pull/213

# 2.0.0 - 2024-04-12

> :warning: **dbt 1.5**: Starting at 2.0.0, certain hooks (like `dbt-parse`) can fail if using dbt-core < 1.5
**Fixes:**

- Bugfix-192: Applied lower() to schema_cols by @ronak-datatonic in https://github.com/dbt-checkpoint/dbt-checkpoint/pull/197
- Documentation Update: Changed Hooks to reflect correct usage of args for source-has-tests by @Thomas-George-T in https://github.com/dbt-checkpoint/dbt-checkpoint/pull/200

**Enhancements:**

- Adding dbt parse hook by @pgoslatara in https://github.com/dbt-checkpoint/dbt-checkpoint/pull/195
- Fix support model versions by @gbrunois in https://github.com/dbt-checkpoint/dbt-checkpoint/pull/199
- All hook names <= 50 characters by @pgoslatara in https://github.com/dbt-checkpoint/dbt-checkpoint/pull/209
- Expand testing to python 3.10 - 3.12 by @pgoslatara in https://github.com/dbt-checkpoint/dbt-checkpoint/pull/207
- Update user visible messages in check_model_parents_and_childs.py by @awal11 in https://github.com/dbt-checkpoint/dbt-checkpoint/pull/204
- Bump action versions by @pgoslatara in https://github.com/dbt-checkpoint/dbt-checkpoint/pull/208
- Describe a faster build configuration in the example by @awal11 in https://github.com/dbt-checkpoint/dbt-checkpoint/pull/211

## New Contributors

- @pgoslatara made their first contribution in https://github.com/dbt-checkpoint/dbt-checkpoint/pull/195
- @ronak-datatonic made their first contribution in https://github.com/dbt-checkpoint/dbt-checkpoint/pull/197
- @Thomas-George-T made their first contribution in https://github.com/dbt-checkpoint/dbt-checkpoint/pull/200
- @gbrunois made their first contribution in https://github.com/dbt-checkpoint/dbt-checkpoint/pull/199
- @awal11 made their first contribution in https://github.com/dbt-checkpoint/dbt-checkpoint/pull/204

# 1.2.1 - 2024-03-07

**Fixes:**

- Fix GitHub action by @BAntonellini in https://github.com/dbt-checkpoint/dbt-checkpoint/pull/187

**Enhancements:**

- Allow multiple data types, improve error messages by @BAntonellini in https://github.com/dbt-checkpoint/dbt-checkpoint/pull/180
- Support yml suffix (without A) in dbt-checkpoint config file by @BAntonellini in https://github.com/dbt-checkpoint/dbt-checkpoint/pull/190
- implement 'check has meta keys' for all meta-supported dbt objects by @BAntonellini in https://github.com/dbt-checkpoint/dbt-checkpoint/pull/181
- Add --allow-extra-keys to check-source-has-meta-keys by @BAntonellini in https://github.com/dbt-checkpoint/dbt-checkpoint/pull/176

# 1.2.0 - 2024-01-15

**Fixes:**
Expand Down
20 changes: 0 additions & 20 deletions Dockerfile

This file was deleted.

Loading

0 comments on commit 9217361

Please sign in to comment.