Skip to content

Commit b17f4d0

Browse files
authored
Merge branch 'master' into pre-commit-ci-update-config
2 parents 14d2675 + 0fe7d64 commit b17f4d0

File tree

8 files changed

+30
-32
lines changed

8 files changed

+30
-32
lines changed

pipelines/rj_smtr/br_rj_riodejaneiro_brt_gps/flows.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
) as materialize_brt:
5757
# Rename flow run
5858
rename_flow_run = rename_current_flow_run_now_time(
59-
prefix="GPS BRT - Materialização: ", now_time=get_now_time()
59+
prefix=materialize_brt.name + ": ", now_time=get_now_time()
6060
)
6161

6262
# Get default parameters #
@@ -143,7 +143,7 @@
143143

144144
# Rename flow run
145145
rename_flow_run = rename_current_flow_run_now_time(
146-
prefix="SMTR: GPS BRT - Captura - ", now_time=timestamp
146+
prefix=captura_brt.name + ": ", now_time=timestamp
147147
)
148148

149149
# SETUP LOCAL #

pipelines/rj_smtr/br_rj_riodejaneiro_gtfs/flows.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
# SETUP dos Flows
3636

3737
gtfs_captura = deepcopy(default_capture_flow)
38-
gtfs_captura.name = "SMTR - Captura dos dados do GTFS"
38+
gtfs_captura.name = "SMTR: GTFS - Captura (subflow)"
3939
gtfs_captura.storage = GCS(emd_constants.GCS_FLOWS_BUCKET.value)
4040
gtfs_captura.run_config = KubernetesRun(
4141
image=emd_constants.DOCKER_IMAGE.value,
@@ -48,7 +48,7 @@
4848
)
4949

5050
gtfs_materializacao = deepcopy(default_materialization_flow)
51-
gtfs_materializacao.name = "SMTR - Materialização dos dados do GTFS"
51+
gtfs_materializacao.name = "SMTR: GTFS - Materialização (subflow)"
5252
gtfs_materializacao.storage = GCS(emd_constants.GCS_FLOWS_BUCKET.value)
5353
gtfs_materializacao.run_config = KubernetesRun(
5454
image=emd_constants.DOCKER_IMAGE.value,

pipelines/rj_smtr/br_rj_riodejaneiro_onibus_gps/flows.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
# Flows #
6060

6161
with Flow(
62-
"SMTR: GPS SPPO - Realocação (captura)",
62+
"SMTR: GPS SPPO Realocação - Captura",
6363
code_owners=["caio", "fernanda", "boris", "rodrigo"],
6464
) as realocacao_sppo:
6565
# SETUP #
@@ -81,7 +81,7 @@
8181
timestamp = get_current_timestamp()
8282

8383
rename_flow_run = rename_current_flow_run_now_time(
84-
prefix="GPS SPPO - Realocação: ", now_time=timestamp
84+
prefix=realocacao_sppo.name + ": ", now_time=timestamp
8585
)
8686

8787
partitions = create_date_hour_partition(timestamp)
@@ -135,12 +135,12 @@
135135

136136

137137
with Flow(
138-
"SMTR: GPS SPPO - Materialização",
138+
"SMTR: GPS SPPO - Materialização (subflow)",
139139
code_owners=["caio", "fernanda", "boris", "rodrigo"],
140140
) as materialize_sppo:
141141
# Rename flow run
142142
rename_flow_run = rename_current_flow_run_now_time(
143-
prefix="SMTR: GPS SPPO - Materialização - ", now_time=get_now_time()
143+
prefix=materialize_sppo.name + ": ", now_time=get_now_time()
144144
)
145145

146146
# Get default parameters #
@@ -228,7 +228,7 @@
228228
timestamp = get_current_timestamp()
229229

230230
rename_flow_run = rename_current_flow_run_now_time(
231-
prefix="GPS SPPO: ", now_time=timestamp
231+
prefix=captura_sppo_v2.name + ": ", now_time=timestamp
232232
)
233233

234234
partitions = create_date_hour_partition(timestamp)
@@ -282,7 +282,7 @@
282282

283283

284284
with Flow(
285-
"SMTR - GPS SPPO Recapturas", code_owners=["caio", "fernanda", "boris", "rodrigo"]
285+
"SMTR: GPS SPPO - Tratamento", code_owners=["caio", "fernanda", "boris", "rodrigo"]
286286
) as recaptura:
287287
version = Parameter("version", default=2)
288288
datetime_filter = Parameter("datetime_filter", default=None)
@@ -297,7 +297,7 @@
297297
)
298298

