-
Notifications
You must be signed in to change notification settings - Fork 2
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
Custom-cohort creation script patch #875
base: dev
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Huge thanks for this @MattWellie!
I'm just trying to think of a simple way to make codecov happy, presumably by testing that the parser is working correctly (?)
Not a super clear part of the code to test, to me.
Yeah, there's a couple of ways to solve that. I'll have a tinker this morning! |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev #875 +/- ##
==========================================
+ Coverage 80.67% 80.83% +0.15%
==========================================
Files 172 172
Lines 14551 14603 +52
==========================================
+ Hits 11739 11804 +65
+ Misses 2812 2799 -13 ☔ View full report in Codecov by Sentry. |
Interface changes
Needed
create_cohort_from_criteria
it's ignored. This PR has not resolved thatQOL
type=str, nargs='*'
to anargs='*', default=[]
- the type here was misleading as we want a list?required=False, type=list[str]
tonargs='*', default=[]
type
doesn't work with nested types (afaik, the passed type is used as a callable), solist[str]
is justlist
type
also casts values to the given type, so--sg_platform illumina
becomes['i', 'l', 'l', 'u', 'm', 'i', 'n', 'a']
, instead of['illumina']
(the result oflist(input)
instead of[input]
Strict Checking
choices
- could bin this off, or query metamist for the available choices at runtime.Challenge:
python scripts/create_custom_cohort.py --project matt --name MATT --description "Matt desc" --projects matt not_matt --sg_technology short-read --sg_platform illumina --sg_type genome --sg_ids_internal CPGA --sample_type blood
Current Result: (I couldn't find any way to use multiple CPG IDs, so just using a list of one in this toy example)
New Result: