Merge pull request 'add function to only show a single arg with the find cli' (#16) from fix/cli-find into master
Reviewed-on: https://www.kuhl-mann.de/git/git/jkuhl/corrlib/pulls/16
This commit is contained in:
commit
d8ce7952b8
1 changed files with 11 additions and 2 deletions
|
|
@ -90,6 +90,11 @@ def find(
|
||||||
"--dataset",
|
"--dataset",
|
||||||
"-d",
|
"-d",
|
||||||
),
|
),
|
||||||
|
arg: str = typer.Option(
|
||||||
|
str('all'),
|
||||||
|
"--show",
|
||||||
|
"-s",
|
||||||
|
),
|
||||||
ensemble: str = typer.Argument(),
|
ensemble: str = typer.Argument(),
|
||||||
corr: str = typer.Argument(),
|
corr: str = typer.Argument(),
|
||||||
code: str = typer.Argument(),
|
code: str = typer.Argument(),
|
||||||
|
|
@ -98,8 +103,12 @@ def find(
|
||||||
Find a record in the backlog at hand. Through specifying it's ensemble and the measured correlator.
|
Find a record in the backlog at hand. Through specifying it's ensemble and the measured correlator.
|
||||||
"""
|
"""
|
||||||
results = find_record(path, ensemble, corr, code)
|
results = find_record(path, ensemble, corr, code)
|
||||||
print(results)
|
if arg == "all":
|
||||||
|
print(results)
|
||||||
|
else:
|
||||||
|
for i in range(len(results)):
|
||||||
|
print(results[arg].values[i])
|
||||||
|
return
|
||||||
|
|
||||||
@app.command()
|
@app.command()
|
||||||
def importer(
|
def importer(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue