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

add(CLI automatic delivery fastq workflow) #3692

Merged
merged 15 commits into from
Sep 9, 2024

Conversation

ChrOertlin
Copy link
Contributor

Description

Added

Changed

Fixed

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

How to test

  • Do ...

Expected test outcome

  • Check that ...
  • Take a screenshot and attach or copy/paste the output.

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 ...

@ChrOertlin ChrOertlin requested a review from a team as a code owner September 6, 2024 10:21
cg/cli/deliver/base.py Outdated Show resolved Hide resolved
cg/cli/deliver/base.py Outdated Show resolved Hide resolved
Copy link
Contributor

@islean islean left a comment

Choose a reason for hiding this comment

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

I think the CLI method does a bit much. Would it make sense to have a deliver_cases method in the delivery_service which fetches analyses to deliver, loops through them and updates the analysis objects in statusdb? Not super confident in my judgement but I always like as little logic in the CLI layer as possible. Looks super nice other than that though!

cg/services/analysis_service/analysis_service.py Outdated Show resolved Hide resolved
Copy link
Contributor

@Vince-janv Vince-janv left a comment

Choose a reason for hiding this comment

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

Looks nice! Some comments about the expandability of the command and the reusing of functions

cg/cli/deliver/base.py Outdated Show resolved Hide resolved
cg/services/analysis_service/analysis_service.py Outdated Show resolved Hide resolved
@ChrOertlin
Copy link
Contributor Author

ChrOertlin commented Sep 6, 2024

I think the CLI method does a bit much. Would it make sense to have a deliver_cases method in the delivery_service which fetches analyses to deliver, loops through them and updates the analysis objects in statusdb? Not super confident in my judgement but I always like as little logic in the CLI layer as possible. Looks super nice other than that though!

I agree, I will have a look at this! Edit: The way it is setup now is that it has to build the delivery service for each case. We can't move the logic inside. I made a util function that encapsulates the bigger part of the logic now.

Copy link
Contributor

@Vince-janv Vince-janv 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!

tests/store/filters/test_status_analyses_filters.py Outdated Show resolved Hide resolved
tests/store/crud/update/test_update.py Outdated Show resolved Hide resolved
tests/store/crud/update/test_update.py Outdated Show resolved Hide resolved
tests/store/crud/update/test_update.py Outdated Show resolved Hide resolved
tests/store/crud/update/test_update.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/services/analysis_service/analysis_service.py Outdated Show resolved Hide resolved
Copy link

sonarqubecloud bot commented Sep 9, 2024

@ChrOertlin ChrOertlin merged commit 6ceb0ae into dev-new-delivery-service Sep 9, 2024
8 checks passed
@ChrOertlin ChrOertlin deleted the fix-all-fastq-cli branch September 9, 2024 08:59
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.

4 participants