-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
39 lines (29 loc) · 917 Bytes
/
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
.PHONY: list
PID_FILES := $(wildcard ~/airflow/*.pid)
PIDS := $(foreach pid_file,$(PID_FILES),$(shell cat $(pid_file)))
list:
@awk -F: '!/(list|PID*)/ && /^[A-z]/ {print $$1}' Makefile
clean:
@find . -type d -name __pycache__ -exec rm -r {} \+
@find . -type d -name .pytest_cache -exec rm -r {} \+
@pip freeze | xargs pip uninstall -y
airflow-init:
airflow db init
airflow users create --role Admin --username admin --email admin --firstname admin --lastname admin --password admin
airflow-data:
mkdir -p ~/airflow/dags
cp selling_aggreg.py ~/airflow/dags
cp vente*.py ~/airflow/dags
cp ventes.csv /var/tmp
airflow-run: airflow-kill airflow-data
airflow webserver --port 8080 -D
airflow scheduler -D
airflow-kill:
@for pid in $(PIDS); do \
kill -TERM "$$pid" || true; \
done
@rm -f $(PID_FILES)
install:
@pip install -r requirements.txt
install-dev:
@pip install -r requirements-dev.txt