Skip to content

Commit

Permalink
Feature #12, Add Sibyl support in Automator
Browse files Browse the repository at this point in the history
  • Loading branch information
dicortazar committed May 8, 2014
1 parent 486975d commit 3ef2e44
Showing 1 changed file with 36 additions and 3 deletions.
39 changes: 36 additions & 3 deletions launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
'mls': '/usr/local/bin/mlstats',
'irc': '/usr/local/bin/irc_analysis.py',
'mediawiki': '/usr/local/bin/mediawiki_analysis.py',
'sibyl': '/usr/local/bin/sibyl.py',
'r': '/usr/bin/R',
'git': '/usr/bin/git',
'svn': '/usr/bin/svn',
Expand Down Expand Up @@ -540,8 +541,37 @@ def launch_downloads():
compose_msg("[OK] downloads executed")

def launch_sibyl():
# check if database with qaforums exists
pass
# check if sibyl option exists
if options.has_key('sibyl'):
if not check_tool(tools['sibyl']):
return

compose_msg("sibyl is being executed")
launched = False
db_user = options['generic']['db_user']
db_pass = options['generic']['db_password']
db_name = options['generic']['db_sibyl']
url = options['sibyl']['url']
backend = options['sibyl']['backend']

# pre-scripts
launch_pre_tool_scripts('sibyl')

cmd = tools['sibyl'] + " --db-user=\"%s\" --db-password=\"%s\" --database=\"%s\" --url=\"%s\" --type=\"%s\" >> %s 2>&1" \
%(db_user, db_pass, db_name, url, backend, msg_body)
compose_msg(cmd)
os.system(cmd)
# TODO: it's needed to check if the process correctly finished
launched = True

if launched:
compose_msg("[OK] sibyl executed")
else:
compose_msg("[SKIPPED] sibyl not executed")
else:
compose_msg("[SKIPPED] sibyl was not executed, no conf available")



def launch_metrics_scripts():
# Execute metrics tool using the automator config
Expand Down Expand Up @@ -911,6 +941,9 @@ def get_project_info():
"mediawiki_url":"",
"mediawiki_name":"",
"mediawiki_type":"",
"sibyl_url":"",
"sibyl_name":"",
"sibyl_type":"",
"producer":"Automator",
"blog_url":""
}
Expand Down Expand Up @@ -966,7 +999,7 @@ def print_std(string, new_line=True):
'metrics':launch_metrics_scripts,
'metricsdef':launch_metricsdef_config,
'mlstats':launch_mlstats,
'qaforums': launch_sibyl,
'sibyl': launch_sibyl,
'r':launch_metrics_scripts, # compatibility support
'rsync':launch_rsync,
'vizjs':launch_vizjs_config
Expand Down

0 comments on commit 3ef2e44

Please sign in to comment.