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

Fix code smell by refactoring add_decompressed_fastq_files_to_housekeeper #2597

Merged
merged 15 commits into from
Nov 1, 2023

Conversation

islean
Copy link
Contributor

@islean islean commented Oct 17, 2023

Description

In #2378 there was a code smell left that this PR handles. It reduces the complexity in add_decompressed_fastq_files_to_housekeeper.

Fixed

  • add_decompressed_fastq_files_to_housekeeper is split into smaller methods.

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 fix-code-smell -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 ...

@islean islean requested a review from a team as a code owner October 17, 2023 07:25
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.

This is beautiful 🌷 Maybe add some tests too 👀

@islean
Copy link
Contributor Author

islean commented Oct 17, 2023

This is beautiful 🌷 Maybe add some tests too 👀

I definitely could but this is essentially some cutting and pasting work 😅 Does not seem to be any unit tests for this functionality previously though.

@diitaz93
Copy link
Contributor

This is beautiful 🌷 Maybe add some tests too 👀

I definitely could but this is essentially some cutting and pasting work 😅 Does not seem to be any unit tests for this functionality previously though.

Yes, that is what I meant. I think we should try to add tests to functions we touch if they don't have any. But if you feel it is out of scope feel free to disregard

@islean
Copy link
Contributor Author

islean commented Oct 27, 2023

@diitaz93 Added some tests now!

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.

Good job with the tests 👍

Copy link

sonarqubecloud bot commented Nov 1, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@islean
Copy link
Contributor Author

islean commented Nov 1, 2023

Tests performed successfully:

Screenshot 2023-11-01 at 10 14 31

@islean islean merged commit 26bc3ff into master Nov 1, 2023
@islean islean deleted the fix-code-smell branch November 1, 2023 09:27
@islean
Copy link
Contributor Author

islean commented Nov 1, 2023

Deployed to production:

Logging deploy ...
Getting deployer... done.
Getting last commit message and SHA... done.
Getting version of deploy scripts... /home/isak.ohlsson
done.
Log deploy... done.
cg, version 51.10.4
1d [isak.ohlsson@hasta:~] [P_base] 1m13s $ 

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.

2 participants