From 7def189f15fe3cdb27e1b8bba6cd3ad8289baa97 Mon Sep 17 00:00:00 2001 From: Rodrigo Cunha <66736583+eng-rodrigocunha@users.noreply.github.com> Date: Thu, 2 Jan 2025 16:54:09 -0300 Subject: [PATCH] =?UTF-8?q?Remove=20teste=20de=20verifica=C3=A7=C3=A3o=20d?= =?UTF-8?q?e=20quilometragem=20da=20task=20`processa=5Fordem=5Fservico`=20?= =?UTF-8?q?(#377)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * commit inicial * atualiza changelog * atualiza changelog --- .../br_rj_riodejaneiro_gtfs/CHANGELOG.md | 5 ++++ .../br_rj_riodejaneiro_gtfs/utils.py | 26 +++++++++---------- 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/pipelines/migration/br_rj_riodejaneiro_gtfs/CHANGELOG.md b/pipelines/migration/br_rj_riodejaneiro_gtfs/CHANGELOG.md index 37b2f288..dc1493e3 100644 --- a/pipelines/migration/br_rj_riodejaneiro_gtfs/CHANGELOG.md +++ b/pipelines/migration/br_rj_riodejaneiro_gtfs/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog - gtfs +## [1.1.9] - 2025-01-02 + +### Alterado +- Remove teste de verificação de quilometragem da task `processa_ordem_servico` (https://github.com/prefeitura-rio/pipelines_rj_smtr/pull/377) + ## [1.1.8] - 2024-12-30 ### Alterado diff --git a/pipelines/migration/br_rj_riodejaneiro_gtfs/utils.py b/pipelines/migration/br_rj_riodejaneiro_gtfs/utils.py index eef9515d..0f33cb67 100644 --- a/pipelines/migration/br_rj_riodejaneiro_gtfs/utils.py +++ b/pipelines/migration/br_rj_riodejaneiro_gtfs/utils.py @@ -307,19 +307,19 @@ def processa_ordem_servico( if not all_columns_present or not no_duplicate_columns: raise Exception("Missing or duplicated columns in ordem_servico") - quadro_test = quadro_geral.copy() - quadro_test["km_test"] = round( - (quadro_geral["partidas_volta_du"] * quadro_geral["extensao_volta"]) - + (quadro_geral["partidas_ida_du"] * quadro_geral["extensao_ida"]), - 2, - ) - quadro_test["dif"] = quadro_test["km_test"] - quadro_test["km_dia_util"] - - if not ( - round(abs(quadro_test["dif"].max()), 2) <= 0.01 - and round(abs(quadro_test["dif"].min()), 2) <= 0.01 - ): - raise Exception("failed to validate km_test and km_dia_util") + # quadro_test = quadro_geral.copy() + # quadro_test["km_test"] = round( + # (quadro_geral["partidas_volta_du"] * quadro_geral["extensao_volta"]) + # + (quadro_geral["partidas_ida_du"] * quadro_geral["extensao_ida"]), + # 2, + # ) + # quadro_test["dif"] = quadro_test["km_test"] - quadro_test["km_dia_util"] + + # if not ( + # round(abs(quadro_test["dif"].max()), 2) <= 0.01 + # and round(abs(quadro_test["dif"].min()), 2) <= 0.01 + # ): + # raise Exception("failed to validate km_test and km_dia_util") local_file_path = list(filter(lambda x: "ordem_servico" in x, local_filepath))[0] quadro_geral_csv = quadro_geral.to_csv(index=False)