-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathbuild.py
42 lines (33 loc) · 1.07 KB
/
build.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
from sys import path
from pybuilder.core import use_plugin, init, task
path.append("src/main/python")
from configs import config, logging_config
import start
from utilities.profiler import Profiler
from utilities.packager import Packager
from conditional import conditional
use_plugin("python.core")
use_plugin("python.distutils")
name = "artip"
default_task = ["clean"]
@init
def initialize(project):
project.version = "1.0"
@task
def package(project):
filename = 'target/artip{0}.zip'.format(project.version)
root_directory = '.'
packager = Packager(filename, root_directory)
packager.package()
@task
def run(project):
config_path = project.get_property("conf") + "/"
config.load(config_path)
with conditional(config.PIPELINE_CONFIGS['code_profiling'], Profiler()):
dataset_path = project.get_property("dataset")
logging_config.load()
start.create_output_dir(dataset_path, project.get_property("output"))
start.snapshot_config(config_path)
from main import main
main(dataset_path)
start.clean()