Skip to content

Commit

Permalink
Remove teste de verificação de quilometragem da task `processa_ordem_…
Browse files Browse the repository at this point in the history
…servico` (#377)

* commit inicial

* atualiza changelog

* atualiza changelog
  • Loading branch information
eng-rodrigocunha authored Jan 2, 2025
1 parent b0e15fb commit 7def189
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 13 deletions.
5 changes: 5 additions & 0 deletions pipelines/migration/br_rj_riodejaneiro_gtfs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
26 changes: 13 additions & 13 deletions pipelines/migration/br_rj_riodejaneiro_gtfs/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 7def189

Please sign in to comment.