-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
48 lines (34 loc) · 1.76 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
export APP_NAME := genomic_data_service
build:
python3 -m venv venv
source venv/bin/activate
pip3 install -e .
deactivate & source venv/bin/activate
python3 ./utils/download_files.py
run:
FLASK_APP=$(APP_NAME) FLASK_ENV=development gunicorn --bind 0.0.0.0:5000 wsgi:app
run_docker:
FLASK_APP=$(APP_NAME) FLASK_ENV=development GENOMIC_DATA_SERVICE_SETTINGS=../config/development_docker.cfg gunicorn --bind 0.0.0.0:5000 wsgi:app
clean:
rm -rf genomic_data_service.egg-info/
test:
FLASK_APP=$(APP_NAME) FLASK_ENV=test GENOMIC_DATA_SERVICE_SETTINGS=../config/test.cfg pytest -s -v --cov=genomic_data_service
unit_test:
FLASK_APP=$(APP_NAME) FLASK_ENV=test GENOMIC_DATA_SERVICE_SETTINGS=../config/test.cfg pytest -s -v --cov=genomic_data_service -m 'not integration'
integration_test:
FLASK_APP=$(APP_NAME) FLASK_ENV=test GENOMIC_DATA_SERVICE_SETTINGS=../config/test.cfg pytest -s -v --cov=genomic_data_service --cov-append -m 'integration'
prod:
FLASK_APP=$(APP_NAME) GENOMIC_DATA_SERVICE_SETTINGS=../config/production.cfg gunicorn -w 4 -b 127.0.0.1:4000 wsgi:app
worker:
celery -A genomic_data_service.region_indexer_task.celery_app worker --loglevel=INFO
worker_docker:
GENOMIC_DATA_SERVICE_SETTINGS=../config/development_docker.cfg celery -A genomic_data_service.region_indexer_task.celery_app worker --loglevel=INFO
flower:
flower -A genomic_data_service.region_indexer_task.celery_app --address=127.0.0.1 --port=5555 --persistent=True --db=indexer_logs --max_tasks=1000000
index:
python3 genomic_data_service/region_indexer.py
index_local:
python3 genomic_data_service/region_indexer.py --local
index_docker:
sleep 10
GENOMIC_DATA_SERVICE_SETTINGS=../config/development_docker.cfg python3 genomic_data_service/region_indexer.py --local --uri elasticsearch --port 9200