-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathMakefile
More file actions
143 lines (105 loc) · 3.23 KB
/
Makefile
File metadata and controls
143 lines (105 loc) · 3.23 KB
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
#
# GLOBALS #
#
include Makefile.include
#
# Manage Environment
#
include Makefile.envs
#
# Deprecated
#
.PHONY: requirements
requirements: update_environment
@echo "WARNING: 'make requirements' is deprecated. Use 'make update_environment'"
.PHONY: unfinished
unfinished:
@echo "WARNING: this target is unfinished and may be removed or changed dramatically in future releases"
#
# COMMANDS #
#
.PHONY: begin
begin:
python quest/begin.py
.PHONY: repo_challenge
repo_challenge:
python quest/repo_challenge.py
.PHONY: data_challenge
data_challenge:
python quest/data_challenge.py
.PHONY: test_challenge
test_challenge:
python quest/test_challenge.py
.PHONY: env_challenge
env_challenge:
python quest/env_challenge.py
.PHONY: story_challenge
story_challenge:
python quest/story_challenge.py
.PHONY: complete_quest
## Complete the full Quest
complete_quest: repo_challenge data_challenge test_challenge env_challenge story_challenge
python quest/complete_challenge.py
.PHONY: data
data: datasets
.PHONY: raw
raw: datasources
.PHONY: datasources
datasources: .make.datasources
.make.datasources: catalog/datasources/*
$(PYTHON_INTERPRETER) -m $(MODULE_NAME).workflow datasources
#touch .make.datasources
.PHONY: datasets
datasets: .make.datasets
.make.datasets: catalog/datasets/* catalog/transformers/*
$(PYTHON_INTERPRETER) -m $(MODULE_NAME).workflow datasets
#touch .make.datasets
.PHONY: clean
## Delete all compiled Python files
clean:
$(PYTHON_INTERPRETER) scripts/clean.py
.PHONY: clean_interim
clean_interim:
$(call rm,data/interim/*)
.PHONY: clean_raw
clean_raw:
$(call rm,data/raw/*)
.PHONY: clean_processed
clean_processed:
$(call rm,data/processed/*)
.PHONY: clean_workflow
clean_workflow:
$(call rm,catalog/datasources.json)
$(call rm,catalog/transformer_list.json)
.PHONY: test
## Run all Unit Tests
test: update_environment
LOGLEVEL=DEBUG pytest --pyargs --doctest-modules --doctest-continue-on-failure --verbose \
$(if $(CI_RUNNING),--ignore=$(TESTS_NO_CI)) \
$(MODULE_NAME)
## Run all Unit Tests with coverage
test_with_coverage: update_environment
coverage run -m pytest --pyargs --doctest-modules --doctest-continue-on-failure --verbose \
$(if $(CI_RUNNING),--ignore=$(TESTS_NO_CI)) \
$(MODULE_NAME)
.PHONY: lint
## Lint using flake8
lint:
flake8 $(MODULE_NAME)
.phony: help_update_easydata
help_update_easydata:
python scripts/help-update.py
.PHONY: debug
## dump useful debugging information to $(DEBUG_FILE)
debug:
@python scripts/debug.py $(DEBUG_FILE)
#################################################################################
# PROJECT RULES #
#################################################################################
#################################################################################
# Self Documenting Commands #
#################################################################################
.DEFAULT_GOAL := show-help
.PHONY: show-help
show-help:
@python scripts/help.py $(PROJECT_NAME) $(DEBUG_FILE) $(EASYDATA_LOCKFILE)