Skip to content

Commit

Permalink
remove mission_nature
Browse files Browse the repository at this point in the history
  • Loading branch information
asnayou authored and VincentAntoine committed Jun 9, 2023
1 parent 908fc6f commit ad3c98f
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 23 deletions.
2 changes: 0 additions & 2 deletions datascience/src/pipeline/flows/historic_controls.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,6 @@ def make_env_actions(historic_controls: pd.DataFrame) -> pd.DataFrame:
axis=1,
)

breakpoint()

# fin du preprocessing
historic_controls.drop(
["action_number_of_controls", "Themes", "natinf", "infractions"],
Expand Down
1 change: 0 additions & 1 deletion datascience/src/pipeline/queries/fmc/historic_missions.sql
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ FMC2.FMC_CODE_PLAN_FACADE.LIBELLE as facade,
FMC2.FMC_BC_MISSION.DATE_DEBUT_MISSION as start_datetime_utc,
FMC2.FMC_BC_MISSION.DATE_FIN_MISSION as end_datetime_utc,
FMC2.FMC_BC_MISSION.TRIGRAMME_UTILISATEUR_CLOTURE AS closed_by,
'{ENV}' AS mission_nature,
'POSEIDON_CACEM' AS mission_source,
FMC2.FMC_BC_MISSION.CLOTURER as closed

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,15 +99,6 @@
pd.Timestamp("22/04/2017 10:30:00"),
],
"closed_by": ["VSQ", "VSQ", "GYT", "RIO", "CBG", "VSQ", "VSQ"],
"mission_nature": [
"{ENV}",
"{ENV}",
"{ENV}",
"{ENV}",
"{ENV}",
"{ENV}",
"{ENV}",
],
"mission_source": [
"POSEIDON_CACEM",
"POSEIDON_CACEM",
Expand Down Expand Up @@ -377,15 +368,6 @@ def transformed_historic_missions() -> pd.DataFrame:
pd.Timestamp("22/04/2017 10:30:00"),
],
"closed_by": ["VSQ", "VSQ", "GYT", "RIO", "CBG", "VSQ", "VSQ"],
"mission_nature": [
"{ENV}",
"{ENV}",
"{ENV}",
"{ENV}",
"{ENV}",
"{ENV}",
"{ENV}",
],
"mission_source": [
"POSEIDON_CACEM",
"POSEIDON_CACEM",
Expand Down Expand Up @@ -476,7 +458,6 @@ def mock_extract_historic_missions_units_in_flow() -> pd.DataFrame:
def test_make_env_actions(historic_controls, transformed_historic_controls):
with patch("src.pipeline.flows.historic_controls.uuid", mock_uuid):
res = make_env_actions.run(historic_controls)
breakpoint()
pd.testing.assert_frame_equal(res, transformed_historic_controls)


Expand Down Expand Up @@ -513,7 +494,7 @@ def test_flow(

query_missions = (
"SELECT id, mission_types, open_by, observations_cacem, facade,"
" start_datetime_utc, closed_by, mission_nature, mission_source,"
" start_datetime_utc, closed_by, mission_source,"
" closed, observations_cnsp, deleted, geom FROM missions ORDER BY id"
)
initial_missions = read_query("monitorenv_remote", query_missions)
Expand Down

0 comments on commit ad3c98f

Please sign in to comment.