Refactor cancer SNVs code to use shared routines#6128
Refactor cancer SNVs code to use shared routines#6128northwestwitch wants to merge 11 commits intomainfrom
Conversation
|
|
||
| # When a POST request with filter containing wrongly formatted parameters is sent | ||
| form_data = { | ||
| "control_frequency": "not a number!", |
There was a problem hiding this comment.
Removed this test which is testing an impossible condition, as the form now has enforced a HTML5 check, so you can't enter a string - it just accepts numbers
NOTE that the test would have failed with
assert 200 == 302
This is because cancer variant form is currently validated.
Validation is lost with the refactoring - it's complicated to have a common function and just validate cancer variants forms on POST request. Would be much easier to start working on a common validation code for each variant type at a later stage.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6128 +/- ##
==========================================
- Coverage 83.93% 83.88% -0.06%
==========================================
Files 343 343
Lines 21174 21126 -48
==========================================
- Hits 17773 17722 -51
- Misses 3401 3404 +3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| if category == "snv": | ||
| args.append(request.form) | ||
| elif category == "cancer": | ||
| args.append(form) |
There was a problem hiding this comment.
This is not a typo: cancer_variants expects the WTF itself, not the request form
|



This PR adds a functionality or fixes a bug.
Testing on cg-vm1 server (Clinical Genomics Stockholm)
Prepare for testing
scout-stageand the server iscg-vm1.ssh <USER.NAME>@cg-vm1.scilifelab.sesudo -iu hiseq.clinicalssh localhostpodman pssystemctl --user stop scout@<name_of_currently_deployed_branch>systemctl --user start scout@<this_branch>systemctl --user status scout.targetscout-stage) to be used for testing by other users.Testing on hasta server (Clinical Genomics Stockholm)
Prepare for testing
ssh <USER.NAME>@hasta.scilifelab.seus; paxa -u <user> -s hasta -r scout-stage. You can also use the WSGI Pax app available at https://pax.scilifelab.se/.conda activate S_scout; pip freeze | grep scout-browserbash /home/proj/production/servers/resources/hasta.scilifelab.se/update-tool-stage.sh -e S_scout -t scout -b <this_branch>us; scout --versionpaxaprocedure, which will release the allocated resource (scout-stage) to be used for testing by other users.How to test:
Expected outcome:
The functionality should be working
Take a screenshot and attach or copy/paste the output.
Review: