populationgenomics / metamist

Sample level metadata system
MIT License
1 stars 1 forks source link

Custom-cohort creation script patch #875

Open MattWellie opened 1 month ago

MattWellie commented 1 month ago

Interface changes

Needed

QOL

Strict Checking

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)

{'project': 'matt', 'name': 'MATT', 'description': 'Matt desc', 'template_id': None, 'projects': ['matt', 'not_matt'], 'sg_ids_internal': ['C', 'P', 'G', 'A'], 'excluded_sgs_internal': None, 'sg_technology': ['s', 'h', 'o', 'r', 't', '-', 'r', 'e', 'a', 'd'], 'sg_platform': ['i', 'l', 'l', 'u', 'm', 'i', 'n', 'a'], 'sg_type': ['g', 'e', 'n', 'o', 'm', 'e'], 'sample_type': ['b', 'l', 'o', 'o', 'd'], 'dry_run': False}

New Result:

{'project': 'matt', 'name': 'MATT', 'description': 'Matt desc', 'template_id': None, 'projects': ['matt', 'not_matt'], 'sg_ids_internal': ['CPGA'], 'excluded_sgs_internal': [], 'sg_technology': ['short-read'], 'sg_platform': ['illumina'], 'sg_type': ['genome'], 'sample_type': ['blood'], 'dry_run': False}
MattWellie commented 1 month ago

I'm just trying to think of a simple way to make codecov happy, presumably by testing that the parser is working correctly (?)

Yeah, there's a couple of ways to solve that. I'll have a tinker this morning!

codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 98.38710% with 1 line in your changes missing coverage. Please review.

Project coverage is 80.83%. Comparing base (e3a7f39) to head (c6272c4). Report is 5 commits behind head on dev.

Files Patch % Lines
scripts/create_custom_cohort.py 90.90% 1 Missing :warning:
Additional details and impacted files ```diff @@ 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 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.