-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
55 lines (38 loc) · 937 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
###########################
## Environment variables ##
###########################
include .env
export ALIAS = chess
export TF_VAR_project_id = $(PROJECT_ID)
export TF_VAR_region = $(PROJECT_REGION)
export GOOGLE_APPLICATION_CREDENTIALS ?= $(HOME)/.gcp/gcp_credentials.json
#############
## Install ##
#############
mamba:
mamba env update -n $(ALIAS) --file environment.yaml --prune \
|| \
mamba env create --file environment.yaml
packages:
pip install -e src/scraper/
#############
## Testing ##
#############
tests:
pytest src/tests/
################
## Formatting ##
################
format:
black .
################
## Deployment ##
################
build:
sh scripts/add_scraper_to_gcf.sh src/scraper src/services/ingestor
clean:
rm src/services/ingestor/*.whl
rm src/services/ingestor/*.txt
terraform:
cd infrastructure && terraform init && terraform apply -auto-approve
deploy: build terraform clean