From df2e2060ab4881c75033709543f182e0382dd695 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=98yvind=20Eide?= Date: Tue, 22 Oct 2024 14:39:16 +0200 Subject: [PATCH] Remove unused entry points These jobs are already installed as project scripts, meaning that the entry point is redundant. --- src/everest_models/jobs/fm_add_templates/cli.py | 5 ----- src/everest_models/jobs/fm_compute_economics/cli.py | 6 ------ src/everest_models/jobs/fm_drill_date_planner/cli.py | 5 ----- src/everest_models/jobs/fm_drill_planner/cli.py | 6 ------ src/everest_models/jobs/fm_extract_summary_data/cli.py | 4 ---- src/everest_models/jobs/fm_interpret_well_drill/cli.py | 4 ---- src/everest_models/jobs/fm_npv/cli.py | 6 ------ src/everest_models/jobs/fm_rf/cli.py | 5 ----- src/everest_models/jobs/fm_schmerge/cli.py | 4 ---- src/everest_models/jobs/fm_select_wells/cli.py | 5 ----- src/everest_models/jobs/fm_stea/cli.py | 6 ------ src/everest_models/jobs/fm_strip_dates/cli.py | 5 ----- src/everest_models/jobs/fm_well_constraints/cli.py | 6 ------ src/everest_models/jobs/fm_well_filter/cli.py | 4 ---- src/everest_models/jobs/fm_well_swapping/cli.py | 6 ------ src/everest_models/jobs/fm_well_trajectory/cli.py | 6 ------ 16 files changed, 83 deletions(-) diff --git a/src/everest_models/jobs/fm_add_templates/cli.py b/src/everest_models/jobs/fm_add_templates/cli.py index 10a8dcd..1b08d4d 100755 --- a/src/everest_models/jobs/fm_add_templates/cli.py +++ b/src/everest_models/jobs/fm_add_templates/cli.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python import collections import logging from typing import Iterable @@ -64,7 +63,3 @@ def main_entry_point(args=None): args_parser.error("No template matched:\n" + msg) options.input.json_dump(options.output) - - -if __name__ == "__main__": - main_entry_point() diff --git a/src/everest_models/jobs/fm_compute_economics/cli.py b/src/everest_models/jobs/fm_compute_economics/cli.py index 01eca5d..c250f62 100644 --- a/src/everest_models/jobs/fm_compute_economics/cli.py +++ b/src/everest_models/jobs/fm_compute_economics/cli.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python - import argparse import logging @@ -94,7 +92,3 @@ def main_entry_point(args=None): ) options.config.output.file.write_text(f"{economic_indicator:.2f}") - - -if __name__ == "__main__": - main_entry_point() diff --git a/src/everest_models/jobs/fm_drill_date_planner/cli.py b/src/everest_models/jobs/fm_drill_date_planner/cli.py index f950d52..16ab703 100755 --- a/src/everest_models/jobs/fm_drill_date_planner/cli.py +++ b/src/everest_models/jobs/fm_drill_date_planner/cli.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python import itertools import logging @@ -49,7 +48,3 @@ def main_entry_point(args=None): logger.info(f"Writing results to {options.output}") options.input.json_dump(options.output) - - -if __name__ == "__main__": - main_entry_point() diff --git a/src/everest_models/jobs/fm_drill_planner/cli.py b/src/everest_models/jobs/fm_drill_planner/cli.py index d93c6dc..cf9003f 100755 --- a/src/everest_models/jobs/fm_drill_planner/cli.py +++ b/src/everest_models/jobs/fm_drill_planner/cli.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python - from everest_models.jobs.fm_drill_planner.manager import get_field_manager from everest_models.jobs.fm_drill_planner.parser import build_argument_parser from everest_models.jobs.fm_drill_planner.tasks import orcastrate_drill_schedule @@ -120,7 +118,3 @@ def main_entry_point(args=None): manager, options.input.to_dict(), options.config.start_date, options.time_limit ) options.input.json_dump(options.output) - - -if __name__ == "__main__": - main_entry_point() diff --git a/src/everest_models/jobs/fm_extract_summary_data/cli.py b/src/everest_models/jobs/fm_extract_summary_data/cli.py index 75f888c..5d78981 100755 --- a/src/everest_models/jobs/fm_extract_summary_data/cli.py +++ b/src/everest_models/jobs/fm_extract_summary_data/cli.py @@ -29,7 +29,3 @@ def main_entry_point(args=None): end_date=options.end_date, ) options.output.write_text(f"{result * options.multiplier:.10f}") - - -if __name__ == "__main__": - main_entry_point() diff --git a/src/everest_models/jobs/fm_interpret_well_drill/cli.py b/src/everest_models/jobs/fm_interpret_well_drill/cli.py index 2fa0f12..c576d72 100755 --- a/src/everest_models/jobs/fm_interpret_well_drill/cli.py +++ b/src/everest_models/jobs/fm_interpret_well_drill/cli.py @@ -20,7 +20,3 @@ def main_entry_point(args=None): with options.output.open("w", encoding="utf-8") as fp: json.dump([well for well, value in options.input.items() if value >= 0.5], fp) - - -if __name__ == "__main__": - main_entry_point() diff --git a/src/everest_models/jobs/fm_npv/cli.py b/src/everest_models/jobs/fm_npv/cli.py index f76bc5e..044ec82 100755 --- a/src/everest_models/jobs/fm_npv/cli.py +++ b/src/everest_models/jobs/fm_npv/cli.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python - import argparse import logging @@ -139,7 +137,3 @@ def main_entry_point(args=None): ) options.output.write_text(f"{npv:.2f}") - - -if __name__ == "__main__": - main_entry_point() diff --git a/src/everest_models/jobs/fm_rf/cli.py b/src/everest_models/jobs/fm_rf/cli.py index 4eee537..e686f98 100755 --- a/src/everest_models/jobs/fm_rf/cli.py +++ b/src/everest_models/jobs/fm_rf/cli.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python import logging from everest_models.jobs.fm_rf.parser import args_parser @@ -28,7 +27,3 @@ def main_entry_point(args=None): if options.output: logger.info(f"Writing results to {options.output}") options.output.write_text(f"{rf:.6f}") - - -if __name__ == "__main__": - main_entry_point() diff --git a/src/everest_models/jobs/fm_schmerge/cli.py b/src/everest_models/jobs/fm_schmerge/cli.py index d76fc4c..4a61859 100755 --- a/src/everest_models/jobs/fm_schmerge/cli.py +++ b/src/everest_models/jobs/fm_schmerge/cli.py @@ -19,7 +19,3 @@ def main_entry_point(args=None): options.input.dated_operations(), options.schedule ) options.output.write_text(schedule) - - -if __name__ == "__main__": - main_entry_point() diff --git a/src/everest_models/jobs/fm_select_wells/cli.py b/src/everest_models/jobs/fm_select_wells/cli.py index c66f962..39d5361 100755 --- a/src/everest_models/jobs/fm_select_wells/cli.py +++ b/src/everest_models/jobs/fm_select_wells/cli.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python import logging from everest_models.jobs.fm_select_wells import tasks @@ -30,7 +29,3 @@ def main_entry_point(args=None): logger.info(f"Writing results to {options.output}") options.input.json_dump(options.output) - - -if __name__ == "__main__": - main_entry_point() diff --git a/src/everest_models/jobs/fm_stea/cli.py b/src/everest_models/jobs/fm_stea/cli.py index a439c8f..f5ad59b 100755 --- a/src/everest_models/jobs/fm_stea/cli.py +++ b/src/everest_models/jobs/fm_stea/cli.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python - import logging import stea @@ -87,7 +85,3 @@ def main_entry_point(args=None): ): with open(f"{res}", "w") as ofh: ofh.write(f"{value}\n") - - -if __name__ == "__main__": - main_entry_point() diff --git a/src/everest_models/jobs/fm_strip_dates/cli.py b/src/everest_models/jobs/fm_strip_dates/cli.py index 493b3f6..e4d474b 100755 --- a/src/everest_models/jobs/fm_strip_dates/cli.py +++ b/src/everest_models/jobs/fm_strip_dates/cli.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python import logging from everest_models.jobs.fm_strip_dates import tasks @@ -37,7 +36,3 @@ def main_entry_point(args=None): except RuntimeError as err: logger.error(str(err)) args_parser.exit(1, str(err)) - - -if __name__ == "__main__": - main_entry_point() diff --git a/src/everest_models/jobs/fm_well_constraints/cli.py b/src/everest_models/jobs/fm_well_constraints/cli.py index 5671157..5f2ff92 100755 --- a/src/everest_models/jobs/fm_well_constraints/cli.py +++ b/src/everest_models/jobs/fm_well_constraints/cli.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python - import logging import typing from functools import partial @@ -204,7 +202,3 @@ def main_entry_point(args=None): ) options.input.json_dump(options.output) - - -if __name__ == "__main__": - main_entry_point() diff --git a/src/everest_models/jobs/fm_well_filter/cli.py b/src/everest_models/jobs/fm_well_filter/cli.py index acf7b28..3968b75 100755 --- a/src/everest_models/jobs/fm_well_filter/cli.py +++ b/src/everest_models/jobs/fm_well_filter/cli.py @@ -68,7 +68,3 @@ def main_entry_point(args=None): ) options.input.json_dump(options.output) - - -if __name__ == "__main__": - main_entry_point() diff --git a/src/everest_models/jobs/fm_well_swapping/cli.py b/src/everest_models/jobs/fm_well_swapping/cli.py index 92bbdfb..8979d91 100755 --- a/src/everest_models/jobs/fm_well_swapping/cli.py +++ b/src/everest_models/jobs/fm_well_swapping/cli.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python - from typing import Optional, Sequence from .tasks import ( @@ -22,7 +20,3 @@ def main_entry_point(args: Optional[Sequence[str]] = None): ), ) data.cases.json_dump(data.output) - - -if __name__ == "__main__": - main_entry_point() diff --git a/src/everest_models/jobs/fm_well_trajectory/cli.py b/src/everest_models/jobs/fm_well_trajectory/cli.py index 99fc437..d3b54d5 100755 --- a/src/everest_models/jobs/fm_well_trajectory/cli.py +++ b/src/everest_models/jobs/fm_well_trajectory/cli.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python - import logging from pathlib import Path @@ -51,7 +49,3 @@ def main_entry_point(args=None): write_mlt_guide_points(mlt_guide_points, Path("mlt_guide_points.json")) logger.info("Writing multilateral guide md's to 'mlt_guide_md.json'") write_mlt_guide_md(mlt_guide_points, Path("mlt_guide_md.json")) - - -if __name__ == "__main__": - main_entry_point()