Skip to content

Commit

Permalink
Feat/examples (#84)
Browse files Browse the repository at this point in the history
* Add first examples to validation

* Ignore GE intermediates

* Update config comment

* Update example
  • Loading branch information
anngvu authored Feb 2, 2024
1 parent 29c98c7 commit f89781d
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ schematic_service_account_creds.json
tests/generate/GF.jsonld
tests/generate/config.json
tests/generate/creds.json
great_expectations

# Tools
retold
Expand Down
5 changes: 3 additions & 2 deletions config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Do not change the "definitions" section unless you know what you"re doing
# This config format is guaranteed to work with schematicpy versions between 23.9.1 and 24.1.1 only.
# Schematic often changes the config format without notice, check the docs and your installed version.
# Usage: schematic manifest -c config.yml get -dt ClinicalAssay -t "Test Manifest" --jsonld ./NF.jsonld -s
asset_store:
synapse:
Expand All @@ -11,7 +12,7 @@ manifest:
data_type:

# Clinical Data
- "CohortCore"
- "CohortCoreTemplate"
- "CohortCoreRFC"
- "CohortCorePortal"

Expand Down
18 changes: 18 additions & 0 deletions tests/validate/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{ "meta": "Validate example manifests against templates with schematic and data model.",
"schematic_reference": {
"version": "23.1.1",
"flags" :
{
"great_expectations" : true
}
},
"tests": [
{
"manifest": "examples/my_cohort.csv",
"template": "CohortCoreTemplate",
"expect_pass": true,
"expectation": "Should pass",
"comment": "Contains mock data for two patients"
}
]
}
3 changes: 3 additions & 0 deletions tests/validate/examples/my_cohort.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Component,ParticipantID,TimepointLabel,Age,Sex,BMI,Race,Ethnicity,VitalStatus,Height,Weight,Gravidity,Parity,AgeAtMenarche,MenstrualCyclePhase,MenopauseStatus,PrimaryDiagnosis,AgeatDiagnosis,DiagnosisStatusType,ClassBRCA1,ClassBRCA2,TobaccoUse,PackYearsSmoked,AlcoholUse,NumberofDrinksPerWeek,AntibioticUse,SampleCollectionCenter,SampleCollectionYear,ERStatus,PRStatus,HER2Status,Id,entityId
CohortCoreTemplate,ABC123,,30,female,30.5,white,not hispanic or latino,Alive,Not Reported,Not Reported,0,0,12,Not Reported,Pre,,Not Reported,Not Applicable,Positive,,Former,Unknown- 2yrs,Yes,2,Unknown,MGH,Not Reported,Positive,,,f4fa455b-a495-4ffa-b807-7525947da662,syn53461756
CohortCoreTemplate,ABC456,,31,female,22.2,white,not hispanic or latino,Alive,Not Reported,Not Reported,1,1,13,Not Reported,Pre,,Not Reported,Not Applicable,Positive,,Never,0.3ppd-unknown,Occasionally,<1,Unknown,MGH,Not Reported,Positive,Negative,Negative,6d049ab5-f089-4c32-9306-f9fb4765ca20,syn53461756

0 comments on commit f89781d

Please sign in to comment.