Skip to content

Commit

Permalink
add only fail output option to cf status
Browse files Browse the repository at this point in the history
  • Loading branch information
DocOtak committed Mar 20, 2024
1 parent f29b239 commit 7e355c6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cchdo/hydro/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,8 @@ def status_exchange(dtype, out_dir, dump_unknown_params, verbose, dump_data_coun
@status.command()
@click.argument("out_dir")
@click.option("-v", "--verbose", count=True)
def status_cf_derived(out_dir, verbose):
@click.option("--only-fail", is_flag=True)
def status_cf_derived(out_dir, verbose, only_fail):
from cchdo.hydro import __version__ as hydro_version
from cchdo.params import __version__ as params_version

Expand Down Expand Up @@ -359,6 +360,8 @@ def status_cf_derived(out_dir, verbose):
)
for result in sorted(results, key=lambda x: x[0]["id"]):
metadata, excahnge_ok, coards_ok, woce_ok, sum_ok = result
if only_fail and all([excahnge_ok, coards_ok, woce_ok, sum_ok]):
continue
try:
expos = [cruises[c]["expocode"] for c in metadata["cruises"]]
crs = ", ".join(
Expand Down

0 comments on commit 7e355c6

Please sign in to comment.