Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 38 additions & 1 deletion vernier_parser/vernier_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__":
Expand Down
13 changes: 13 additions & 0 deletions vernier_parser/vernier_series.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Loading