1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-09-02 03:12:34 +01:00

cleaning up initialize()

- standardisded on a single context argument
- removed Device.init() no longer necessary as initilize now
  automatically gets propagated up the hierarchy. Renamed the existing
  use of it to "initilize".
- related pylint cleanup.
This commit is contained in:
Sergei Trofimov
2015-06-17 17:41:24 +01:00
parent 55b38556fe
commit 73d85c2b4e
18 changed files with 46 additions and 68 deletions

View File

@@ -177,7 +177,7 @@ class CreateCommand(Command):
formatter_class = argparse.RawDescriptionHelpFormatter
subcmd_classes = [CreateWorkloadSubcommand, CreatePackageSubcommand]
def initialize(self):
def initialize(self, context):
subparsers = self.parser.add_subparsers(dest='what')
self.subcommands = [] # pylint: disable=W0201
for subcmd_cls in self.subcmd_classes:

View File

@@ -24,7 +24,7 @@ class ListCommand(Command):
name = 'list'
description = 'List available WA extensions with a short description of each.'
def initialize(self):
def initialize(self, context):
extension_types = ['{}s'.format(ext.name) for ext in settings.extensions]
self.parser.add_argument('kind', metavar='KIND',
help=('Specify the kind of extension to list. Must be '

View File

@@ -30,7 +30,7 @@ class RunCommand(Command):
name = 'run'
description = 'Execute automated workloads on a remote device and process the resulting output.'
def initialize(self):
def initialize(self, context):
self.parser.add_argument('agenda', metavar='AGENDA',
help='Agenda for this workload automation run. This defines which workloads will ' +
'be executed, how many times, with which tunables, etc. ' +

View File

@@ -33,7 +33,7 @@ class ShowCommand(Command):
Display documentation for the specified extension (workload, instrument, etc.).
"""
def initialize(self):
def initialize(self, context):
self.parser.add_argument('name', metavar='EXTENSION',
help='''The name of the extension for which information will
be shown.''')