forked from josephmachado/beginner_de_project
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
executable file
·44 lines (29 loc) · 1.13 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
####################################################################################################################
# Setup containers to run Airflow
docker-spin-up:
docker compose build && docker compose up airflow-init && docker compose up --build -d
perms:
sudo mkdir -p logs plugins temp dags tests data visualization && sudo chmod -R u=rwx,g=rwx,o=rwx logs plugins temp dags tests data visualization
setup-conn:
docker exec scheduler python /opt/airflow/setup_conn.py
do-sleep:
sleep 30
up: perms docker-spin-up do-sleep setup-conn
down:
docker compose down
restart: down up
sh:
docker exec -ti webserver bash
####################################################################################################################
# Testing, auto formatting, type checks, & Lint checks
pytest:
docker exec webserver pytest -p no:warnings -v /opt/airflow/tests
format:
docker exec webserver python -m black -S --line-length 79 .
isort:
docker exec webserver isort .
type:
docker exec webserver mypy --ignore-missing-imports /opt/airflow
lint:
docker exec webserver flake8 /opt/airflow/dags
ci: isort format type lint pytest