-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
63 lines (46 loc) · 1.3 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
.PHONY: docs
generate-lockfile:
poetry check && poetry export -f requirements.txt --output requirements.txt --with dev
# CI
fmt:
python -m sqlfluff format
lint:
python -m sqlfluff lint
python -m yamllint .
test:
@echo "Running dbt build for modified and downstream models"
dbt build --exclude package:dbt_project_evaluator --fail-fast --models state:modified+ --state .state
test-all:
@echo "Running dbt build for all models"
dbt build --exclude package:dbt_project_evaluator --fail-fast
check:
dbt build --select package:dbt_project_evaluator
test-coverage:
dbt run-operation required_tests
# TODO: uncomment when dbt-coverage compatible with dbt>1.5.0
# dbt docs generate
# dbt-coverage compute test --model-path-filter models/marts --cov-fail-under 0.5
# dbt-coverage compute doc --model-path-filter models/marts --cov-fail-under 0.5
dbt-profiler:
./scripts/run-dbt-profiler.sh
check-src-freshness:
dbt source freshness
release:
python -m semantic_release publish
# Development
clean:
dbt clean
rm -rf logs
docs:
dbt docs generate
dbt docs serve
dbt-compile-%:
dbt compile --select $(*)
dbt-show-%:
dbt show --select $(*)
clean-stale-models:
dbt run-operation clean_stale_models \
--args "database: raw" \
--args "schema: jaffle_shop" \
--args "days: 1" \
--args "dry_run: True"