Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[O2B-1365] Disable GAQ for not fully covered runs #1784

Open
wants to merge 42 commits into
base: main
Choose a base branch
from

Conversation

xsalonx
Copy link
Collaborator

@xsalonx xsalonx commented Oct 14, 2024

I have a JIRA ticket

  • branch and/or PR name(s) include(s) JIRA ID
  • issue has "Fix version" assigned
  • issue "Status" is set to "In review"
  • PR labels are selected

Notable changes for users:

  • GAQ summary is not displayed when not all runs are fully covered by QC flags
  • GAQ overview shows not covered periods

Notable changes for developers:

  • Added QC flags seeders to cover corner cases of QC/GAQ summaries displays
  • Reworked QC flag Types seeders to make them more meaningful

Changes made to the database:

  • NA

Copy link

codecov bot commented Oct 14, 2024

Codecov Report

Attention: Patch coverage is 89.58333% with 5 lines in your changes missing coverage. Please review.

Project coverage is 43.83%. Comparing base (8ce02ce) to head (40bb12d).

Files with missing lines Patch % Lines
...ews/QcFlags/ActiveColumns/gaqFlagsActiveColumns.js 0.00% 4 Missing ⚠️
...Runs/RunPerDataPass/RunsPerDataPassOverviewPage.js 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1784      +/-   ##
==========================================
+ Coverage   43.78%   43.83%   +0.05%     
==========================================
  Files         893      893              
  Lines       15959    15981      +22     
  Branches     3005     3013       +8     
==========================================
+ Hits         6987     7006      +19     
- Misses       8972     8975       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@xsalonx xsalonx changed the title [O2B-1365] Disable GAQ summary if not all detectors have full coverage [O2B-1365] Disable GAQ for not fully covered runs Nov 21, 2024
@xsalonx xsalonx marked this pull request as ready for review November 21, 2024 11:32
@@ -27,6 +27,26 @@ const GAQ_PERIODS_VIEW = `
ROWS BETWEEN CURRENT ROW AND 1 FOLLOWING
) AS \`to\`
FROM (
-- Two selects for runs' timestamps (in case QC flag's eff. period doesn't start at run's start or end at run's end )
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This raw SQL querries start to be very complex. Could you try to create a view that would simplify this?
First, you should already use time_start and time_end that already coalesce time_trg_start and time_trg_end
Also, coalesce null timestamp to 0 works but is a bit wrong in my opinion.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

applied in xsalonx/gaq/O2B-1365/disable-gaq-if-detector-is-missing---with-views

Comment on lines 362 to 367
for (const runSummaries of Object.values(summary)) {
for (const runDetectorSummary of Object.values(runSummaries)) {
this._fillQcSummaryMissingValues(runDetectorSummary);
}
}

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this would fit in a function on its own. I would use the function name _fillQcSummaryMissingValues to wrap this double for loop, then the per-unit function would be named _fillQcFummaryUnitMissingValues

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not to wrap single-for-loop with this filling method which occur in getGaqSummary(...) ?

Comment on lines 74 to 80
const QC_SUMMARY_PROPERTIES = {
badEffectiveRunCoverage: 'badEffectiveRunCoverage',
explicitlyNotBadEffectiveRunCoverage: 'explicitlyNotBadEffectiveRunCoverage',
qualityNotDefinedEffectiveRunCoverage: 'qualityNotDefinedEffectiveRunCoverage',
missingVerificationsCount: 'missingVerificationsCount',
mcReproducible: 'mcReproducible',
};
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure this is a correct way to do things. Don't you think that wrapping all this in a class would make more sense?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

.to.be.equal('Missing 3 verifications');
await expectInnerText(page, '#row106-globalAggregatedQuality', 'GAQ');

await goToPage(page, 'runs-per-data-pass', { queryParameters: { dataPassId: 3 } });
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should avoid goToPage, could you try to use a different way?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

});

it('should switch mcReproducibleAsNotBad', async () => {
await goToPage(page, 'runs-per-data-pass', { queryParameters: { dataPassId: 1 } });
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same, we should avoid goToPage

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants