WARNING! Access to this system is limited to authorised users only.
Unauthorised users may be subject to prosecution.
Unauthorised access to this system is a criminal offence under Australian law (Federal Crimes Act 1914 Part VIA)
It is a criminal offence to:
(1) Obtain access to data without authority. -Penalty 2 years imprisonment.
(2) Damage, delete, alter or insert data without authority. -Penalty 10 years imprisonment.
User activity is monitored and recorded. Anyone using this system expressly consents to such monitoring and recording.

To protect your data, the CISO officer has suggested users to enable 2FA as soon as possible.
Currently 2.7% of users enabled 2FA.

Commit f498aaa4 authored by Zixian Cai's avatar Zixian Cai
Browse files

Support only running certain tasks

parent d23d212d
......@@ -9,12 +9,13 @@ logger = logging.getLogger(__name__)
@click.argument('file', type=click.Path(exists=True))
@click.argument('keywords', nargs=-1)
@click.option('--compare', is_flag=True, default=False)
def local(file, compare):
def local(file, keywords, compare):
logger.info("Constructing a LocalRevision")
revision = LocalRevision(file)
logger.info("Running tasks specified in file")
logger.info("Generating report, compare?: {}".format(compare))
report = revision.generate_report()
report_pipelines = {
......@@ -49,5 +49,13 @@ class LocalRevision(Revision):
self.file = file
self.taskset = TaskSet.from_file(self.file)
def run_taskset(self, *keywords):
Run tasks and store the result as attribute
ts = self.taskset
self.results = {task: task.get_result() for task in ts.tasks}
def __str__(self):
return "LocalRevision({})".format(self.file)
......@@ -20,22 +20,27 @@ class TaskSet:
def __init__(self, tasks):
self.tasks = tasks
def run(self):
def run(self, *keywords):
tasks = self.tasks
for task in tasks:
if keywords and (task.name not in keywords):
name = task.name
task_print(name, 'start task')
task_print(name, crayons.green('SUCCESS'))
if task.benchmark_conf['result'].exists():
task_print(name, 'result written to %s.' % task.benchmark_conf['result'])
'result written to %s.' % task.benchmark_conf[
except ExecutionFailure as e:
task_print(name, crayons.red('FAILED'))
errlog_file = task.run_dir / (task.name + '.log')
task_print(name,crayons.red('error output written to %s.' % errlog_file))
task_print(name, crayons.red(
'error output written to %s.' % errlog_file))
def from_file(config_file):
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment