Update the configuration for this lane if a custom analysis is specified.
5415
def update_w_custom(config, lane_info):
    
    name_remaps = {"variant": ["SNP calling", "variant", "variant2"],
                   "SNP calling": ["SNP calling", "variant", "variant2"],
                   "variant2": ["SNP calling", "variant", "variant2"]}
    config = copy.deepcopy(config)
    base_name = lane_info.get("analysis")
    if "algorithm" not in config:
        config["algorithm"] = {}
    for analysis_type in name_remaps.get(base_name, [base_name]):
        custom = config.get("custom_algorithms", {}).get(analysis_type)
        if custom:
            for key, val in custom.items():
                config["algorithm"][key] = val
    # apply any algorithm details specified with the lane
    for key, val in lane_info.get("algorithm", {}).items():
        config["algorithm"][key] = val
    # apply any resource details specified with the lane
    for prog, pkvs in lane_info.get("resources", {}).items():
        if prog not in config["resources"]:
            config["resources"][prog] = {}
        for key, val in pkvs.items():
            config["resources"][prog][key] = val
    return config
527364
def update_custom_field_options(self, custom_field_key, new_options,
                                    keep_existing_options):
        """"""
        custom_field_key = quote(custom_field_key, '')
        body = {
            "Options": new_options,
            "KeepExistingOptions": keep_existing_options}
        response = self._put(self.uri_for(
            "customfields/%s/options" % custom_field_key), json.dumps(body))
970017
def update_spec(self):
        

        if self.datafile.exists:
            with self.datafile.reader as r:

                self.header_lines = r.info['header_rows']
                self.comment_lines = r.info['comment_rows']
                self.start_line = r.info['data_start_row']
                self.end_line = r.info['data_end_row']
966856
@Override
    public void updateConfigurations(String commit, Collection<String> paths) {
        Map<String, Configuration> configurationsMap = getConfigurationMap(commit, paths);
        paths.forEach(path -> notifyUpdated(configurationsMap
            .getOrDefault(path, new Configuration(path, null))));
    }
1326557
@RequestMapping(value = "configurations/{name}/update", method = RequestMethod.PUT)
    public JenkinsConfiguration updateConfiguration(@PathVariable String name, @RequestBody JenkinsConfiguration configuration) {
        jenkinsService.updateConfiguration(name, configuration);
        return getConfiguration(name);
    }
1340648
protected void updateParameterTable() {
    parameterTable.setEnabled(false);
    ListParameterization config = new ListParameterization();
    parameterTable.appendParameters(config);
    setParameters(config);
    if(config.getErrors().size() > 0) {
      reportErrors(config);
    }
    config.clearErrors();
    parameterTable.setEnabled(true);
  }
823903
def _configure(self, manager, connect_api_instance, observer_params):
        
        self._manager = manager
        self._api = connect_api_instance
        self._observer_params = self._observer_params or {}
        self._observer_params.update(observer_params)
29786
def update(self):
        
        super(AnalysisRequestsView, self).update()

        self.workflow = api.get_tool("portal_workflow")
        self.member = self.mtool.getAuthenticatedMember()
        self.roles = self.member.getRoles()

        setup = api.get_bika_setup()

        # remove `to_be_sampled` filter
        if not setup.getSamplingWorkflowEnabled():
            self.review_states = filter(
                lambda x: x.get("id") != "to_be_sampled", self.review_states)

        # remove `scheduled_sampling` filter
        if not setup.getScheduleSamplingEnabled():
            self.review_states = filter(
                lambda x: x.get("id") != "scheduled_sampling",
                self.review_states)

        # remove `to_be_preserved` filter
        if not setup.getSamplePreservationEnabled():
            self.review_states = filter(
                lambda x: x.get("id") != "to_be_preserved", self.review_states)

        # remove `rejected` filter
        if not setup.getRejectionReasons():
            self.review_states = filter(
                lambda x: x.get("id") != "rejected", self.review_states)

        self.hideclientlink = "RegulatoryInspector" in self.roles \
            and "Manager" not in self.roles \
            and "LabManager" not in self.roles \
            and "LabClerk" not in self.roles

        if self.context.portal_type == "AnalysisRequestsFolder" and \
                (self.mtool.checkPermission(AddAnalysisRequest, self.context)):
            self.context_actions[_("Add")] = \
                {"url": "ar_add?ar_count=1",
                 'permission': 'Add portal content',
                 "icon": "++resource++bika.lims.images/add.png"}

        self.editresults = -1
        self.clients = {}
        # self.user_is_preserver = "Preserver" in self.roles
        # Printing workflow enabled?
        # If not, remove the Column
        self.printwfenabled = \
            self.context.bika_setup.getPrintingWorkflowEnabled()
        printed_colname = "Printed"
        if not self.printwfenabled and printed_colname in self.columns:
            # Remove "Printed" columns
            del self.columns[printed_colname]
            tmprvs = []
            for rs in self.review_states:
                tmprs = rs
                tmprs["columns"] = [c for c in rs.get("columns", []) if
                                    c != printed_colname]
                tmprvs.append(tmprs)
            self.review_states = tmprvs
        elif self.printwfenabled:
            # Print button to choose multiple ARs and print them.
            review_states = []
            for review_state in self.review_states:
                review_state.get("custom_transitions", []).extend(
                    [{"id": "print_sample",
                      "title": _("Print"),
                      "url": "workflow_action?action=print_sample"}, ])
                review_states.append(review_state)
            self.review_states = review_states

        # Only "senaite.core: ManageAnalysisRequests" may see the copy to new button.
        # elsewhere it is hacked in where required.
        if self.copy_to_new_allowed:
            review_states = []
            for review_state in self.review_states:
                review_state.get("custom_transitions", []).extend(
                    [{"id": "copy_to_new",
                      "title": _("Copy to new"),
                      "url": "workflow_action?action=copy_to_new"}, ])
                review_states.append(review_state)
            self.review_states = review_states
