Commit bb1d7a8e authored by Carl Schaffer's avatar Carl Schaffer
Browse files

finalizing interface for calib parsing

parent 817ed941
......@@ -2,9 +2,12 @@ import logging
from kis_tools.interface import BasicArgParser
from kis_tools.interface.commandline_interface import add_option_outfile
from kis_tools.util.swag import greeter
logger = logging.getLogger(__name__)
parser = BasicArgParser()
......@@ -24,4 +27,7 @@ from kis_tools.gris.calib_settings.parsing import parse_path
df = parse_path(folder_in)
# Output:
if args.output_file
if args.output_file:
......@@ -5,11 +5,10 @@ from os.path import join
from pathlib import Path
import numpy as np
from kis_tools.util.util import gris_run_number, date_from_fn
from pandas import DataFrame
from tqdm import tqdm
from kis_tools.util.util import gris_run_number, date_from_fn
def parse_file(path):
......@@ -38,7 +37,7 @@ def parse_file(path):
varname, value = res.groups()
env[varname] = value.strip()
main_call_match ="^(gris(?:_v6|_v7|_sp){0,1})\s*,", line)
main_call_match ="^(gris(?:_v[0-9]+|_sp){0,1})\s*,", line)
if main_call_match:
routine =
......@@ -115,7 +115,7 @@ def add_arg_infile(parser):
def add_option_outfile(parser):
"""Add option for output to file"""
parser.add_argument("-f", "--output-file", default=None, help="output file")
parser.add_argument("-o", "--output-file", default=None, help="output file")
def add_option_run(parser):
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment