-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun.py
executable file
·44 lines (36 loc) · 1.05 KB
/
run.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
#!/usr/bin/env python3
import os, os.path as op
import json
import subprocess as sp
import copy
import glob
import logging
import flywheel
from utils import args, gear_preliminaries
if __name__ == '__main__':
# Get the Gear Context
context = flywheel.GearContext()
context.log_config()
context.gear_dict = {}
context.config['dry-run'] = False
gear_preliminaries.initialize_gear(context)
# Validate against configuration
try:
gear_preliminaries.validate_config_against_manifest(context)
except Exception as e:
context.log.exception(e)
context.log.fatal(
'Please make the prescribed corrections and try again.'
)
os.sys.exit(1)
# Build, Validate, and execute Parameters
try:
args.build(context)
args.validate(context)
args.execute(context)
except Exception as e:
context.log.fatal(e,)
context.log.fatal('Error executing nobrainer.')
os.sys.exit(1)
context.log.info("nobrainer completed Successfully!")
os.sys.exit(0)