Skip to content

Commit

Permalink
review_reports without @none labels and without confusing RangeIndex
Browse files Browse the repository at this point in the history
  • Loading branch information
johentsch committed Dec 16, 2022
1 parent 8381cfe commit ca0d630
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ms3/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -350,10 +350,10 @@ def review_cmd(args,
report_path = os.path.join(file.corpus_path, 'reviewed', file.fname + '_reviewed.tsv')
write_tsv(df, report_path)
report = pd.concat(dataframes, keys=keys)
warning_selection = report.count_ratio > args.threshold
warning_selection = (report.count_ratio > args.threshold) & report.chord_tones.notna()
if warning_selection.sum() > 0:
test_passes = False
filtered_report = report[warning_selection]
filtered_report = report[warning_selection].droplevel(-1)
pretty_report = filtered_report.to_string(columns=['mc', 'mn', 'mc_onset', 'label', 'chord_tones', 'added_tones', 'n_colored', 'n_untouched', 'count_ratio'])
logger.warning(pretty_report,
extra={'message_id': (19,)})
Expand Down

0 comments on commit ca0d630

Please sign in to comment.