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

Bypass LIMS for delivery report #3153

Merged
merged 18 commits into from
Apr 23, 2024
Merged

Bypass LIMS for delivery report #3153

merged 18 commits into from
Apr 23, 2024

Conversation

ivadym
Copy link
Contributor

@ivadym ivadym commented Apr 18, 2024

Description

The goal is to avoid the delivery report crashing due to samples not being present in LIMS (HTTP exception). While the report creation will still fail, it'll be possible to work around it with the --force flag, including empty data for the application info, methods, and metrics for Rnafusion.

I've also moved some methods from the report api to the analysis api since I've seen some duplication that could be introduced here: #3112

Added

  • Bypass LIMS for delivery report

Changed

  • Moved analysis specific methods from the report API to analysis

How to prepare for test

  • Ssh to relevant server (depending on type of change)
  • Use stage: us
  • Paxa the environment: paxa
  • Install on stage (example for Hasta):
    bash /home/proj/production/servers/resources/hasta.scilifelab.se/update-tool-stage.sh -e S_cg -t cg -b [THIS-BRANCH-NAME] -a

Tests

  • Generate delivery report for a sample that's not in LIMS:

    • With the current master branch (exception raised and not captured, not possible to bypass generation with --force):

    • With this branch (generation fails gracefully, logging the missing report data. --force flag generates a report with empty data):

  • Balsamic delivery-report

  • Rnafusion delivery-report

  • MIP-DNA delivery-report

Review

  • Tests executed by
  • "Merge and deploy" approved by
    Thanks for filling in who performed the code review and the test!

This version is a

  • MAJOR - when you make incompatible API changes
  • MINOR - when you add functionality in a backwards compatible manner
  • PATCH - when you make backwards compatible bug fixes or documentation/instructions

Implementation Plan

  • Document in ...
  • Deploy this branch on ...
  • Inform to ...

@ivadym ivadym requested a review from a team as a code owner April 18, 2024 15:12
@ivadym ivadym self-assigned this Apr 18, 2024
Copy link
Contributor

@henrikstranneheim henrikstranneheim left a comment

Choose a reason for hiding this comment

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

Great cleanup, 👍

cg/apps/lims/api.py Show resolved Hide resolved
cg/apps/lims/api.py Outdated Show resolved Hide resolved
cg/apps/lims/api.py Show resolved Hide resolved
cg/apps/lims/api.py Outdated Show resolved Hide resolved
cg/apps/lims/api.py Outdated Show resolved Hide resolved
cg/meta/report/report_api.py Outdated Show resolved Hide resolved
cg/meta/report/report_api.py Outdated Show resolved Hide resolved
cg/meta/upload/scout/scout_config_builder.py Outdated Show resolved Hide resolved
cg/meta/workflow/analysis.py Outdated Show resolved Hide resolved
cg/meta/workflow/balsamic.py Outdated Show resolved Hide resolved
Copy link
Contributor

@diitaz93 diitaz93 left a comment

Choose a reason for hiding this comment

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

Looks great 💯

cg/apps/lims/api.py Outdated Show resolved Hide resolved
tests/meta/report/conftest.py Outdated Show resolved Hide resolved
@diitaz93 diitaz93 mentioned this pull request Apr 22, 2024
15 tasks
@ivadym ivadym mentioned this pull request Apr 22, 2024
1 task
Copy link

sonarcloud bot commented Apr 22, 2024

Quality Gate Passed Quality Gate passed

Issues
1 New issue
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@ivadym ivadym merged commit a7231e3 into master Apr 23, 2024
9 checks passed
@ivadym ivadym deleted the skip-lims-report branch April 23, 2024 06:34
@ivadym
Copy link
Contributor Author

ivadym commented Apr 23, 2024

Deployed

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

Successfully merging this pull request may close these issues.

3 participants