Skip to content
Snippets Groups Projects

added label mechanics to isFlagged / implemented lebelMechanics test

Merged Peter Lünenschloß requested to merge Make_isFlagged_testfunction_sensitive into develop

Added label keyword mechanics to isFlagged (as discussed on the phone with @schaefed).

  • Implementation is quite non-invasive.
  • Biggest change: since history informations must be known to isFlagged - global, the histories get passed on to execGeneric (as opposed to only getting squeezed flags columns)
  • added test

Test like so:

dat = pd.DataFrame({'data1': [1, 1, 5, 2, 1], 'data2': [1, 1, 2, 3, 4]}, index=pd.date_range('2000', '2005', periods=5))

qc = SaQC(dat)
qc = qc.flagRange('data1', max=4, label='out of range')
qc = qc.flagRange('data1', max=0, label='out of range2')
qc = qc.flagGeneric('data1', target='data2',func=lambda x: isflagged(x, 'out of range'))

Expected result is, that data2 only is flagged where first call to flagRange triggered flagging for data1.

closes #336 (closed)

Edited by Peter Lünenschloß

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • added 1 commit

    Compare with previous version

  • David Schäfer
  • Peter Lünenschloß changed the description

    changed the description

  • added 1 commit

    • 68488530 - made it so that last occurence of label is selected

    Compare with previous version

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading