-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMakefile
63 lines (47 loc) · 1.6 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
62
63
VIRTUALENV = analytics
CONDA_ENV = analytics
ANALYTICS_PIP ?= pip3
ANALYTICS_PYTHON ?= python3
ACTIVATE = /home/analytics/miniconda3/bin/activate
DATE = date +%y-%m-%dT%H:%M:%S
install_anaconda:
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh
bash Miniconda3-latest-Linux-x86_64.sh
rm Miniconda3-latest-Linux-x86_64.sh
export PATH=$$PATH:/home/analytics/miniconda3/bin
setup_anaconda:
conda create -n $(CONDA_ENV) --no-default-packages
source activate $(CONDA_ENV); \
$(ANALYTICS_PIP) install -r requirements.txt
setup_virtualenv:
test -d $(VIRTUALENV)/bin/activate || $(ANALYTICS_PYTHON) -m venv $(VIRTUALENV)
source $(VIRTUALENV)/bin/activate; \
$(ANALYTICS_PIP) install -r requirements.txt
all_reports: pull reports commit push
reports: reports_api_gateway reports_georef reports_series_tiempo
reports_api_gateway:
cd api-gateway; $(MAKE) reports
reports_georef:
cd georef-ar-api; $(MAKE) reports
reports_series_tiempo:
cd series-tiempo-ar-api; $(MAKE) reports
pull:
git pull
commit:
git commit -a
push:
git push
update_analytics_local:
python3 ./tools/analytics_tools.py
update_analytics_public_dump_local: update_analytics
python3 ./tools/analytics_dump.py
update_analytics:
source activate $(CONDA_ENV); python ./tools/analytics_tools.py
update_analytics_public_dump: update_analytics
source $(ACTIVATE) $(CONDA_ENV); python ./tools/analytics_dump.py
update_environment:
git pull
source $(ACTIVATE) $(CONDA_ENV); pip install -r requirements.txt --upgrade
update_environment_local:
git pull
source activate $(CONDA_ENV); pip install -r requirements.txt --upgrade