Following batch contains 2 audio cd's that don't appear contiguously in batch manifest:
jobID,PPN,volumeNo,carrierType,title,volumeID,success,containsAudio,containsData
d03ae636-147a-11e7-a687-00237d497a29,155658050,1,cd-audio,(Bijna) alles over bestandsformaten,,True,True,False
82c34f9a-1481-11e7-9f3c-00237d497a29,155658050,1,cd-rom,(Bijna) alles over bestandsformaten,Handbook,True,False,True
e03ae676-147a-11e7-a687-00237d497a29,155658050,2,cd-audio,(Bijna) alles over bestandsformaten,,True,True,False
Result for verify:
WARNING - PPN 155658050 (cd-audio): expected '1' as lower value for 'volumeNumber', found '2'
So again audio CDs don't appear contiguously. Looks like something goes wrong before groupby (check for missing sort?)
ADDITION:
Looks like what's needed is a sort on carriers prior to groupby, just as is also done with rowsBatchManifest.
BUT:
carriers.sort(key=itemgetter(3))
Results in:
AttributeError: 'itertools._grouper' object has no attribute 'sort'
So why does this work for RowsbatchManifest? Because:
type(rowsBatchManifest) = <class 'list'>, but type(carriers type) = <class 'itertools._grouper'>. So we need to figure out how to sort s grouper object.
Following batch contains 2 audio cd's that don't appear contiguously in batch manifest:
Result for verify:
Result for write, structMap:
So again audio CDs don't appear contiguously. Looks like something goes wrong before groupby (check for missing sort?)
ADDITION:
Looks like what's needed is a sort on carriers prior to groupby, just as is also done with rowsBatchManifest.
BUT:
Results in:
So why does this work for RowsbatchManifest? Because:
type(rowsBatchManifest) = <class 'list'>, but type(carriers type) = <class 'itertools._grouper'>. So we need to figure out how to sort s grouper object.