-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmaster_scipion.py
executable file
·1736 lines (1498 loc) · 84.7 KB
/
master_scipion.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
import json
import os
from collections import OrderedDict
from buildbot.steps.shell import ShellCommand, SetPropertyFromCommand
from buildbot.plugins import util, steps
from buildbot.steps.source.git import Git
from buildbot.config import BuilderConfig
from buildbot.schedulers import triggerable
from buildbot.schedulers.forcesched import ForceScheduler
import settings
from common_utils import changeConfVar, GenerateStagesCommand
# #############################################################################
# ########################## COMMANDS & UTILS #################################
# #############################################################################
with open(settings.PLUGINS_JSON_FILE) as f:
# read in order, since we have taken into account dependencies in
# between plugins when completing the json file
scipionPlugins = json.load(f, object_pairs_hook=OrderedDict)
xmippPluginData = scipionPlugins.pop('scipion-em-xmipp')
locscalePluginData = scipionPlugins.pop("scipion-em-locscale")
with open(settings.SDEVELPLUGINS_JSON_FILE) as f:
# read in order, since we have taken into account dependencies in
# between plugins when completing the json file
scipionSdevelPlugins = json.load(f, object_pairs_hook=OrderedDict)
xmippSdevelPluginData = scipionSdevelPlugins.pop('scipion-em-xmipp')
locscaleSdevelPluginData = scipionSdevelPlugins.pop("scipion-em-locscale")
emSdevelPackageData = scipionSdevelPlugins.pop("scipion-em")
pyworkflowSdevelPackageData = scipionSdevelPlugins.pop("scipion-pyworkflow")
appSdevelPackageData = scipionSdevelPlugins.pop("scipion-app")
# Remove config/scipion.conf
removeScipionConf = ShellCommand(
command=['rm', '-f', 'config/scipion.conf'],
name='Clean Scipion Config',
description='Delete existing conf file at scipion HOME',
descriptionDone='Remove config/scipion.conf',
haltOnFailure=False)
removeScipionDevelConf = ShellCommand(
command=['rm', '-f', 'config/scipion_devel.conf'],
name='Clean Scipion Config',
description='Delete existing conf file at scipion HOME',
descriptionDone='Remove config/scipion.conf',
haltOnFailure=False)
removeScipionProdConf = ShellCommand(
command=['rm', '-f', 'config/scipion_prod.conf'],
name='Clean Scipion Config',
description='Delete existing conf file at scipion HOME',
descriptionDone='Remove config/scipion.conf',
haltOnFailure=False)
# Remove HOME/.config/scipion/scipion.conf
removeHomeConfig = ShellCommand(command=['bash', '-c',
util.Interpolate("rm %(prop:SCIPION_LOCAL_CONFIG)s")],
name='Clean Scipion Config at USERS HOME',
description='Delete existing conf file at users HOME',
descriptionDone='Remove USER HOME scipion.conf',
haltOnFailure=False)
# Regenerate the scipion.config files
configScipion = ShellCommand(
command=['./scipion', 'config', '--notify', '--overwrite'],
name='Scipion Config',
description='Create installation configuration files',
descriptionDone='Scipion config',
haltOnFailure=True)
# Avoid notifications from BuildBot
setNotifyAtFalse = ShellCommand(
command=['bash', '-c', util.Interpolate('sed -i -e '
'"s/MPI_LIBDIR = True/'
'SCIPION_NOTIFY = False/g" %(prop:SCIPION_LOCAL_CONFIG)s')],
name='Cancel notifications',
description='Do not notify usage. Server will be out of '
'the blacklist in order for the notify test to work',
descriptionDone='Disable notification',
haltOnFailure=True)
setGeneralCuda = ShellCommand(
command=util.Interpolate(
'sed -ie "\$aCUDA = {}" %(prop:SCIPION_LOCAL_CONFIG)s'.format(settings.CUDA)),
name='Set CUDA in scipion conf',
description='Set CUDA in scipion conf',
descriptionDone='Set CUDA in scipion conf',
haltOnFailure=True)
setMpiLibPath = ShellCommand(
# command=changeConfVar.withArgs('MPI_LIBDIR', mpilibdir),
command=changeConfVar("MPI_LIBDIR", settings.MPI_LIBDIR, escapeSlash=True),
name='Change MPI_LIBDIR',
description='Add the right MPI_LIBDIR path',
descriptionDone='Added MPI_LIBDIR',
haltOnFailure=True)
setMpiIncludePath = ShellCommand(
command=changeConfVar('MPI_INCLUDE', settings.MPI_INCLUDE, escapeSlash=True),
name='Change MPI_INCLUDE',
description='Add the right MPI_INCLUDE path',
descriptionDone='Added MPI_INCLUDE',
haltOnFailure=True)
setMpiBinPath = ShellCommand(
command=changeConfVar('MPI_BINDIR', settings.MPI_BINDIR, escapeSlash=True),
name='Change MPI_BINDIR',
description='Add the right MPI_BINDIR path',
descriptionDone='Added MPI_BINDIR',
haltOnFailure=True)
# Use a common home data tests folder to save storage
setDataTestsDir = ShellCommand(
command=['sed', '-i', '-e',
's/SCIPION_TESTS = data\/tests/'
'SCIPION_TESTS = ~\/data\/tests/g',
'config/scipion.conf'],
name='Set data tests dir',
description='Using a common data tests dir',
descriptionDone='Change data tests dir',
haltOnFailure=True)
# Use an internal dir to allow a branch-dependent project inspection
@util.renderer
def renderScipionUserDataCmd(props):
command = ['bash', '-c']
userDataHome = props.getProperty('BUILD_GROUP_HOME')
userConfig = props.getProperty('SCIPION_LOCAL_CONFIG')
if userDataHome:
command.append('sed -i -e '
'"s/SCIPION_USER_DATA = ~\/ScipionUserData/'
'SCIPION_USER_DATA = %s\/ScipionUserData/g" '
'%s' % (userDataHome.replace('/', '\/'), userConfig))
return command
setScipionUserData = ShellCommand(
command=renderScipionUserDataCmd,
name='Set ScipionUserData dir',
description='Using an independent ScipionUserData dir.',
descriptionDone='Change ScipionUserData dir',
haltOnFailure=True)
setMotioncorrCudaSupport = ShellCommand(
command=util.Interpolate(
'sed -ie "\$aMOTIONCOR2_CUDA_LIB = {}" %(prop:SCIPION_LOCAL_CONFIG)s'.format(settings.MOTIONCOR2_CUDA_LIB_SUPPORT)),
name='Set MOTIONCOR2_CUDA_LIB in scipion conf',
description='Set MOTIONCOR2_CUDA_LIB in scipion conf',
descriptionDone='Set MOTIONCOR2_CUDA_LIB in scipion conf',
haltOnFailure=True)
setEman2Home = ShellCommand(
command=util.Interpolate(
'sed -ie "\$aEMAN2_HOME = {}" %(prop:SCIPION_LOCAL_CONFIG)s'.format(settings.EMAN2_HOME)),
name='Set EMAN2_HOME in scipion conf',
description='Set EMAN2_HOME in scipion conf',
descriptionDone='Set EMAN2_HOME in scipion conf',
haltOnFailure=True)
setMotioncorrCuda = ShellCommand(
command=util.Interpolate(
'sed -ie "\$aMOTIONCOR2_CUDA_LIB = {}" %(prop:SCIPION_LOCAL_CONFIG)s'.format(settings.MOTIONCOR2_CUDA_LIB)),
name='Set MOTIONCOR2_CUDA_LIB in scipion conf',
description='Set MOTIONCOR2_CUDA_LIB in scipion conf',
descriptionDone='Set MOTIONCOR2_CUDA_LIB in scipion conf',
haltOnFailure=True)
setCcp4Home = ShellCommand(
command=util.Interpolate('sed -ie "\$aCCP4_HOME = {}" %(prop:SCIPION_LOCAL_CONFIG)s'.format(settings.CCP4_HOME)),
name='Set CCP4_HOME in scipion conf',
description='Set CCP4_HOME in scipion conf',
descriptionDone='Set CCP4_HOME in scipion conf',
haltOnFailure=True)
setEM_ROOTSdevel = ShellCommand(
command=changeConfVar('EM_ROOT', settings.EM_ROOT,
file=settings.SDEVEL_SCIPION_CONFIG_PATH,
escapeSlash=True),
name='Change EM_ROOT',
description='Add the right EM_ROOT path',
descriptionDone='Added EM_ROOT',
haltOnFailure=True)
setNYSBC_3DFSC_HOME = ShellCommand(
command=util.Interpolate('sed -ie "\$aNYSBC_3DFSC_HOME = {}" %(prop:SCIPION_LOCAL_CONFIG)s'.format(settings.NYSBC_3DFSC_HOME)),
name='Set NYSBC_3DFSC_HOME in scipion conf',
description='Set NYSBC_3DFSC_HOME in scipion conf',
descriptionDone='Set NYSBC_3DFSC_HOME in scipion conf',
haltOnFailure=True)
setEnvActivationCMD = ShellCommand(
command=util.Interpolate('sed -ie "\$aCONDA_ACTIVATION_CMD = {}" %(prop:SCIPION_LOCAL_CONFIG)s'.format(settings.CONDA_ACTIVATION_CMD)),
name='Set CONDA_ACTIVATION_CMD in scipion conf',
description='Set CONDA_ACTIVATION_CMD in scipion conf',
descriptionDone='Set CONDA_ACTIVATION_CMD in scipion conf',
haltOnFailure=True)
setEnvActivationCMD_DEVEL = ShellCommand(
command=util.Interpolate('sed -ie "\$aCONDA_ACTIVATION_CMD = {}" %(prop:SCIPION_LOCAL_CONFIG)s'.format(settings.CONDA_ACTIVATION_CMD_DEVEL)),
name='Set CONDA_ACTIVATION_CMD in scipion conf',
description='Set CONDA_ACTIVATION_CMD in scipion conf',
descriptionDone='Set CONDA_ACTIVATION_CMD in scipion conf',
haltOnFailure=True)
setCryoloCuda = ShellCommand(
command=util.Interpolate(
'sed -ie "\$aCRYOLO_CUDA_LIB = {}" %(prop:SCIPION_LOCAL_CONFIG)s'.format(settings.CRYOLO_CUDA_LIB)),
name='Add CRYOLO_CUDA_LIB in scipion conf',
description='Add CRYOLO_CUDA_LIB in scipion conf',
descriptionDone='Add CRYOLO_CUDA_LIB in scipion conf',
haltOnFailure=True)
setChimeraHome = ShellCommand(
command=util.Interpolate(
'sed -ie "\$aCHIMERA_HOME = {}" %(prop:SCIPION_LOCAL_CONFIG)s'.format(settings.CHIMERA_HOME)),
name='Set CHIMERA_HOME in scipion conf',
description='Set CHIMERA_HOME in scipion conf',
descriptionDone='Set CHIMERA_HOME in scipion conf',
haltOnFailure=True)
setPhenixHome = ShellCommand(
command=util.Interpolate(
'sed -ie "\$aPHENIX_HOME = {}" %(prop:SCIPION_LOCAL_CONFIG)s'.format(settings.PHENIX_HOME)),
name='Add PHENIX_HOME in scipion conf',
description='Add PHENIX_HOME in scipion conf',
descriptionDone='Add PHENIX_HOME in scipion conf',
haltOnFailure=True)
setCryosparcDir = ShellCommand(
command=util.Interpolate(
'sed -ie "\$aCRYOSPARC_DIR = {}" %(prop:SCIPION_LOCAL_CONFIG)s'.format(settings.CRYOSPARC_DIR)),
name='Set CRYOSPARC_DIR in scipion conf',
description='Set CRYOSPARC_DIR in scipion conf',
descriptionDone='Set CRYOSPARC_DIR in scipion conf',
haltOnFailure=True)
setCryosparcHome = ShellCommand(
command=util.Interpolate(
'sed -ie "\$aCRYOSPARC_HOME = {}" %(prop:SCIPION_LOCAL_CONFIG)s'.format(settings.CRYOSPARC_DIR)),
name='Set CRYOSPARC_HOME in scipion conf',
description='Set CRYOSPARC_HOME in scipion conf',
descriptionDone='Set CRYOSPARC_HOME in scipion conf',
haltOnFailure=True)
setCodeSpeedUrl = ShellCommand(
command=util.Interpolate(
'sed -ie "\$aCODESPEED_URL = {}" %(prop:SCIPION_LOCAL_CONFIG)s'.format(settings.CODESPEED_URL)),
name='Add CODESPEED_URL in scipion conf',
description='Add CODESPEED_URL in scipion conf',
descriptionDone='Add CODESPEED_URL in scipion conf',
haltOnFailure=True)
setCodeSpeedEnv = ShellCommand(
command=util.Interpolate(
'sed -ie "\$aCODESPEED_ENV = {}" %(prop:SCIPION_LOCAL_CONFIG)s'.format(settings.CODESPEED_ENV)),
name='Add CODESPEED_ENV in scipion conf',
description='Add CODESPEED_ENV in scipion conf',
descriptionDone='Add CODESPEED_ENV in scipion conf',
haltOnFailure=True)
setJjsoftHome = ShellCommand(
command=util.Interpolate(
'sed -ie "\$aTOMO3D_HOME = {}" %(prop:SCIPION_LOCAL_CONFIG)s'.format(settings.TOMO3D_HOME)),
name='Add JJSOFT_HOME in scipion conf',
description='Add JJSOFT_HOME in scipion conf',
descriptionDone='Add JJSOFT_HOME in scipion conf',
haltOnFailure=True)
setPysegHome = ShellCommand(
command=util.Interpolate(
'sed -ie "\$aPYSEG_HOME = {}" %(prop:SCIPION_LOCAL_CONFIG)s'.format(settings.PYSEG_HOME)),
name='Add PYSEG_HOME in scipion conf',
description='Add PYSEG_HOME in scipion conf',
descriptionDone='Add PYSEG_HOME in scipion conf',
haltOnFailure=True)
setBuildXmippTest = ShellCommand(
command=util.Interpolate(
'sed -ie "\$aBUILD_TESTS = {}" %(prop:SCIPION_LOCAL_CONFIG)s'.format(settings.BUILD_TESTS)),
name='Add BUILD_TESTS in scipion conf',
description='Add BUILD_TESTS in scipion conf',
descriptionDone='Add BUILD_TESTS in scipion conf',
haltOnFailure=True)
profilingProjectPath = ShellCommand(
command=util.Interpolate(
'sed -ie "\$aPROFILING_PROJECTS_PATH = {}" %(prop:SCIPION_LOCAL_CONFIG)s'.format(settings.PROFILING_PROJECTS_PATH)),
name='Add PROFILING_PROJECTS_PATH in scipion conf',
description='Add PROFILING_PROJECTS_PATH in scipion conf',
descriptionDone='Add PROFILING_PROJECTS_PATH in scipion conf',
haltOnFailure=True)
setCryosparcProjectDir = ShellCommand(
command=util.Interpolate(
'sed -ie "\$aCRYO_PROJECTS_DIR = {}" %(prop:SCIPION_LOCAL_CONFIG)s'.format(settings.CRYOSPARC_DIR +'scipion_projects')),
name='Add CRYO_PROJECTS_DIR',
description='Add the right CRYO_PROJECTS_DIR path',
descriptionDone='Added CRYO_PROJECTS_DIR',
haltOnFailure=True)
setCryosparcUser = ShellCommand(
command=util.Interpolate(
'sed -ie "\$aCRYOSPARC_USER = {}" %(prop:SCIPION_LOCAL_CONFIG)s'.format(settings.CRYOSPARC_USER)),
name='Set CRYOSPARC_USER in scipion conf',
description='Set CRYOSPARC_USER in scipion conf',
descriptionDone='Set CRYOSPARC_USER in scipion conf',
haltOnFailure=True)
setScipionScratchDir = ShellCommand(
command=util.Interpolate(
'sed -ie "\$aSCIPION_SCRATCH = {}" %(prop:SCIPION_LOCAL_CONFIG)s'.format(settings.SCIPION_SCRATCH)),
name='Set SCIPION_SCRATCH in scipion conf',
description='Set SCIPION_SCRATCH in scipion conf',
descriptionDone='Set SCIPION_SCRATCH in scipion conf',
haltOnFailure=True)
setMotincor2Bin = ShellCommand(
command=util.Interpolate(
'sed -ie "\$aMOTIONCOR2_BIN = {}" %(prop:SCIPION_LOCAL_CONFIG)s'.format(settings.MOTIONCOR2_BIN)),
name='Add the right MOTIONCOR2_BIN file',
description='Add the right MOTIONCOR2_BIN file',
descriptionDone='Add the right MOTIONCOR2_BIN file',
haltOnFailure=True)
setMotincor2BinDevel = ShellCommand(
command=util.Interpolate(
'sed -ie "\$aMOTIONCOR2_BIN = {}" %(prop:SCIPION_LOCAL_CONFIG)s'.format(settings.MOTIONCOR2_BIN_DEVEL)),
name='Add the right MOTIONCOR2_BIN file',
description='Add the right MOTIONCOR2_BIN file',
descriptionDone='Add the right MOTIONCOR2_BIN file',
haltOnFailure=True)
setMotincor2BinSupport = ShellCommand(
command=util.Interpolate(
'sed -ie "\$aMOTIONCOR2_BIN = {}" %(prop:SCIPION_LOCAL_CONFIG)s'.format(settings.MOTIONCOR2_BIN_SUPPORT)),
name='Add the right MOTIONCOR2_BIN file',
description='Add the right MOTIONCOR2_BIN file',
descriptionDone='Add the right MOTIONCOR2_BIN file',
haltOnFailure=True)
setGctfBin = ShellCommand(
command=util.Interpolate(
'sed -ie "\$aGCTF = {}" %(prop:SCIPION_LOCAL_CONFIG)s'.format(settings.GCTF)),
name='Add the right GCTF Bin file',
description='Add the right GCTF bin file',
descriptionDone='Add the right GCTF bin file',
haltOnFailure=True)
setGCTFCuda = ShellCommand(
command=util.Interpolate(
'sed -ie "\$aGCTF_CUDA_LIB = {}" %(prop:SCIPION_LOCAL_CONFIG)s'.format(settings.GCTF_CUDA_LIB)),
name='Add the GCTF_CUDA_LIB',
description='Add the GCTF_CUDA_LIB',
descriptionDone='Add the GCTF_CUDA_LIB',
haltOnFailure=True)
setGautomatchBin = ShellCommand(
command=util.Interpolate(
'sed -ie "\$aGAUTOMATCH = {}" %(prop:SCIPION_LOCAL_CONFIG)s'.format(settings.GAUTOMATCH)),
name='Add the right GAUTOMATCH Bin file',
description='Add the right GAUTOMATCH bin file',
descriptionDone='Add the right GAUTOMATCH bin file',
haltOnFailure=True)
setGautomatchCudaBin = ShellCommand(
command=util.Interpolate(
'sed -ie "\$aGAUTOMATCH_CUDA_LIB = {}" %(prop:SCIPION_LOCAL_CONFIG)s'.format(settings.GAUTOMATCH_CUDA_LIB)),
name='Add the right GAUTOMATCH_CUDA_LIB Bin file',
description='Add the right GAUTOMATCH_CUDA_LIB bin file',
descriptionDone='Add the right GAUTOMATCH_CUDA_LIB bin file',
haltOnFailure=True)
setRelionCudaLib = ShellCommand(
command=util.Interpolate(
'sed -ie "\$aRELION_CUDA_LIB = {}" %(prop:SCIPION_LOCAL_CONFIG)s'.format(settings.RELION_CUDA_LIB)),
name='Add the right RELION_CUDA_LIB Bin file',
description='Add the right RELION_CUDA_LIB bin file',
descriptionDone='Add the right RELION_CUDA_LIB bin file',
haltOnFailure=True)
setRelionCudaBin = ShellCommand(
command=util.Interpolate(
'sed -ie "\$aRELION_CUDA_BIN = {}" %(prop:SCIPION_LOCAL_CONFIG)s'.format(settings.RELION_CUDA_BIN)),
name='Add the right RELION_CUDA_BIN Bin file',
description='Add the right RELION_CUDA_BIN bin file',
descriptionDone='Add the right RELION_CUDA_BIN bin file',
haltOnFailure=True)
setSPIDERBin = ShellCommand(
command=util.Interpolate(
'sed -ie "\$aSPIDER = {}" %(prop:SCIPION_LOCAL_CONFIG)s'.format(settings.SPIDER)),
name='Add the right SPIDER Bin file',
description='Add the right SPIDER bin file',
descriptionDone='Add the right SPIDER bin file',
haltOnFailure=True)
setSPIDER_MPI = ShellCommand(
command=util.Interpolate(
'sed -ie "\$aSPIDER_MPI = {}" %(prop:SCIPION_LOCAL_CONFIG)s'.format(settings.SPIDER_MPI)),
name='Add the right SPIDER_MPI file',
description='Add the right SPIDER_MPI file',
descriptionDone='Add the right SPIDER_MPI file',
haltOnFailure=True)
# setCUDA_LIB = ShellCommand(
# command=util.Interpolate(
# 'sed -ie "\$aCUDA_LIB = {}" %(prop:SCIPION_LOCAL_CONFIG)s'.format(settings.CUDA_LIB)),
# name='Add the right CUDA_LIB file',
# description='Add the right CUDA_LIB file',
# descriptionDone='Add the right CUDA_LIB file',
# haltOnFailure=True)
#
# setCUDA_BIN = ShellCommand(
# command=util.Interpolate(
# 'sed -ie "\$aCUDA_BIN = {}" %(prop:SCIPION_LOCAL_CONFIG)s'.format(settings.CUDA_BIN)),
# name='Add the right CUDA_BIN file',
# description='Add the right CUDA_BIN file',
# descriptionDone='Add the right CUDA_BIN file',
# haltOnFailure=True)
installEman212 = ShellCommand(command=['./scipion', 'installb', 'eman-2.12'],
name='Install eman-2.12',
description='Install eman-2.12',
descriptionDone='Installed eman-2.12',
timeout=settings.timeOutInstall,
haltOnFailure=True)
# Command to clean software/EM packages
removeEMPackages = ShellCommand(
command=['bash', '-c', 'ls software/em/ -1 -I xmipp | '
'xargs -i rm -rf "software/em/"{}'],
name='Clean EM packages',
description='Delete existing EM sofware packages',
descriptionDone='Remove EM packages',
haltOnFailure=False)
# Clean the downloaded packages in order to get an actualized version
removeEMtgz = ShellCommand(
command=['bash', '-c',
'rm -rf software/tmp/* ; '
'rm -rf software/em/*.tgz'],
name='Clean tgz files',
description='Delete downloaded tgz files to get the last version',
descriptionDone='Remove EM tgz',
haltOnFailure=False)
# Clean the Cryosparc projects
removeCryosParcProjectCmd = ('rm -rf ' + settings.CRYOSPARC_DIR +
'/scipion_projects/* ; ')
removeCryosParcProjectTest = ShellCommand(
command=['bash', '-c', removeCryosParcProjectCmd],
name='Clean CryosPARC projects',
description='Delete CryosPARC projects',
descriptionDone='Delete CryosPARC projects',
haltOnFailure=False)
# Command to install Scipion and/or recompile Xmipp
installScipion = ShellCommand(command=['./scipion', 'install', '-j', '8'],
name='Scipion Install',
description='Compiling everything that needs re-compiling',
descriptionDone='Install Scipion',
timeout=settings.timeOutInstall,
haltOnFailure=True)
sdevelScipionConfig = './scipion3 config'
sprodScipionConfig = sdevelScipionConfig
# Update the Scipion web site
updateWebSiteCmd = (settings.DEVEL_ENV_ACTIVATION + ' && python ' +
settings.BUILDBOT_HOME + 'updateScipionSite.py')
# Check the diferences between de devel and master branches
checkPluginsDiffCmd = ('python ' +
settings.BUILDBOT_HOME + 'checkScipionPlugins.py --all')
def addScipionGitAndConfigSteps(factorySteps, groupId):
""" The initial steps are common in all builders.
1. git pull in a certain branch.
2. remove scipion.config files.
3. regenerate scipion.config files
4. set notify at False
5. set dataTests folder to a common dir (to save space)
6. set ScipionUserData to an internal folder (to allow branch-dependent project inspection)
"""
factorySteps.addStep(Git(repourl=settings.gitRepoURL,
branch=settings.branchsDict[groupId].get(settings.SCIPION_BUILD_ID, None),
mode='incremental',
name='Scipion Git Repository Pull',
haltOnFailure=True))
factorySteps.addStep(removeScipionConf)
# factorySteps.addStep(removeHomeConfig)
factorySteps.addStep(configScipion)
factorySteps.addStep(setNotifyAtFalse)
factorySteps.addStep(setGeneralCuda)
factorySteps.addStep(setMpiLibPath)
factorySteps.addStep(setMpiBinPath)
factorySteps.addStep(setMpiIncludePath)
factorySteps.addStep(setDataTestsDir)
# factorySteps.addStep(removeScipionUserData) # to avoid old tests when are renamed
factorySteps.addStep(setScipionUserData)
return factorySteps
class ScipionCommandStep(ShellCommand):
def __init__(self, command='', name='', description='',
descriptionDone='', timeout=settings.timeOutInstall,
haltOnFailure=True, **kwargs):
kwargs['command'] = [
'bash', '-c', '%s' % (command)
]
kwargs['name'] = name
kwargs['description'] = description
kwargs['descriptionDone'] = descriptionDone
kwargs['timeout'] = timeout
kwargs['haltOnFailure'] = haltOnFailure
ShellCommand.__init__(self, **kwargs)
# #############################################################################
# ############################## FACTORIES ####################################
# #############################################################################
# *****************************************************************************
# INSTALL SCIPION FACTORY
# *****************************************************************************
def installScipionFactory(groupId):
installScipionFactorySteps = util.BuildFactory()
installScipionFactorySteps.workdir = settings.SCIPION_BUILD_ID
installScipionFactorySteps = addScipionGitAndConfigSteps(installScipionFactorySteps,
groupId)
installScipionFactorySteps.addStep(ShellCommand(command=['echo', 'SCIPION_LOCAL_CONFIG',
util.Property('SCIPION_LOCAL_CONFIG')],
name='Echo SCIPION_LOCAL_CONFIG',
description='Echo SCIPION_LOCAL_CONFIG',
descriptionDone='Echo SCIPION_LOCAL_CONFIG',
timeout=settings.timeOutShort
))
installScipionFactorySteps.addStep(installScipion)
installScipionFactorySteps.addStep(
ShellCommand(command=['ls', '-1', 'software/lib'],
name='Test software/lib',
description='Test if software/lib created after installing scipion',
descriptionDone='Test scipion installation',
haltOnFailure=True))
installScipionFactorySteps.addStep(
steps.JSONStringDownload(dict(scipionPlugins, **{"scipion-em-locscale": locscalePluginData}),
workerdest="plugins.json"))
installScipionFactorySteps.addStep(setMotioncorrCudaSupport)
installScipionFactorySteps.addStep(setCryoloCuda)
installScipionFactorySteps.addStep(setPhenixHome)
installScipionFactorySteps.addStep(setCryosparcDir)
installScipionFactorySteps.addStep(setCryosparcUser)
installScipionFactorySteps.addStep(setMotincor2BinSupport)
installScipionFactorySteps.addStep(setCcp4Home)
installScipionFactorySteps.addStep(setNYSBC_3DFSC_HOME)
# installScipionFactorySteps.addStep(setEnvActivationCMD)
# installScipionFactorySteps.addStep(setCryoloModel)
#installScipionFactorySteps.addStep(setCryoloEnvActivation)
return installScipionFactorySteps
def installProdScipionFactory(groupId):
installScipionFactorySteps = util.BuildFactory()
installScipionFactorySteps.workdir = settings.SCIPION_BUILD_ID
installScipionFactorySteps.addStep(
ShellCommand(command=['echo', 'SCIPION_LOCAL_CONFIG',
util.Property('SCIPION_LOCAL_CONFIG')],
name='Echo SCIPION_LOCAL_CONFIG',
description='Echo SCIPION_LOCAL_CONFIG',
descriptionDone='Echo SCIPION_LOCAL_CONFIG',
timeout=settings.timeOutShort
))
# Install Scipion by the installer script
# Downloading the installer from pypi and install it
installScipionFactorySteps.addStep((ShellCommand(command=['pip', 'install', '--force-reinstall', 'scipion-installer'],
name='Installing scipion-installer from pypi',
description='Installing scipion-installer from pypi',
descriptionDone='Installing scipion-installer from pypi',
timeout=settings.timeOutShort
)))
# Install Scipion
scipionHome = settings.SPROD_SCIPION_HOME
installScipionFactorySteps.addStep(
(ShellCommand(command=['installscipion', scipionHome, '-noAsk', '-n',
'prodEnv', '-conda'],
name='Install Scipion',
description='Install Scipion',
descriptionDone='Install Scipion',
timeout=settings.timeOutShort,
haltOnFailure=True
)))
# Install Xmipp
installXmippCmd = (settings.SCIPION_CMD + ' installp -p scipion-em-xmipp -j 8')
installScipionFactorySteps.addStep(ScipionCommandStep(
command=installXmippCmd,
name='Installing Xmipp',
description='Installing Xmipp',
descriptionDone='Xmipp Installed',
timeout=settings.timeOutInstall,
haltOnFailure=True))
installScipionFactorySteps.addStep(
(ShellCommand(command=['chmod', '777', '-R', settings.SPROD_ENV_PATH],
name='Change the permission of environment folder',
description='Change the permission of environment folder',
descriptionDone='Change the permission of environment folder',
timeout=settings.timeOutShort
)))
installScipionFactorySteps.addStep(
steps.JSONStringDownload(dict(scipionSdevelPlugins, **{
"scipion-em-locscale": locscaleSdevelPluginData}),
workerdest="plugins.json"))
# Scipion config
installScipionFactorySteps.addStep(removeScipionProdConf)
# installScipionFactorySteps.addStep(removeHomeConfig)
installScipionFactorySteps.addStep(
ShellCommand(command=sprodScipionConfig,
name='Scipion Config',
description='Create installation configuration files',
descriptionDone='Scipion config',
haltOnFailure=True))
# installScipionFactorySteps.addStep(setScipionUserData)
# installScipionFactorySteps.addStep(setNotifyAtFalse)
installScipionFactorySteps.addStep(setGeneralCuda)
installScipionFactorySteps.addStep(setMpiLibPath)
installScipionFactorySteps.addStep(setMpiBinPath)
installScipionFactorySteps.addStep(setMpiIncludePath)
installScipionFactorySteps.addStep(setDataTestsDir)
# Activating the Anaconda environment
# Set the anaconda environment
#installScipionFactorySteps.addStep(setMotioncorrCuda)
# installScipionFactorySteps.addStep(setCryoloCuda)
installScipionFactorySteps.addStep(setCcp4Home)
# installScipionFactorySteps.addStep(setNYSBC_3DFSC_HOMESdevel)
# installScipionFactorySteps.addStep(setCryoloModelSdevel)
# installScipionFactorySteps.addStep(setCryoloEnvActivationSdevel)
installScipionFactorySteps.addStep(setCryosparcDir)
installScipionFactorySteps.addStep(setCryosparcProjectDir)
installScipionFactorySteps.addStep(setCryosparcHome)
installScipionFactorySteps.addStep(setCodeSpeedUrl)
installScipionFactorySteps.addStep(setCodeSpeedEnv)
installScipionFactorySteps.addStep(profilingProjectPath)
installScipionFactorySteps.addStep(setCryosparcUser)
# installScipionFactorySteps.addStep(setMotincor2Bin)
installScipionFactorySteps.addStep(setGctfBin)
installScipionFactorySteps.addStep(setGCTFCuda)
installScipionFactorySteps.addStep(setGautomatchBin)
installScipionFactorySteps.addStep(setGautomatchCudaBin)
# installScipionFactorySteps.addStep(setRelionCudaBin)
# installScipionFactorySteps.addStep(setRelionCudaLib)
installScipionFactorySteps.addStep(setSPIDERBin)
installScipionFactorySteps.addStep(setSPIDER_MPI)
# installScipionFactorySteps.addStep(setCUDA_BIN)
# installScipionFactorySteps.addStep(setCUDA_LIB)
installScipionFactorySteps.addStep(setChimeraHome)
installScipionFactorySteps.addStep(setPhenixHome)
installScipionFactorySteps.addStep(setJjsoftHome)
# installScipionFactorySteps.addStep(setEnvActivationCMD)
installScipionFactorySteps.addStep(setBuildXmippTest)
installCmd = (settings.SCIPION_CMD + ' installp -p scipion-em-tomo' +
' -j ' + '8')
installScipionFactorySteps.addStep(ScipionCommandStep(
command=installCmd,
name='Install plugin scipion-em-tomo',
description='Install plugin scipion-em-tomo',
descriptionDone='Installed plugin scipion-em-tomo',
timeout=settings.timeOutInstall,
haltOnFailure=True))
return installScipionFactorySteps
def installSDevelScipionFactory(groupId):
"""
Scipion devel Factory
"""
installScipionFactorySteps = util.BuildFactory()
installScipionFactorySteps.workdir = settings.SCIPION_BUILD_ID
installScipionFactorySteps.addStep(
ShellCommand(command=['echo', 'SCIPION_LOCAL_CONFIG',
util.Property('SCIPION_LOCAL_CONFIG')],
name='Echo SCIPION_LOCAL_CONFIG',
description='Echo SCIPION_LOCAL_CONFIG',
descriptionDone='Echo SCIPION_LOCAL_CONFIG',
timeout=settings.timeOutShort
))
# Install Scipion by the installer script
# Downloading the installer from pypi and install it
installerCmd = '%s && conda activate && pip install --force-reinstall scipion-installer' % settings.CONDA_ACTIVATION_CMD_DEVEL
installScipionFactorySteps.addStep(
(ScipionCommandStep(command=installerCmd,
name='Installing scipion-installer from pypi',
description='Installing scipion-installer from pypi',
descriptionDone='Installing scipion-installer from pypi',
timeout=settings.timeOutShort,
haltOnFailure=False
)))
# Generating plugin.json file
installScipionFactorySteps.addStep(
steps.JSONStringDownload(dict(scipionSdevelPlugins, **{
"scipion-em-locscale": locscaleSdevelPluginData}),
workerdest="plugins.json"))
# Install Scipion core in production: Using the new installer
scipionHome = settings.SDEVEL_SCIPION_HOME
installScipionCmd = '%s && conda activate && installscipion %s -noAsk -n develEnv -conda' % (settings.CONDA_ACTIVATION_CMD_DEVEL, scipionHome)
installScipionFactorySteps.addStep(
(ScipionCommandStep(command=installScipionCmd,
name='Install Scipion',
description='Install Scipion',
descriptionDone='Install Scipion',
timeout=settings.timeOutShort,
haltOnFailure=True
)))
# Clone the Scipion packages(scipion-app, scipion-em, scipion-pyworkflow) and install its
installPyworkflowCmd = 'rm -rf scipion-pyworkflow && git clone [email protected]:scipion-em/scipion-pyworkflow.git && ./scipion3 python -m pip install -e scipion-pyworkflow'
installEMCmd = 'rm -rf scipion-em && git clone [email protected]:scipion-em/scipion-em.git && ./scipion3 python -m pip install -e scipion-em'
installAppCmd = 'rm -rf scipion-app && git clone [email protected]:scipion-em/scipion-app.git && ./scipion3 python -m pip install -e scipion-app'
installScipionFactorySteps.addStep(ScipionCommandStep(
command=installPyworkflowCmd,
name='Installing scipion-pyworkflow',
description='Installing scipion-pyworkflow',
descriptionDone='scipion-pyworkflow installed',
timeout=settings.timeOutInstall,
haltOnFailure=True))
installScipionFactorySteps.addStep(ScipionCommandStep(
command=installEMCmd,
name='Installing scipion-em',
description='Installing scipion-em',
descriptionDone='scipion-em installed',
timeout=settings.timeOutInstall,
haltOnFailure=True))
installScipionFactorySteps.addStep(ScipionCommandStep(
command=installAppCmd,
name='Installing scipion-app',
description='Installing scipion-app',
descriptionDone='scipion-app installed',
timeout=settings.timeOutInstall,
haltOnFailure=True))
# Clone and Install Xmipp
installXmippCmd = 'rm -rf xmipp && git clone https://github.com/I2PC/xmipp.git && ./scipion3 run xmipp/xmipp && ./scipion3 installp -p xmipp/src/scipion-em-xmipp --noBin --devel'
compileXmippCmd = 'cd xmipp && ../scipion3 run ./xmipp && ls -al ../software/bindings/'
installScipionFactorySteps.addStep(ScipionCommandStep(
command=installXmippCmd,
name='Installing Xmipp',
description='Installing Xmipp',
descriptionDone='Installing Xmipp',
timeout=settings.timeOutInstall,
haltOnFailure=True))
installScipionFactorySteps.addStep(ShellCommand(
command=compileXmippCmd,
name='Compiling Xmipp',
description='Compiling Xmipp',
descriptionDone='Compiling Xmipp',
timeout=settings.timeOutInstall,
haltOnFailure=True))
# TODO Remove this builder
installScipionFactorySteps.addStep(ShellCommand(
command=compileXmippCmd,
name='Linking bindings file',
description='Linking bindings file',
descriptionDone='Linking bindings file',
timeout=settings.timeOutInstall,
haltOnFailure=True))
# installScipionFactorySteps.addStep(
# (ShellCommand(command=['chmod', '777', '-R', settings.SDEVEL_ENV_PATH],
# name='Change the permission of environment folder',
# description='Change the permission of environment folder',
# descriptionDone='Change the permission of environment folder',
# timeout=settings.timeOutShort
# )))
installScipionFactorySteps.addStep(removeScipionDevelConf)
# installScipionFactorySteps.addStep(removeHomeConfig)
installScipionFactorySteps.addStep(ShellCommand(command=sdevelScipionConfig,
name='Scipion Config',
description='Create installation configuration files',
descriptionDone='Scipion config',
haltOnFailure=True))
# installScipionFactorySteps.addStep(setEM_ROOTSdevel)
# installScipionFactorySteps.addStep(setScipionUserData)
# installScipionFactorySteps.addStep(setNotifyAtFalse)
installScipionFactorySteps.addStep(setGeneralCuda)
installScipionFactorySteps.addStep(setMpiLibPath)
installScipionFactorySteps.addStep(setMpiBinPath)
installScipionFactorySteps.addStep(setMpiIncludePath)
installScipionFactorySteps.addStep(setDataTestsDir)
# Activating the Anaconda environment
# Set the anaconda environment
# installScipionFactorySteps.addStep(setCryoloCuda)
installScipionFactorySteps.addStep(setCcp4Home)
installScipionFactorySteps.addStep(setCryosparcDir)
installScipionFactorySteps.addStep(setCryosparcProjectDir)
installScipionFactorySteps.addStep(setCryosparcHome)
installScipionFactorySteps.addStep(setPysegHome)
installScipionFactorySteps.addStep(setCodeSpeedUrl)
installScipionFactorySteps.addStep(setCodeSpeedEnv)
installScipionFactorySteps.addStep(profilingProjectPath)
installScipionFactorySteps.addStep(setGctfBin)
installScipionFactorySteps.addStep(setGCTFCuda)
installScipionFactorySteps.addStep(setCryosparcUser)
installScipionFactorySteps.addStep(setGautomatchBin)
installScipionFactorySteps.addStep(setGautomatchCudaBin)
# installScipionFactorySteps.addStep(setRelionCudaBin)
# installScipionFactorySteps.addStep(setRelionCudaLib)
installScipionFactorySteps.addStep(setChimeraHome)
installScipionFactorySteps.addStep(setPhenixHome)
installScipionFactorySteps.addStep(setSPIDERBin)
installScipionFactorySteps.addStep(setSPIDER_MPI)
# installScipionFactorySteps.addStep(setCUDA_BIN)
# installScipionFactorySteps.addStep(setCUDA_LIB)
installScipionFactorySteps.addStep(setJjsoftHome)
# installScipionFactorySteps.addStep(setEnvActivationCMD_DEVEL)
installScipionFactorySteps.addStep(setBuildXmippTest)
# installScipionFactorySteps.addStep(
# ScipionCommandStep(command=sdevelMoveScipionConfig,
# name='Move Scipion Config file',
# description='Move Scipion Config file',
# descriptionDone='Move Scipion Config file',
# haltOnFailure=True))
installCmd = (settings.SCIPION_CMD + ' installp -p scipion-em-tomo' +
' -j ' + '8')
installScipionFactorySteps.addStep(ScipionCommandStep(
command=installCmd,
name='Install plugin scipion-em-tomo',
description='Install plugin scipion-em-tomo',
descriptionDone='Installed plugin scipion-em-tomo',
timeout=settings.timeOutInstall,
haltOnFailure=True))
return installScipionFactorySteps
# *****************************************************************************
# SCIPION TEST FACTORY
# *****************************************************************************
def scipionTestFactory(groupId):
scipionTestSteps = util.BuildFactory()
scipionTestSteps.workdir = util.Property('SCIPION_HOME')
emanVar = settings.EMAN212 if groupId == settings.PROD_GROUP_ID else settings.EMAN23
if groupId == settings.PROD_GROUP_ID:
# add TestRelionExtractStreaming manually because it needs eman 2.12
wfRelionExtractStreaming = 'pyworkflow.tests.em.workflows.test_workflow_streaming.TestRelionExtractStreaming'
# gen stages
genStagesCmd = ["./scipion", "test", "--show", "--grep", "pyworkflow", "--mode", "onlyclasses"]
scipionTestSteps.addStep(
GenerateStagesCommand(command=genStagesCmd,
name="Generate Scipion test stages",
description="Generating Scipion test stages",
descriptionDone="Generate Scipion test stages",
haltOnFailure=False,
targetTestSet='pyworkflow',
stagePrefix=["./scipion", "test"],
blacklist=settings.SCIPION_TESTS_BLACKLIST,
stageEnvs={wfRelionExtractStreaming: emanVar}))
for pwLongTest in settings.SCIPION_LONG_TESTS: # execute long tests at the end
if pwLongTest.endswith("TestBPV"):
scipionTestSteps.addStep(ShellCommand(command=['./scipion', 'test', pwLongTest],
name=pwLongTest,
description='Testing %s' % pwLongTest.split('.')[-1],
descriptionDone=pwLongTest.split('.')[-1],
timeout=settings.timeOutExecute,
env=emanVar))
continue
scipionTestSteps.addStep(ShellCommand(command=['./scipion', 'test', pwLongTest],
name=pwLongTest,
description='Testing %s' % pwLongTest.split('.')[-1],
descriptionDone=pwLongTest.split('.')[-1],
timeout=settings.timeOutExecute))
else:
scipionTestSteps.addStep(ShellCommand(
command=['echo', 'SCIPION_HOME: ', util.Property('SCIPION_HOME')],
name='Echo scipion home',
description='Echo scipion home',
descriptionDone='Echo scipion home',
timeout=settings.timeOutExecute))
shortNames = ["pwem", "pyworkflowtests"]
for shortName in shortNames:
pluginsTestShowcmd = ["bash", "-c", "./scipion3 test --show --grep "
+ shortName + " --mode onlyclasses"]
scipionTestSteps.addStep(
GenerateStagesCommand(command=pluginsTestShowcmd,
name="Generate Scipion test stages for %s" % shortName,
description="Generating Scipion test stages for %s" % shortName,
descriptionDone="Generate Scipion test stages for %s" % shortName,
stagePrefix=[settings.SCIPION_CMD, "test"],
rootName='scipion3',
haltOnFailure=False,
targetTestSet=shortName,
blacklist=settings.SCIPION_TESTS_BLACKLIST))
return scipionTestSteps
# *****************************************************************************
# PLUGIN FACTORY
# *****************************************************************************
def pluginFactory(groupId, pluginName, factorySteps=None, shortname=None,
doInstall=True, extraBinaries=[], doTest=True,
deleteVirtualEnv='', binToRemove=[], moveFiles=[], bins=True,
useUrl=False, url=None):
factorySteps = factorySteps or util.BuildFactory()
factorySteps.workdir = util.Property('SCIPION_HOME')
shortName = shortname or str(pluginName.rsplit('-', 1)[-1]) # todo: get module names more properly?
rootName = 'scipion3'
if groupId == settings.PROD_GROUP_ID or groupId == settings.SPROD_GROUP_ID:
scipionCmd = './scipion'
rootName = 'scipion'
if groupId == settings.SPROD_GROUP_ID:
scipionCmd = './scipion3'
rootName = 'scipion3'
if deleteVirtualEnv:
deleteEnv = (settings.CONDA_ACTIVATION_CMD +
"; conda env remove --name " + deleteVirtualEnv)
removeBinCmd = " ; "
if binToRemove:
for binary in binToRemove:
removeBinCmd += "rm -rf software/em/" + binary + "* ; "
deleteEnv += removeBinCmd
factorySteps.addStep(ShellCommand(command=['bash', '-c', deleteEnv],
name='Removing the %s virtual environment' % shortName,
description='Removing %s virtual environment' % shortName,
descriptionDone='Removing %s virtual environment' % shortName,
timeout=settings.timeOutInstall,
haltOnFailure=False))
if doInstall:
if not useUrl:
factorySteps.addStep(ShellCommand(command=[scipionCmd, 'installp', '-p', pluginName, '-j', '8', '' if bins else '--noBin'],
name='Install plugin %s' % shortName,
description='Install plugin %s' % shortName,
descriptionDone='Installed plugin %s' % shortName,
timeout=settings.timeOutInstall,
haltOnFailure=True))
else:
pluginUrl = pluginName
if url is not None:
pluginUrl = "git+"+url
factorySteps.addStep(ShellCommand(