-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtasks.mk
76 lines (57 loc) · 2.32 KB
/
tasks.mk
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
64
65
66
67
68
69
70
71
72
73
74
75
76
#!make
THIS_FILE := $(lastword $(MAKEFILE_LIST))
ROOT_DIR=$(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
NANOHUB_DIR=$(ROOT_DIR)/nanoHUB
PIPELINE_DIR=$(NANOHUB_DIR)/pipeline
#NANOHUB=python3 $(ROOT_DIR)/nanoHUB/__main__.py
NANOHUB=nanohub
EXECUTE_TASK=$(NANOHUB) task execute
SALESFORCE_BACKUP=$(NANOHUB) backup salesforce
SALESFORCE_DIR=$(PIPELINE_DIR)/salesforce
SF_BACKUP_DOMAIN='backups'
DOMAIN=${SF_BACKUP_DOMAIN}
CLUSTERING_DIR=$(NANOHUB_DIR)/clustering
log-context='undefined'
log-level='INFO'
log-level-string=--log-level $(log-level)
logger=--log-level=$(log-level) 2>&1 | /usr/bin/logger -t ${log-context}
TASKS=$(SALESFORCE_DIR)/_task_test.ipynb \
$(SALESFORCE_DIR)/task_citations.ipynb \
$(SALESFORCE_DIR)/task_citations_map_leads.ipynb \
$(SALESFORCE_DIR)/task_issue_url.ipynb \
$(SALESFORCE_DIR)/task_organization.ipynb \
$(SALESFORCE_DIR)/task_orgs_map_contacts.ipynb \
$(SALESFORCE_DIR)/task_tool_basic_updates.ipynb \
$(SALESFORCE_DIR)/task_tools_map_authors.ipynb \
$(SALESFORCE_DIR)/task_tools_map_contacts.ipynb \
$(SALESFORCE_DIR)/task_user_basic_updates-2.ipynb \
$(SALESFORCE_DIR)/delete_spam_users.ipynb \
$(SALESFORCE_DIR)/task_update_email_preferences.ipynb \
$(SALESFORCE_DIR)/task_nh_survey_urls.ipynb \
$(SALESFORCE_DIR)/task_user_org_reclass.ipynb \
$(SALESFORCE_DIR)/task_update_static_personalinfo.ipynb \
$(SALESFORCE_DIR)/db2users_remap_sf.ipynb \
$(SALESFORCE_DIR)/task_nh_usage_survey.ipynb \
$(SALESFORCE_DIR)/task_nh_groups.ipynb \
$(SALESFORCE_DIR)/simulation_user_lifetimes-2.ipynb \
$(SALESFORCE_DIR)/task_user_contribution_update.ipynb \
$(PIPELINE_DIR)/SF_dataimports/general_imports.ipynb
TASKS_ERRORS=\
$(PIPELINE_DIR)/researcher_scraping/main_file.py \
$(SALESFORCE_DIR)/task_citations_map_contacts.ipynb
.PHONY: task
env_vars:
env
heartbeat:
/usr/bin/logger -t heartbeat -p user.info "Heart Beat Check."
execute:
mkdir -p .output && $(EXECUTE_TASK) $(TASKS) ${log-level-string}
test:
$(MAKE) -f $(THIS_FILE) execute TASKS=$(SALESFORCE_DIR)/_task_test.ipynb
salesforce-backup:
$(SALESFORCE_BACKUP) DOMAIN=$(DOMAIN) ${log-level-string}
import:
$(MAKE) -f $(THIS_FILE) execute TASKS=$(PIPELINE_DIR)/SF_dataimports/general_imports.ipynb
clustering-%:
cd $(CLUSTERING_DIR) && make all task=$*
#$(SALESFORCE_DIR)/task_determine_contact_cluster_org.ipynb \