From 9e87b57f9beb70e419f82333e6380d94c76c8d9b Mon Sep 17 00:00:00 2001 From: Jacob Willis Date: Wed, 20 Dec 2023 09:41:05 -0500 Subject: [PATCH] fix formatting' --- scenarios/context.py | 2 +- scenarios/run_scenario.py | 30 ++++++++++++++++++++++-------- 2 files changed, 23 insertions(+), 9 deletions(-) diff --git a/scenarios/context.py b/scenarios/context.py index 8f6f350..439c98b 100644 --- a/scenarios/context.py +++ b/scenarios/context.py @@ -6,4 +6,4 @@ import sys sys.path.insert(0, os.path.abspath( os.path.join(os.path.dirname(__file__), '..', 'flight'))) # noqa -# fmt: on \ No newline at end of file +# fmt: on diff --git a/scenarios/run_scenario.py b/scenarios/run_scenario.py index 5483fe8..0231692 100755 --- a/scenarios/run_scenario.py +++ b/scenarios/run_scenario.py @@ -5,24 +5,38 @@ import os import context -import pygnc_main # type: ignore +import pygnc_main # type: ignore # full linewidth printing np.set_printoptions( edgeitems=30, linewidth=100000, formatter=dict(float=lambda x: "%.3e" % x) -) +) + def main(scenario_path, timeout, spacecraft_time): - pygnc_main.pygnc_config.batch_sensor_gps_filepath = os.path.join(scenario_path, "batch_sensor_gps_data.bin") + pygnc_main.pygnc_config.batch_sensor_gps_filepath = os.path.join( + scenario_path, "batch_sensor_gps_data.bin" + ) pygnc_main.main(timeout, spacecraft_time) - if __name__ == "__main__": - parser = argparse.ArgumentParser(description="Run the pygnc software stack locally with a scenario as input, bypassing the tty") - parser.add_argument('scenario_path', help="Path to the scenario directory") - parser.add_argument('--timeout', '-t', default=600, help="Allotted runtime in seconds - pi will shut down after this time") - parser.add_argument('--spacecraft_time', '-s', default=1699924855, help="Spacecraft time since Unix epoch in seconds") + parser = argparse.ArgumentParser( + description="Run the pygnc software stack locally with a scenario as input, bypassing the tty" + ) + parser.add_argument("scenario_path", help="Path to the scenario directory") + parser.add_argument( + "--timeout", + "-t", + default=600, + help="Allotted runtime in seconds - pi will shut down after this time", + ) + parser.add_argument( + "--spacecraft_time", + "-s", + default=1699924855, + help="Spacecraft time since Unix epoch in seconds", + ) args = parser.parse_args()