@@ -67,7 +67,10 @@ def setUp(self):
67
67
"sample" : MM ({
68
68
"sample_projects" : ["American Gut Project" ],
69
69
"datetime_collected" : "2013-10-15T09:30:00" ,
70
- "site" : "Stool"
70
+ "site" : "Stool" ,
71
+ "barcode_meta" : {
72
+ "sample_site_last_washed_date" : "01/10/2025"
73
+ }
71
74
}),
72
75
'survey_answers' : [
73
76
{'template' : 1 ,
@@ -134,7 +137,8 @@ def setUp(self):
134
137
"sample" : MM ({
135
138
"sample_projects" : ["American Gut Project" ],
136
139
"datetime_collected" : "2013-10-15T09:30:00" ,
137
- "site" : "Stool"
140
+ "site" : "Stool" ,
141
+ "barcode_meta" : {}
138
142
}),
139
143
'survey_answers' : [
140
144
{'template' : 1 ,
@@ -170,7 +174,8 @@ def setUp(self):
170
174
"sample" : MM ({
171
175
"sample_projects" : ["American Gut Project" ],
172
176
"datetime_collected" : "2013-10-15T09:30:00" ,
173
- "site" : "Stool"
177
+ "site" : "Stool" ,
178
+ "barcode_meta" : {}
174
179
}),
175
180
'survey_answers' : [
176
181
{'template' : SurveyTemplateRepo .DIET_ID ,
@@ -406,13 +411,13 @@ def test_to_pandas_dataframe(self):
406
411
'true' , 'true' , 'false' , 'false' ,
407
412
UNSPECIFIED ,
408
413
'okay' , 'No' , "2013-10-15T09:30:00" , '000004216' ,
409
- 'US:CA' , 'CA' , '33' , '-117' ],
414
+ 'US:CA' , 'CA' , '33' , '-117' , '01/10/2025' ],
410
415
['XY0004216' , 'bar' , 'Vegan foo' , 'Yes' ,
411
416
UNSPECIFIED , UNSPECIFIED , UNSPECIFIED ,
412
417
'No' , 'false' , 'true' , 'true' , 'false' ,
413
418
'foobar' , UNSPECIFIED , UNSPECIFIED ,
414
419
"2013-10-15T09:30:00" , 'XY0004216' ,
415
- 'US:CA' , 'CA' , '33' , '-117' ]],
420
+ 'US:CA' , 'CA' , '33' , '-117' , 'not provided' ]],
416
421
columns = ['sample_name' , 'host_subject_id' ,
417
422
'diet_type' , 'multivitamin' ,
418
423
'probiotic_frequency' ,
@@ -425,7 +430,8 @@ def test_to_pandas_dataframe(self):
425
430
'sample2specific' , 'abc' , 'def' ,
426
431
'collection_timestamp' ,
427
432
'anonymized_name' , 'geo_loc_name' ,
428
- 'state' , 'latitude' , 'longitude' ]
433
+ 'state' , 'latitude' , 'longitude' ,
434
+ 'sample_site_last_washed_date' ]
429
435
).set_index ('sample_name' )
430
436
431
437
for k , v in HUMAN_SITE_INVARIANTS ['Stool' ].items ():
@@ -453,15 +459,16 @@ def test_to_pandas_series(self):
453
459
values = ['foo' , '' , 'No' , 'Unspecified' , 'Unspecified' ,
454
460
'Unspecified' , 'No' , 'true' , 'true' , 'false' ,
455
461
'false' , 'okay' , 'No' ,
456
- '2013-10-15T09:30:00' , 'US:CA' , 'CA' , '33' , '-117' ]
462
+ '2013-10-15T09:30:00' , 'US:CA' , 'CA' , '33' , '-117' ,
463
+ '01/10/2025' ]
457
464
index = ['HOST_SUBJECT_ID' , 'DIET_TYPE' , 'MULTIVITAMIN' ,
458
465
'PROBIOTIC_FREQUENCY' , 'VITAMIN_B_SUPPLEMENT_FREQUENCY' ,
459
466
'VITAMIN_D_SUPPLEMENT_FREQUENCY' ,
460
467
'OTHER_SUPPLEMENT_FREQUENCY' ,
461
468
'ALLERGIC_TO_blahblah' , 'ALLERGIC_TO_stuff' , 'ALLERGIC_TO_x' ,
462
469
'ALLERGIC_TO_baz' , 'abc' , 'def' ,
463
470
'COLLECTION_TIMESTAMP' , 'GEO_LOC_NAME' , 'STATE' , 'LATITUDE' ,
464
- 'LONGITUDE' ]
471
+ 'LONGITUDE' , 'sample_site_last_washed_date' ]
465
472
466
473
for k , v in HUMAN_SITE_INVARIANTS ['Stool' ].items ():
467
474
values .append (v )
0 commit comments