299299
rename_flow_run = rename_current_flow_run_now_time(
300-
prefix="GPS SPPO Recapturas: ", now_time=get_now_time(), wait=timestamps
300+
prefix=recaptura.name + ": ", now_time=get_now_time(), wait=timestamps
301301
)
302302
with case(errors, False):
303303
with case(materialize, True):

pipelines/rj_smtr/br_rj_riodejaneiro_rdo/flows.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,12 @@
3737
)
3838
from pipelines.utils.execute_dbt_model.tasks import run_dbt_model
3939

40-
with Flow("SMTR: SPPO RHO - Materialização") as sppo_rho_materialize:
40+
with Flow(
41+
"SMTR: SPPO RHO - Materialização", code_owners=["rodrigo"]
42+
) as sppo_rho_materialize:
4143
# Rename flow run
4244
rename_flow_run = rename_current_flow_run_now_time(
43-
prefix="SPPO RHO - Materialização: ", now_time=get_now_time()
45+
prefix=sppo_rho_materialize.name + ": ", now_time=get_now_time()
4446
)
4547

4648
# Get default parameters #
@@ -108,7 +110,7 @@
108110
materialize = Parameter("materialize", False)
109111

110112
rename_run = rename_current_flow_run_now_time(
111-
prefix=f"Captura FTP - {transport_mode.run()}-{report_type.run()} ",
113+
prefix=f"{captura_sppo_rho.name} FTP - {transport_mode.run()}-{report_type.run()} ",
112114
now_time=get_current_timestamp(),
113115
wait=None,
114116
)
@@ -156,7 +158,7 @@
156158
materialize = Parameter("materialize", False)
157159

158160
rename_run = rename_current_flow_run_now_time(
159-
prefix=f"Captura FTP - {transport_mode.run()}-{report_type.run()} ",
161+
prefix=f"{captura_sppo_rdo.name} FTP - {transport_mode.run()}-{report_type.run()} ",
160162
now_time=get_current_timestamp(),
161163
wait=None,
162164
)

pipelines/rj_smtr/br_rj_riodejaneiro_stpl_gps/flows.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
timestamp = get_current_timestamp()
5757

5858
rename_flow_run = rename_current_flow_run_now_time(
59-
prefix="SMTR: GPS STPL - Captura - ", now_time=timestamp
59+
prefix=captura_stpl.name + " - ", now_time=timestamp
6060
)
6161

6262
partitions = create_date_hour_partition(timestamp)

pipelines/rj_smtr/projeto_subsidio_sppo/flows.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
# Flows #
5353

5454
with Flow(
55-
"SMTR: Viagens SPPO",
55+
"SMTR: Viagens SPPO - Materialização",
5656
code_owners=["caio", "fernanda", "boris", "rodrigo"],
5757
) as viagens_sppo:
5858
# Rename flow run
@@ -65,7 +65,7 @@
6565
run_dates = get_run_dates(date_range_start, date_range_end)
6666

6767
rename_flow_run = rename_current_flow_run_now_time(
68-
prefix="SMTR - Viagens SPPO: ", now_time=run_dates
68+
prefix=viagens_sppo.name + ": ", now_time=run_dates
6969
)
7070

7171
LABELS = get_current_flow_labels()
@@ -98,9 +98,8 @@
9898

9999
viagens_sppo.schedule = every_day_hour_five
100100

101-
SUBSIDIO_SPPO_APURACAO_NAME = "SMTR: Subsídio SPPO Apuração"
102101
with Flow(
103-
SUBSIDIO_SPPO_APURACAO_NAME,
102+
"SMTR: Subsídio SPPO Apuração - Materialização",
104103
code_owners=["rodrigo"],
105104
) as subsidio_sppo_apuracao:
106105
# 1. SETUP #
@@ -137,7 +136,7 @@
137136

