From 05be6761c6e887a43acda40d95e1d43c84bf2791 Mon Sep 17 00:00:00 2001 From: 0xFugue <119708655+0xFugue@users.noreply.github.com> Date: Wed, 16 Aug 2023 12:42:41 +0530 Subject: [PATCH] cli, skeleton --- scripts/analysis.py | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 scripts/analysis.py diff --git a/scripts/analysis.py b/scripts/analysis.py new file mode 100644 index 0000000..a73fd61 --- /dev/null +++ b/scripts/analysis.py @@ -0,0 +1,37 @@ +import typer +import logging as log +from pathlib import Path + +def read_csv(sim_dfile): + df=None + return df + +def write_csv(df): + pass + + +def plot_vtimes(df, oprefix=""): + pass + + +def compute_vtimes(df): + pass + + +def main(ctx: typer.Context, + config_file: Path = typer.Option("config.json", + exists=True, file_okay=True, readable=True, + help="Set the config file"), + data_file: Path = typer.Option("simout.csv", + exists=True, file_okay=True, readable=True, + help="Set the simulation data file"), + oprefix: str = typer.Option("output", + help="Set the output prefix for the plots"), + debug: bool = typer.Option(True, + help="Set debug") + ): + log.info(config_file, data_file, oprefix, debug) + + +if __name__ == "__main__": + typer.run(main)