-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
155 lines (119 loc) · 7.03 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
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
144
145
146
147
148
149
150
151
152
153
154
155
SHELL:=/bin/bash
PROJECT=imio-luigi
VERSION=3.10.12
VENV=${PROJECT}
VENV_DIR=$(shell pyenv root)/versions/${VENV}
PYTHON=${VENV_DIR}/bin/python
BIN_PATH ?=
init:
pyenv virtualenv ${VERSION} ${VENV}
echo ${VENV} > .python-version
$(PYTHON) -m $(BIN_PATH)pip install install -r requirements.txt
update:
$(PYTHON) -m $(BIN_PATH)pip install -r requirements.txt
# Dison
.PHONY: run-local-dison
run-local-dison:
LUIGI_CONFIG_PATH=$(CURDIR)/dison.cfg $(BIN_PATH)luigi --module imio_luigi.urban.export_dison dison.GetFromAccess --counter="500" --filepath ./data/dison/AgoraWin/json/URBA.json --local-scheduler
# Faimes
.PHONY: run-local-faimes
run-local-faimes:
LUIGI_CONFIG_PATH=$(CURDIR)/faimes.cfg $(BIN_PATH)luigi --module imio_luigi.urban.export_faimes faimes.GetFromAccess --filepath ./data/faimes/AgoraWin/json/URBA_missingg_permis.json --local-scheduler
.PHONY: import-faimes
import-faimes:
LUIGI_CONFIG_PATH=./faimes.cfg $(BIN_PATH)luigi --module imio_luigi.urban.importer urban.GetFiles --path ./result-faimes --local-scheduler
# Flemalle
.PHONY: run-local-flemalle-notaries
run-local-flemalle-notaries:
LUIGI_CONFIG_PATH=$(CURDIR)/flemalle.cfg $(BIN_PATH)luigi --module imio_luigi.urban.export_flemalle_notaire flemalle.GetFromCSV --filepath ./data/flemalle/File_V_rename.csv --local-scheduler
.PHONY: import-flemalle-notaries
import-flemalle-notaries:
LUIGI_CONFIG_PATH=./flemalle.cfg $(BIN_PATH)luigi --module imio_luigi.urban.importer urban.GetFiles --path ./result-flemalle-notaries --local-scheduler --logging-conf-file logging_flemalle.ini
# Arlon
.PHONY: run-local-arlon
run-local-arlon:
LUIGI_CONFIG_PATH=$(CURDIR)/arlon.cfg $(BIN_PATH)luigi --module imio_luigi.urban.export_arlon arlon.GetFromAccess --filepath ./data/arlon/json/REGISTRES.json --local-scheduler
.PHONY: import-arlon
import-arlon:
LUIGI_CONFIG_PATH=./arlon.cfg $(BIN_PATH)luigi --module imio_luigi.urban.importer urban.GetFiles --path ./result-arlon --local-scheduler --logging-conf-file logging_arlon.ini
.PHONY: change_workflow_arlon
change_workflow_arlon:
LUIGI_CONFIG_PATH=./arlon.cfg $(BIN_PATH)luigi --module imio_luigi.urban.change_workflow_json_arlon arlon.GetJSONFile --path ./result-arlon-preprocess --local-scheduler
.PHONY: fix_missing_usage_arlon
fix_missing_usage_arlon:
LUIGI_CONFIG_PATH=./arlon.cfg $(BIN_PATH)luigi --module imio_luigi.urban.fix_usage_missing_json_arlon arlon.GetJSONFile --path ./result-arlon-preprocess --local-scheduler
# Berloz
.PHONY: run-local-berloz
run-local-berloz:
LUIGI_CONFIG_PATH=$(CURDIR)/berloz.cfg $(BIN_PATH)luigi --count=10 --module imio_luigi.urban.export_berloz berloz.GetFromCSV --filepath ./data/berloz/donnees_traitees.csv --local-scheduler
# Mouscron
.PHONY: run-local-mouscron
run-local-mouscron:
LUIGI_CONFIG_PATH=$(CURDIR)/mouscron.cfg $(BIN_PATH)luigi --module imio_luigi.urban.export_mouscron mouscron.GetFromCSV --filepath ./data/mouscron/p/p_permis_rename.csv --local-scheduler
.PHONY: run-local-mouscron-architecte
run-local-mouscron-architecte:
LUIGI_CONFIG_PATH=$(CURDIR)/mouscron.cfg $(BIN_PATH)luigi --module imio_luigi.urban.export_mouscron_architect mouscron-architect.GetFromCSV --filepath ./data/mouscron/c/c_organisme.csv --local-scheduler
.PHONY: import-mouscron-architecte
import-mouscron-architecte:
LUIGI_CONFIG_PATH=./mouscron.cfg $(BIN_PATH)luigi --module imio_luigi.urban.importer urban.GetFiles --path ./result-mouscron-architect --local-scheduler
.PHONY: import-mouscron
import-mouscron:
LUIGI_CONFIG_PATH=./mouscron.cfg $(BIN_PATH)luigi --module imio_luigi.urban.importer urban.GetFiles --path ./result-mouscron --local-scheduler --logging-conf-file logging_mourscon.ini
.PHONY: run-local-fix-ref-mouscron
run-local-fix-ref-mouscron:
LUIGI_CONFIG_PATH=$(CURDIR)/mouscron.cfg $(BIN_PATH)luigi --module imio_luigi.urban.fix_ref_mouscron mouscron.GetJSONFile --path ./result-mouscron-preprocess --local-scheduler
# Ecaussinnes
.PHONY: run-local-ecaussinnes
run-local-ecaussinnes:
LUIGI_CONFIG_PATH=$(CURDIR)/ecaussinnes.cfg $(BIN_PATH)luigi --module imio_luigi.urban.export_ecaussinnes ecaussinnes.GetFromXML --filepath ./data/ecaussinnes/ --local-scheduler
.PHONY: import-ecaussinnes
import-ecaussinnes:
LUIGI_CONFIG_PATH=./ecaussinnes.cfg $(BIN_PATH)luigi --module imio_luigi.urban.importer urban.GetFiles --path ./result-ecaussinnes --local-scheduler
# Grace-Hollogne
.PHONY: run-local-gracehollogne
run-local-gracehollogne:
LUIGI_CONFIG_PATH=$(CURDIR)/gracehollogne.cfg $(BIN_PATH)luigi --module imio_luigi.urban.export_gracehollogne gracehollogne.GetFromAccess --filepath ./data/gracehollogne/customer_ouput_formated.json --local-scheduler
.PHONY: run-local-gracehollogne-env
run-local-gracehollogne-env:
LUIGI_CONFIG_PATH=$(CURDIR)/gracehollogne.cfg $(BIN_PATH)luigi --module imio_luigi.urban.export_gracehollogne_env gracehollogne_env.GetJSON --filepath ./data/gracehollogne/environements/json/merge_permis.json --local-scheduler
.PHONY: clear-gracehollogne-env
clear-gracehollogne-env:
rm -rf result-gracehollogne-env/ failures/gracehollogne_env-*
.PHONY: import-local-gracehollogne
import-gracehollogne:
LUIGI_CONFIG_PATH=./gracehollogne.cfg $(BIN_PATH)luigi --module imio_luigi.urban.importer urban.GetFiles --path ./result-gracehollogne --local-scheduler
.PHONY: import-local-gracehollogne-env
import-gracehollogne-env:
LUIGI_CONFIG_PATH=./gracehollogne.cfg $(BIN_PATH)luigi --module imio_luigi.urban.importer urban.GetFiles --path ./result-gracehollogne-env --local-scheduler --logging-conf-file logging_gracehollogne.ini
# Bastonge
.PHONY: run-local-bastogne
run-local-bastogne:
LUIGI_CONFIG_PATH=$(CURDIR)/bastogne.cfg $(BIN_PATH)luigi --module imio_luigi.urban.export_acropole acropole.GetFromMySQL --dbname=urb82003ac --local-scheduler
# OLLN
.PHONY: run-local-olln
run-local-olln:
LUIGI_CONFIG_PATH=./olln.cfg $(BIN_PATH)luigi --orga=olln --module imio_luigi.urban.export_acropole acropole.GetFromMySQL --dbname=urb25121ac --local-scheduler
.PHONY: import-olln
import-olln:
LUIGI_CONFIG_PATH=./olln.cfg $(BIN_PATH)luigi --module imio_luigi.urban.importer urban.GetFiles --path ./result-olln --local-scheduler
#Hensies
.PHONY: run-local-hensies
run-local-hensies:
LUIGI_CONFIG_PATH=./hensies.cfg $(BIN_PATH)luigi --orga=hensies --module imio_luigi.urban.export_acropole acropole.GetFromMySQL --dbname=urb53039ac --local-scheduler
.PHONY: import-hensies
import-hensies:
LUIGI_CONFIG_PATH=./hensies.cfg $(BIN_PATH)luigi --module imio_luigi.urban.importer urban.GetFiles --path ./result-hensies --local-scheduler
# Acropole
.PHONY: run-local-acropole
run-local-acropole:
luigi --module imio_luigi.urban.export_acropole acropole.GetFromMySQL --local-scheduler
.PHONY: import-local
import-local:
LUIGI_CONFIG_PATH=./dison.cfg $(BIN_PATH)luigi --module imio_luigi.urban.importer urban.GetFiles --path ./result-dison --local-scheduler
test:
nosetests imio_luigi
acropole-db:
docker-compose -f docker-compose-acropole.yml -p acropole up
.PHONY: run-local-libreoffice-upgrade-templates
run-local-libreoffice-upgrade-templates:
LUIGI_CONFIG_PATH=./config/local.cfg luigi --module imio_luigi.urban.libreoffice libreoffice.UpgradeTemplatesTask --local-scheduler