def rename_feature(self, mapobject_type_name, name, new_name):
        '''Renames a feature.

        Parameters
        ----------
        mapobject_type_name: str
            name of the segmented objects type
        name: str
            name of the feature that should be renamed
        new_name: str
            name that should be given to the feature

        See also
        --------
        :func:`tmserver.api.feature.update_feature`
        :class:`tmlib.models.feature.Feature`
        '''
        logger.info(
            'rename feature "%s" of experiment "%s", mapobject type "%s"',
            name, self.experiment_name, mapobject_type_name
        )
        content = {
            'name': new_name,
        }
        feature_id = self._get_feature_id(mapobject_type_name, name)
        url = self._build_api_url(
            '/experiments/{experiment_id}/features/{feature_id}'.format(
                experiment_id=self._experiment_id, feature_id=feature_id
            )
        )
        res = self._session.put(url, json=content)
        res.raise_for_status()
def rename_feature ( self , mapobject_type_name , name , new_name ) : logger . info ( 'rename feature "%s" of experiment "%s", mapobject type "%s"' , name , self . experiment_name , mapobject_type_name ) content = { 'name' : new_name , } feature_id = self . _get_feature_id ( mapobject_type_name , name ) url = self . _build_api_url ( '/experiments/{experiment_id}/features/{feature_id}' . format ( experiment_id = self . _experiment_id , feature_id = feature_id ) ) res = self . _session . put ( url , json = content ) res . raise_for_status ( )
Renames a feature.

        Parameters
        ----------
        mapobject_type_name: str
            name of the segmented objects type
        name: str
            name of the feature that should be renamed
        new_name: str
            name that should be given to the feature

        See also
        --------
        :func:`tmserver.api.feature.update_feature`
        :class:`tmlib.models.feature.Feature`