-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
62 lines (45 loc) · 1.55 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
51
52
53
54
55
56
57
58
59
60
61
local:
docker-compose up frontend
rebuild:
docker-compose build --no-cache frontend
models-lint:
docker-compose run --no-deps explorer bash -c "flake8 ./models"
docker-compose run --no-deps explorer bash -c "pep257 ./models"
# Run test suite locally.
models-test: FORCE
docker-compose run --no-deps explorer pytest -s models/tests
# Run coverage.
models-coverage:
docker-compose run --no-deps explorer pytest --cov=models --cov-config .coveragerc --cov-fail-under=90 --cov-report term-missing
# [Dummy dependency to force a make command to always run.]
FORCE:
# Backend tests
backend-lint:
docker-compose run --no-deps backend bash -c "flake8 ."
docker-compose run --no-deps backend bash -c "pep257 ."
backend-test:
docker-compose run --no-deps backend pytest -s tests
# Frontend tests
frontend-lint:
echo "Missing frontend-lint"
frontend-test:
docker-compose run -e CI=true --no-deps frontend yarn test
# Webapp tests
webapp-lint:
$(MAKE) backend-lint
$(MAKE) frontend-lint
webapp-test:
$(MAKE) backend-test
$(MAKE) frontend-test
# Run ETL process using prior results.
etl:
docker-compose run --no-deps explorer bash -c "python models/etl/runner.py"
# Run ETL process using prior results.
etl_from_scratch:
docker-compose run --no-deps explorer bash -c "python models/etl/runner.py --teardown"
# Fetch raw data for use in the ETL
S3_BUCKET='https://s3-us-west-1.amazonaws.com/network-adequacy/'
fetch_raw_etl_data:
curl -o 'data/etl/raw_etl_data.zip' ${S3_BUCKET}'raw_etl_data.zip'
unzip -o data/etl/raw_etl_data.zip
rm data/etl/raw_etl_data.zip