Skip to content
Snippets Groups Projects
Commit da85993c authored by David Schäfer's avatar David Schäfer
Browse files

changes to the cli

parent 0d5d01d5
No related branches found
No related tags found
No related merge requests found
......@@ -9,19 +9,21 @@ import pandas as pd
from saqc.core import runner
from saqc.flagger import CategoricalFlagger
FLAGGERS = {
"number": CategoricalFlagger([-1, 0, 1]),
"string": CategoricalFlagger(["NIL", "OK", "BAD"])
"category": CategoricalFlagger(["NIL", "OK", "BAD"])
}
@click.command()
@click.option("-c", "--config", type=click.Path(exists=True), required=True, help="path to the configuration file")
@click.option("-d", "--data", type=click.Path(exists=True), required=True, help="path to the data file")
@click.option("--flagger", default="string", type=click.Choice(FLAGGERS.keys()), help="the flagging scheme to use")
@click.option("-o", "--outfile", type=click.Path(), help="path to the output file")
@click.option("--flagger", default="category", type=click.Choice(FLAGGERS.keys()), help="the flagging scheme to use")
@click.option("--nodata", default=np.nan, help="nodata value")
@click.option("--fail/--no-fail", default=True, help="whether to stop the program run on errors")
@click.option("--nodata", default=np.nan, help="the nodata value")
@click.option("--plot/--noplot", default=False, help="whether to plot the results")
def main(config, data, flagger, fail, nodata, plot):
def main(config, data, flagger, outfile, nodata, fail):
data = pd.read_csv(
data,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment