forked from datafold/data-diff
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
45 lines (39 loc) · 1.51 KB
/
Makefile
File metadata and controls
45 lines (39 loc) · 1.51 KB
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
.PHONY: up up-full down test-unit test demo
## Start PostgreSQL + MySQL (lightweight, fast startup)
up:
docker compose up -d --wait postgres mysql
## Start all services including ClickHouse, Presto, Trino, Vertica
up-full:
docker compose --profile full up -d --wait
## Stop all services and remove volumes
down:
docker compose --profile full down -v
## Run unit tests (no database required)
test-unit:
uv run pytest tests/test_query.py tests/test_utils.py -x
## Run full test suite against PG + MySQL (starts containers if needed)
## To also test Presto/Trino/Vertica, run `make up-full` first and set:
## export DATADIFF_PRESTO_URI="presto://test@localhost:8080/memory/default"
## export DATADIFF_TRINO_URI="trino://test@localhost:8081/memory/default"
## export DATADIFF_VERTICA_URI="vertica://vertica:Password1@localhost:5433/vertica"
test: up
uv run pytest tests/ \
-o addopts="--timeout=300 --tb=short" \
--ignore=tests/test_database_types.py \
--ignore=tests/test_dbt_config_validators.py \
--ignore=tests/test_main.py
## Run data-diff against seed data to showcase diffing
demo: up
@echo "=== PostgreSQL: ratings_source vs ratings_target ==="
uv run python -m data_diff \
postgresql://postgres:Password1@localhost/postgres \
ratings_source ratings_target \
--key-columns id \
--columns rating
@echo ""
@echo "=== MySQL: ratings_source vs ratings_target ==="
uv run python -m data_diff \
mysql://mysql:Password1@localhost/mysql \
ratings_source ratings_target \
--key-columns id \
--columns rating