-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
86 lines (73 loc) · 3.19 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
#
# This file is part of Brazil Data Cube compendium-harmonization.
# Copyright (C) 2022 INPE.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/gpl-3.0.html>.
#
SHELL := /bin/bash
.PHONY: example_cleanup_data \
example_download_data \
example_pipeline \
example_notebook \
replication_cleanup_data \
replication_download_data \
replication_pipeline \
replication_notebook
#
# Minimal example
#
# Utilities
example_cleanup_data: ## Clean all input/output data generated during the minimal example execution
rm -rf analysis/data/examples/minimal_example/* \
&& mkdir -p analysis/data/examples/minimal_example/raw_data \
&& mkdir -p analysis/data/examples/minimal_example/derived_data
# Data download targets
example_download_data: ## Download data to use on the minimal example
docker-compose -f composes/minimal/docker-compose.data.yaml up --build
# Environment - Dagster Pipeline
example_pipeline: ## Create the Dagster for the minimal example execution.
docker-compose -f composes/minimal/docker-compose.pipeline.yaml up --build
# Environment - Jupyter Notebook
example_notebook: ## Create the Jupyter-Notebook for the minimal example execution.
./setenv.sh \
&& docker-compose \
--project-directory ${PWD} \
-f composes/minimal/docker-compose.notebook.yaml up \
--build
#
# Replication example
#
# Utilities
replication_cleanup_data: ## Clean all input/output data generated during the replication example execution
rm -rf analysis/data/examples/replication_example/* \
&& mkdir -p analysis/data/examples/replication_example/raw_data \
&& mkdir -p analysis/data/examples/replication_example/derived_data
# Data download targets
replication_download_data: ## Download data to use on the replication example
docker-compose -f composes/replication/docker-compose.data.yaml up --build
# Environment - Dagster Pipeline
replication_pipeline: ## Create the Dagster for the replication example execution.
docker-compose -f composes/replication/docker-compose.pipeline.yaml up --build
# Environment - Jupyter Notebook
replication_notebook: ## Create the Jupyter-Notebook for the replication example execution.
./setenv.sh \
&& docker-compose \
--project-directory ${PWD} \
-f composes/replication/docker-compose.notebook.yaml up \
--build
#
# Documentation function (thanks for https://marmelab.com/blog/2016/02/29/auto-documented-makefile.html)
#
help:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'