GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — data-stack-lab/Makefile at main · technobasant/data-stack-lab

Expand file tree

/

Makefile

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
106 lines (88 loc) · 3.97 KB
/

Makefile

Copy path

File metadata and controls

106 lines (88 loc) · 3.97 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
# data-stack-lab — hands-on data engineering projects, one per tool, on one generated SaaS dataset.
#
# make setup uv venv + dependencies
# make data generate the dataset (SCALE=lab, or tiny)
# make warehouse replay 13 monthly extracts through dbt snapshot, then dbt build
# make measure score the warehouse against the generator's truth
# make mutants break the models four ways; every break must fail the build
# make docs dbt docs (catalog + lineage) under dbt/target
# make all data, warehouse, measure --check, mutants --check (the dbt project, as CI checks it)
# make airflow backfill September through the Airflow DAGs four ways and score it
# make quality deliver September with nine defects, check it in dbt, score both policies
# make spark PySpark: re-running a day, small files, partition pruning (needs Java 17+)
# make databricks Databricks: six loaders over ten days of deliveries, and a re-run on Delta
# (needs a workspace: DATABRICKS_HOST, DATABRICKS_TOKEN, DATABRICKS_HTTP_PATH)
# make check ruff + generator tests
# make verify every offline check CI runs (see the verify: target below for what's skipped)
#
# DBT="uvx --from dbt-oss==2.0.8 dbt" make warehouse runs the same project on dbt v2.
#
# Unlike `all`, the airflow/quality/spark/databricks targets above write results/*.json
# rather than checking them; CI runs the same scripts with --check instead, which fails
# on any difference. `make verify` runs the --check forms, the way CI does.
SHELL := /usr/bin/env bash
SCALE ?= lab
SEED ?= 7
.PHONY: setup data warehouse measure mutants docs all airflow airflow-scheduler quality spark databricks check verify clean
setup:
uv sync
# `data` is a file target: once data/manifest.json exists, `make data` is a no-op, even
# if SCALE or SEED changed. Run `make clean` first to force a regenerate with different
# parameters.
data: data/manifest.json
data/manifest.json:
uv run python -m datagen --scale $(SCALE) --seed $(SEED) --out data
warehouse:
uv run python scripts/warehouse.py
measure:
uv run python scripts/measure.py
mutants:
uv run python scripts/mutants.py
docs:
cd dbt && DUCKDB_PATH=../data/warehouse.duckdb uv run dbt docs generate --profiles-dir .
all: data warehouse
uv run python scripts/measure.py --check
uv run python scripts/mutants.py --check
airflow: data
uv sync --group airflow
uv run python airflow/backfill.py
# The in-order backfill on a real scheduler (airflow standalone); not run in CI.
airflow-scheduler: data
uv sync --group airflow
uv run python airflow/scheduler_run.py
quality: data
uv run python quality/run.py
spark: data
uv sync --group spark
uv run python spark/run.py
databricks: data
uv sync --group databricks
uv run python databricks/run.py
check:
uv run ruff check .
uv run ruff format --check .
uv run pytest -q
# Every offline check CI runs (.github/workflows/ci.yml), job for job, against a fresh
# dataset: lint, the workflow audit, the generator/DAG tests, the dbt project rebuilt
# and compared, and the airflow/quality/spark/databricks harnesses run with --check
# instead of written plain. Skipped, because they are not offline: the Databricks
# project's workspace-only steps (databricks/run.py with no --plan, and
# databricks/dbt_build.py), which need a workspace and credentials and are not run in
# CI either — CI checks only databricks/run.py --plan --check, which this runs.
verify: data
uv run ruff format --check .
uv run ruff check .
uv run pytest -q
uvx [email protected] --offline --persona=regular .github/workflows
uv run python scripts/warehouse.py
uv run python scripts/measure.py --check
uv run python scripts/mutants.py --check
uv sync --group airflow
uv run pytest -q tests/test_dags.py
uv run python airflow/backfill.py --check
uv run python quality/run.py --check
uv sync --group spark
uv run python spark/run.py --check
uv run python databricks/run.py --plan --check
clean:
rm -rf data dbt/target dbt/logs
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.