'Load a tool from the config named by `config_file`'

def __init__(self, config_file, tool_source, app, guid=None, repository_id=None, allow_code_files=True):

    self.config_file = config_file
    self.tool_dir = os.path.dirname(config_file)
    self.app = app
    self.repository_id = repository_id
    self._allow_code_files = allow_code_files
    self.inputs = odict()
    self.stdio_exit_codes = list()
    self.stdio_regexes = list()
    self.inputs_by_page = list()
    self.display_by_page = list()
    self.action = '/tool_runner/index'
    self.target = 'galaxy_main'
    self.method = 'post'
    self.labels = []
    self.check_values = True
    self.nginx_upload = False
    self.input_required = False
    self.display_interface = True
    self.require_login = False
    self.rerun = False
    self.input_params = []
    self.tool_shed = None
    self.repository_name = None
    self.repository_owner = None
    self.changeset_revision = None
    self.installed_changeset_revision = None
    self.guid = guid
    self.old_id = None
    self.version = None
    self._lineage = None
    self.dependencies = []
    self.populate_tool_shed_info()
    self.populate_resource_parameters(tool_source)
    try:
        self.parse(tool_source, guid=guid)
    except Exception as e:
        global_tool_errors.add_error(config_file, 'Tool    Loading', e)
        raise e
    self.history_manager = histories.HistoryManager(app)
    self._view = views.DependencyResolversView(app)
