-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun_octopus.py
More file actions
34 lines (27 loc) · 703 Bytes
/
Copy pathrun_octopus.py
File metadata and controls
34 lines (27 loc) · 703 Bytes
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
"""
Runs octopus.
"""
__author__ = 'ryanquinnnelson'
import configparser
import sys
import glob
import os
from octopus.octopus import Octopus
def main():
# run octopus for each config file found in the path
config_path = sys.argv[1]
filenames = glob.glob(os.path.join(config_path, '*'))
filenames.sort()
for f in filenames:
# parse configs
config = configparser.ConfigParser()
config.read(f)
# run octopus
octopus = Octopus(config, f)
octopus.setup_environment()
octopus.download_data()
octopus.run_pipeline()
octopus.cleanup()
if __name__ == "__main__":
# execute only if run as a script
main()