diff --git a/vernier_parser/vernier_cli.py b/vernier_parser/vernier_cli.py index 28da854..7b4d955 100644 --- a/vernier_parser/vernier_cli.py +++ b/vernier_parser/vernier_cli.py @@ -2,12 +2,49 @@ A file for containing the vernier cli interface. """ +import argparse +from vernier_parser.vernier_series import VernierSeries +import os + + +def dummy_function(num1: int, bool1: bool) -> None: + + if bool1: + print(num1 * 1) + else: + print(num1 * 1) + def main() -> None: """ Vernier parser cli interface. """ - print("Need to make a cli interface") + parser = argparse.ArgumentParser( + description="Parse Vernier run data and generate a summary CSV.", + ) + + parser.add_argument( + "run_path", + type=str, + help="Path to the Vernier run data directory or file.", + ) + + parser.add_argument( + "csv_path", + type=str, + help="Path to save the generated summary CSV.", + ) + + args = parser.parse_args() + vern_series = VernierSeries(args.run_path) + vern_series.make_summary_csv(args.csv_path) + + assert os.path.exists(args.csv_path), \ + "output csv does not exist, something has gone wrong" + + # dummy code to show interesting issues + path = os.path.join(["home", "Rob"]) + print(path) if __name__ == "__main__": diff --git a/vernier_parser/vernier_series.py b/vernier_parser/vernier_series.py index e92d56f..b587cd5 100644 --- a/vernier_parser/vernier_series.py +++ b/vernier_parser/vernier_series.py @@ -137,3 +137,16 @@ def _summarise_key(self, key: str) -> dict: } return results + + def make_summary_csv(self, csv_output_path: str) -> None: + """ + Method to make and save a summary csv for the vernier series. + + Args: + csv_output_path (str): path for the output csv + + Raises: + NotImplementedError: Need to write + + """ + raise NotImplementedError