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

rnafusion HK tags as constants #2759

Merged
merged 5 commits into from
Dec 13, 2023
Merged

rnafusion HK tags as constants #2759

merged 5 commits into from
Dec 13, 2023

Conversation

fevac
Copy link
Contributor

@fevac fevac commented Dec 11, 2023

Description

Closes #2743

Changed

  • Use constants for rnafusion HK tags instead of strings

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 delivery_constants -a

How to test

  • cg upload -c RNAFUSION_CASE. Make sure it's successful

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

@fevac fevac marked this pull request as ready for review December 11, 2023 14:17
@fevac fevac requested a review from a team as a code owner December 11, 2023 14:17
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 good 🙌

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.

Looks good! A bit unsure what the scope is - should all instances be switched or is that for a separate PR in some future?

cg/constants/delivery.py Outdated Show resolved Hide resolved
Copy link
Contributor

@ivadym ivadym left a comment

Choose a reason for hiding this comment

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

I'm not particularly keen on adding these constants, mainly because they make it more difficult to visualise which set of tags we are delivering and further expand the problem of having the tag logic in two different places, Hermes and CG.

Perhaps this issue needs to be further refined:

  • Are these constants file-specific? I don't think so. Should they be? I don't know. Maybe having constants for file names that are assigned a bunch of tags isn't a bad idea.
  • Why are we having this logic on both sides (Hermes and CG) and not using the deliver tag that we add in Hermes?
  • If we use the deliver tag, how do we differentiate between deliver-sample and deliver-case? Perhaps that's what we need to actually fix and deliver using only those two tags.

@fevac
Copy link
Contributor Author

fevac commented Dec 12, 2023

I'm not particularly keen on adding these constants, mainly because they make it more difficult to visualise which set of tags we are delivering and further expand the problem of having the tag logic in two different places, Hermes and CG.

@ivadym This pr only replaces strings by constants and I don't think the use of constants make it more difficult to visualize which set of tags are used. It's the opposite to me and it also makes it easier to pinpoint tags that should be the same. I agree that the duplication between hermes and cg is a problem and should be revisited but this PR doesn't expand the problem further.

Perhaps this issue needs to be further refined:

  • Are these constants file-specific? I don't think so. Should they be? I don't know. Maybe having constants for file names that are assigned a bunch of tags isn't a bad idea.

Some are some are not. I don't think how this is relevant for this.

  • Why are we having this logic on both sides (Hermes and CG) and not using the deliver tag that we add in Hermes?

I don't know and I fully agree. But that is 100% out of the scope of this PR

  • If we use the deliver tag, how do we differentiate between deliver-sample and deliver-case? Perhaps that's what we need to actually fix and deliver using only those two tags.

Good point

I do agree duplication between cg and hermes should be addressed, but in the meantime. Should I leave this as constant or strings? I don't mind which way. I do see benefit of removing strings that are redundant but I don't really care one way or another.

@ivadym
Copy link
Contributor

ivadym commented Dec 12, 2023

Some are some are not. I don't think how this is relevant for this.

For me it would make more sense to define files as constants that contain a set of tags. But as you said, some are file specific, some are not. And it's out of scope of this PR 🙃

I do agree duplication between cg and hermes should be addressed, but in the meantime. Should I leave this as constant or strings? I don't mind which way. I do see benefit of removing strings that are redundant but I don't really care one way or another.

I think you should proceed with it. Although it doesn’t add any additional semantic meaning it will help to keep our coding style consistent

And thanks for opening the issue ⭐

Copy link

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

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

See analysis details on SonarCloud

@fevac
Copy link
Contributor Author

fevac commented Dec 13, 2023

tests are passing

@fevac fevac merged commit 0a0cb55 into master Dec 13, 2023
8 checks passed
@fevac fevac deleted the delivery_constants branch December 13, 2023 07:44
@fevac
Copy link
Contributor Author

fevac commented Dec 13, 2023

Deployed in stage

image

Deployed in prod

image

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.

add class AnalysisSampleTags
4 participants