forked from dbt-labs/metricflow
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
50 lines (39 loc) · 1.18 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
#
# Local Env/Dev Setup
#
# Python venv helpers
VENV_NAME?=venv
.PHONY: venv
venv:
python3 -m venv $(VENV_NAME) && echo "To activate your new virtual environment, run:\nsource $(VENV_NAME)/bin/activate"
.PHONY: remove_venv
remove_venv:
rm -rf $(VENV_NAME) && echo "If $(VENV_NAME) was active when you ran this command you will need to run deactivate"
# Install metricflow for development work.
.PHONY: install
install:
poetry install
# Testing and linting
.PHONY: test
test:
poetry run pytest metricflow/test/ --ignore metricflow/test/model/dbt_cloud_parsing
.PHONY: test-dbt
test-dbt:
poetry run pytest metricflow/test/model/dbt_cloud_parsing
.PHONY: test-all
test-all:
poetry run pytest metricflow/test
.PHONY: test-postgresql
test-postgresql:
MF_SQL_ENGINE_URL="postgresql://metricflow@localhost:5432/metricflow" MF_SQL_ENGINE_PASSWORD="metricflowing" poetry run pytest metricflow/test/
.PHONY: lint
lint:
pre-commit run --all-files
# Running data warehouses locally
.PHONY: postgresql postgres
postgresql postgres:
make -C local-data-warehouses postgresql
# Install metricflow for development work.
.PHONY: json_schema
json_schema:
python3 metricflow/model/parsing/explicit_schema.py