138137
# Rename flow run #
139138
rename_flow_run = rename_current_flow_run_now_time(
140-
prefix=SUBSIDIO_SPPO_APURACAO_NAME + ": ", now_time=run_dates
139+
prefix=subsidio_sppo_apuracao.name + ": ", now_time=run_dates
141140
)
142141

143142
# Set dbt client #

pipelines/rj_smtr/registros_ocr_rir/flows.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
from pipelines.utils.tasks import rename_current_flow_run_now_time
2222

2323
with Flow(
24-
"SMTR - Captura FTP - OCR RIR",
24+
"SMTR: OCR RIR - Captura",
2525
code_owners=[
2626
"caio",
2727
"fernanda",
@@ -33,7 +33,7 @@
3333
dump = Parameter("dump", default=False)
3434
execution_time = Parameter("execution_time", default=None)
3535
rename_flow = rename_current_flow_run_now_time(
36-
prefix="OCR RIR: ", now_time=get_current_timestamp()
36+
prefix=captura_ocr.name + " ", now_time=get_current_timestamp()
3737
)
3838
# Pipeline
3939
status = get_files_from_ftp(

pipelines/rj_smtr/veiculo/flows.py

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,8 @@
5555
# Flows #
5656

5757
# flake8: noqa: E501
58-
sppo_licenciamento_captura_name = f"SMTR: Captura - {constants.DATASET_ID.value}.{constants.SPPO_LICENCIAMENTO_TABLE_ID.value}"
5958
with Flow(
60-
sppo_licenciamento_captura_name,
59+
f"SMTR: {constants.DATASET_ID.value} {constants.SPPO_LICENCIAMENTO_TABLE_ID.value} - Captura",
6160
code_owners=["caio", "fernanda", "boris", "rodrigo"],
6261
) as sppo_licenciamento_captura:
6362
timestamp = get_current_timestamp()
@@ -67,7 +66,7 @@
6766

6867
# Rename flow run
6968
rename_flow_run = rename_current_flow_run_now_time(
70-
prefix=f"{sppo_licenciamento_captura_name} - ", now_time=timestamp
69+
prefix=f"{sppo_licenciamento_captura.name} - ", now_time=timestamp
7170
)
7271

7372
# SETUP #
@@ -124,9 +123,8 @@
124123
)
125124
sppo_licenciamento_captura.schedule = every_day_hour_seven
126125

127-
sppo_infracao_captura_name = f"SMTR: Captura - {constants.DATASET_ID.value}.{constants.SPPO_INFRACAO_TABLE_ID.value}"
128126
with Flow(
129-
sppo_infracao_captura_name,
127+
f"SMTR: {constants.DATASET_ID.value} {constants.SPPO_INFRACAO_TABLE_ID.value} - Captura",
130128
code_owners=["caio", "fernanda", "boris", "rodrigo"],
131129
) as sppo_infracao_captura:
132130
timestamp = get_current_timestamp()
@@ -136,7 +134,7 @@
136134

137135
# Rename flow run
138136
rename_flow_run = rename_current_flow_run_now_time(
139-
prefix=f"{sppo_infracao_captura_name} - ", now_time=timestamp
137+
prefix=f"{sppo_infracao_captura.name} - ", now_time=timestamp
140138
)
141139

142140
# SETUP #
@@ -192,9 +190,8 @@
192190
sppo_infracao_captura.schedule = every_day_hour_seven
193191

194192
# flake8: noqa: E501
195-
sppo_veiculo_dia_name = f"SMTR: Materialização - {constants.DATASET_ID.value}.{constants.SPPO_VEICULO_DIA_TABLE_ID.value}"
196193
with Flow(
197-
sppo_veiculo_dia_name,
194+
f"SMTR: {constants.DATASET_ID.value} {constants.SPPO_VEICULO_DIA_TABLE_ID.value} - Materialização (subflow)",
198195
code_owners=["caio", "fernanda", "boris", "rodrigo"],
199196
) as sppo_veiculo_dia:
200197
# 1. SETUP #
@@ -208,7 +205,7 @@
208205

209206
# Rename flow run #
210207
rename_flow_run = rename_current_flow_run_now_time(
211-
prefix=sppo_veiculo_dia_name + ": ",
208+
prefix=sppo_veiculo_dia.name + ": ",
212209
now_time=run_dates,
213210
)
214211

0 commit comments

Comments
 (0)