@@ -59,6 +59,7 @@ import type { LabwareDefByDefURI } from '../../labware-defs'
59
59
import type { Selector } from '../../types'
60
60
import type { DesignerApplicationData } from '../../load-file/migration/utils/getLoadLiquidCommands'
61
61
import type { SecondOrderCommandAnnotation } from '@opentrons/shared-data/commandAnnotation/types'
62
+ import genPythonProtocol from './pythonProtocol'
62
63
63
64
// TODO: BC: 2018-02-21 uncomment this assert, causes test failures
64
65
// console.assert(!isEmpty(process.env.OT_PD_VERSION), 'Could not find application version!')
@@ -432,6 +433,18 @@ export const createFile: Selector<ProtocolFile> = createSelector(
432
433
designerApplication,
433
434
}
434
435
436
+ console . log ( genPythonProtocol (
437
+ fileMetadata ,
438
+ robotType ,
439
+ initialRobotState ,
440
+ labwareEntities ,
441
+ labwareNicknamesById ,
442
+ moduleEntities ,
443
+ pipetteEntities ,
444
+ ingredients ,
445
+ ingredLocations ,
446
+ ) ) ;
447
+
435
448
return {
436
449
...protocolBase ,
437
450
...deckStructure ,
@@ -442,3 +455,51 @@ export const createFile: Selector<ProtocolFile> = createSelector(
442
455
}
443
456
}
444
457
)
458
+
459
+ export const createPythonFile : Selector < string > = createSelector (
460
+ getFileMetadata ,
461
+ getInitialRobotState ,
462
+ getRobotStateTimeline ,
463
+ getRobotType ,
464
+ dismissSelectors . getAllDismissedWarnings ,
465
+ ingredSelectors . getLiquidGroupsById ,
466
+ ingredSelectors . getLiquidsByLabwareId ,
467
+ stepFormSelectors . getSavedStepForms ,
468
+ stepFormSelectors . getOrderedStepIds ,
469
+ stepFormSelectors . getLabwareEntities ,
470
+ stepFormSelectors . getModuleEntities ,
471
+ stepFormSelectors . getPipetteEntities ,
472
+ uiLabwareSelectors . getLabwareNicknamesById ,
473
+ labwareDefSelectors . getLabwareDefsByURI ,
474
+ getStepGroups ,
475
+ (
476
+ fileMetadata ,
477
+ initialRobotState ,
478
+ robotStateTimeline ,
479
+ robotType ,
480
+ dismissedWarnings ,
481
+ ingredients ,
482
+ ingredLocations ,
483
+ savedStepForms ,
484
+ orderedStepIds ,
485
+ labwareEntities ,
486
+ moduleEntities ,
487
+ pipetteEntities ,
488
+ labwareNicknamesById ,
489
+ labwareDefsByURI ,
490
+ stepGroups
491
+ ) => {
492
+ const pythonProtocol = genPythonProtocol (
493
+ fileMetadata ,
494
+ robotType ,
495
+ initialRobotState ,
496
+ labwareEntities ,
497
+ labwareNicknamesById ,
498
+ moduleEntities ,
499
+ pipetteEntities ,
500
+ ingredients ,
501
+ ingredLocations ,
502
+ ) ;
503
+ return pythonProtocol ;
504
+ }
505
+ )
0 commit comments