Lines Matching defs:config

33 1. config
34 2. constants (Also attached to the config variable as an attribute)
45 The config variable is initialzed by calling :func:`initialize_config`.
47 that library function writers never accidentally get stale config attributes.
49 Program arguments/flag arguments are available from the config as attributes.
50 If an attribute was not set by the command line or the optional config file,
55 Provided by the config if the attribute is not found in the config or
61 Values not directly exposed by the config, but are attached to the object
63 :code:`config.constants.attribute`. These should be used for setting
81 Signals that an attribute in the config file was not initialized.
87 Signals that the config was not initialized before trying to access an
122 def _init_with_dicts(self, config, defaults):
123 self._config = config
133 perform additional setup for a config argument. Should return a
134 tuple containing the new value for the config attr.
166 Get the attribute from the config or fallback to defaults.
181 'Cannot directly access elements from the config before it is'
189 '%s was not initialzed in the config.' % attr)
201 Defaults are provided by the config if the attribute is not found in the
202 config or commandline. For instance, if we are using the list command
214 'constants' are values not directly exposed by the config, but are attached
272 constants.gem5_simulation_config_ini = 'config.ini'
273 constants.gem5_simulation_config_json = 'config.json'
284 def define_post_processors(config):
291 containing the already set config value or ``None`` if the config value
303 base_dir = config._lookup_val('base_dir')[0]
356 config._add_post_processor('build_dir', set_default_build_dir)
357 config._add_post_processor('verbose', fix_verbosity_hack)
358 config._add_post_processor('isa', default_isa)
359 config._add_post_processor('variant', default_variant)
360 config._add_post_processor('length', default_length)
361 config._add_post_processor('threads', threads_as_int)
362 config._add_post_processor('test_threads', test_threads_as_int)
363 config._add_post_processor(StorePositionalTagsAction.position_kword,
437 def define_common_args(config):
489 default=config._defaults.base_dir,
508 '--config-path',
511 help='Path to read a testing.ini config in'
657 config = _Config()
658 define_constants(config.constants)
662 config.constants = FrozenAttrDict(config.constants.__dict__)
663 constants = config.constants
666 This config object is the singleton config object available throughout the
671 Parse the commandline arguments and setup the config varibles.
673 global config
676 define_defaults(config._defaults)
677 define_post_processors(config)
678 define_common_args(config)
686 # Initialize the config by parsing args and running callbacks.
687 config._init(baseparser)