239450
def update(self, response, **kwargs):
        '''
        
        '''
        response_cls = super(
            LocationResponseClassLegacyAccessor, self)._get_instance(**kwargs)
        if response_cls:
            setattr(response_cls, self.column, self.accessor(response))
            setattr(
                response_cls, self.venue_column, self.venue_accessor(response))
            _action_and_commit(response_cls, session.add)
967512
def update(self, **kwargs):
        """"""
        self._check_exclusive_parameters(**kwargs)
        return super(Rule, self)._update(**kwargs)
356722
def update_json_analysis(analysis, j):
    
    def _analyze_list(l, parent=""):
        for v in l:
            if isinstance(v, (dict, CaseInsensitiveDict)):
                _analyze_json(v, parent=parent)
            elif isinstance(v, list):
                _analyze_list(v, parent=parent+"[]")
            else:
                analysis[parent].add(v)


    def _analyze_json(d, parent=""):
        for k, v in d.iteritems():
            if parent:
                path = ".".join([parent, k])
            else:
                path = k
            if isinstance(v, (dict, CaseInsensitiveDict)):
                _analyze_json(v, parent=path)
            elif isinstance(v, list):
                _analyze_list(v, parent=path+"[]")
            else:
                analysis[path].add(v)

    if isinstance(j, list):
        _analyze_list(j)
    if isinstance(j, (dict, CaseInsensitiveDict)):
        _analyze_json(j)
493854
def update(self, settings):
        '''
        

        '''
        if 'settings' in settings:
            self._settings.update(settings['settings'])
        else:
            self._settings.update(settings)

        if 'instruments' in settings:
            for instrument_name, instrument_setting in settings['instruments'].items():
                self.instruments[instrument_name]['settings'].update(instrument_setting['settings'])

        if 'scripts' in settings:
            for script_name, script_setting in settings['scripts'].items():
                self.scripts[script_name].update(script_setting)
178356
def with_updated_configuration(self, options=None,
                                   attribute_options=None):
        
        return self._mapping.with_updated_configuration(options=options,
                                                        attribute_options=
                                                            attribute_options)
594781
def update_line(self, resource_id, data):
        """"""
        return OrderLines(self.client).on(self).update(resource_id, data)
1170924
def update_configure_params(self, part=None, info=None):
        # type: (Part, ConfigureParamsInfo) -> None
        """"""
        with self.changes_squashed:
            # Update the dict
            if part:
                self.part_configure_params[part] = info

            # No process yet, so don't do this yet
            if self.process is None:
                return

            # Get the model of our configure method as the starting point
            configure_model = MethodModel.from_callable(self.configure)

            # These will not be inserted as the already exist
            ignored = tuple(ConfigureHook.call_types)

            # Re-calculate the following
            required = []
            takes_elements = OrderedDict()
            defaults = OrderedDict()

            # First do the required arguments
            for k in configure_model.takes.required:
                required.append(k)
                takes_elements[k] = configure_model.takes.elements[k]
            for part in self.parts.values():
                try:
                    info = self.part_configure_params[part]
                except KeyError:
                    continue
                for k in info.required:
                    if k not in required and k not in ignored:
                        required.append(k)
                        takes_elements[k] = info.metas[k]

            # Now the default and optional
            for k in configure_model.takes.elements:
                if k not in required:
                    takes_elements[k] = configure_model.takes.elements[k]
            for part in self.parts.values():
                try:
                    info = self.part_configure_params[part]
                except KeyError:
                    continue
                for k in info.metas:
                    if k not in required and k not in ignored:
                        takes_elements[k] = info.metas[k]
                        if k in info.defaults:
                            defaults[k] = info.defaults[k]

            # Set the values
            configure_model.takes.set_elements(takes_elements)
            configure_model.takes.set_required(required)
            configure_model.set_defaults(defaults)

            # Update methods from the new metas
            self._block.configure.set_takes(configure_model.takes)
            self._block.configure.set_defaults(configure_model.defaults)

            # Now make a validate model with returns
            validate_model = MethodModel.from_dict(configure_model.to_dict())
            returns = MapMeta.from_dict(validate_model.takes.to_dict())
            for v in returns.elements.values():
                v.set_writeable(False)
            self._block.validate.set_takes(validate_model.takes)
            self._block.validate.set_defaults(validate_model.defaults)
            self._block.validate.set_returns(returns)
912450
async def updateconfig(self):
        ""
        exists = {}
        for s in self.connections:
            exists[(s.protocol.vhost, s.rawurl)] = s
        self._createServers(self, '', exists = exists)
        for _,v in exists.items():
            await v.shutdown()
            self.connections.remove(v)
702466
def set_lane_list(self, value):
        
        if value is None or not isinstance(value, list):
            raise TypeError("LaneList new value must be a list")
        else:
            for element in value:
                if not isinstance(element, lane.Lane):
                    raise TypeError("LaneList elements in variable must be of Lane class")
            self.__lane_list = value