当前位置: 首页>>代码示例>>Python>>正文


Python DataSource.get_studies_data方法代码示例

本文整理汇总了Python中vizgrimoire.data_source.DataSource.get_studies_data方法的典型用法代码示例。如果您正苦于以下问题:Python DataSource.get_studies_data方法的具体用法?Python DataSource.get_studies_data怎么用?Python DataSource.get_studies_data使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在vizgrimoire.data_source.DataSource的用法示例。


在下文中一共展示了DataSource.get_studies_data方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: get_evolutionary_data

# 需要导入模块: from vizgrimoire.data_source import DataSource [as 别名]
# 或者: from vizgrimoire.data_source.DataSource import get_studies_data [as 别名]
 def get_evolutionary_data (period, startdate, enddate, i_db, filter_ = None):
     metrics =  DockerHubDS.get_metrics_data(period, startdate, enddate, i_db, filter_, True)
     if filter_ is not None:
         studies = {}
     else:
         studies =  DataSource.get_studies_data(DockerHubDS, period, startdate, enddate, True)
     return dict(metrics.items()+studies.items())
开发者ID:VizGrimoire,项目名称:GrimoireLib,代码行数:9,代码来源:DockerHubDS.py

示例2: get_evolutionary_data

# 需要导入模块: from vizgrimoire.data_source import DataSource [as 别名]
# 或者: from vizgrimoire.data_source.DataSource import get_studies_data [as 别名]
    def get_evolutionary_data (period, startdate, enddate, identities_db, filter_ = None):
        metrics = Pullpo.get_metrics_data(period, startdate, enddate, identities_db, filter_, True)
        if filter_ is not None: studies = {}
        else:
            studies = DataSource.get_studies_data(Pullpo, period, startdate, enddate, True)
        evol_data = dict(metrics.items()+studies.items())

        return evol_data
开发者ID:VizGrimoire,项目名称:GrimoireLib,代码行数:10,代码来源:Pullpo.py

示例3: get_evolutionary_data

# 需要导入模块: from vizgrimoire.data_source import DataSource [as 别名]
# 或者: from vizgrimoire.data_source.DataSource import get_studies_data [as 别名]
    def get_evolutionary_data (cls, period, startdate, enddate, identities_db, filter_ = None):
        closed_condition = cls._get_closed_condition()

        metrics = cls.get_metrics_data(period, startdate, enddate, identities_db, filter_, True)
        if filter_ is not None: studies = {}
        else:
            studies = DataSource.get_studies_data(cls, period, startdate, enddate, True)
        return dict(metrics.items()+studies.items())
开发者ID:jgbarah,项目名称:GrimoireLib,代码行数:10,代码来源:ITS.py

示例4: get_agg_data

# 需要导入模块: from vizgrimoire.data_source import DataSource [as 别名]
# 或者: from vizgrimoire.data_source.DataSource import get_studies_data [as 别名]
    def get_agg_data (period, startdate, enddate, identities_db, filter_ = None):
        rfield = MLS.get_repo_field()
        evolutionary = False

        metrics = MLS.get_metrics_data(period, startdate, enddate, identities_db, filter_, evolutionary)
        if filter_ is not None: studies = {}
        else:
            studies = DataSource.get_studies_data(MLS, period, startdate, enddate, evolutionary)
        agg = dict(metrics.items()+studies.items())

        return agg
开发者ID:VizGrimoire,项目名称:GrimoireLib,代码行数:13,代码来源:MLS.py

示例5: get_agg_data

# 需要导入模块: from vizgrimoire.data_source import DataSource [as 别名]
# 或者: from vizgrimoire.data_source.DataSource import get_studies_data [as 别名]
    def get_agg_data (period, startdate, enddate, identities_db, filter_ = None):
        if filter_ is not None:
            if filter_.get_name() != "people2":
                logging.warn("Mediawiki only supports people2 filter.")
                return {}

        metrics =  Mediawiki.get_metrics_data(period, startdate, enddate, identities_db, filter_, False)
        if filter_ is not None: studies = {}
        else:
            studies =  DataSource.get_studies_data(Mediawiki, period, startdate, enddate, False)
        return dict(metrics.items()+studies.items())
开发者ID:VizGrimoire,项目名称:GrimoireLib,代码行数:13,代码来源:Mediawiki.py

示例6: get_agg_data

# 需要导入模块: from vizgrimoire.data_source import DataSource [as 别名]
# 或者: from vizgrimoire.data_source.DataSource import get_studies_data [as 别名]
    def get_agg_data (period, startdate, enddate, identities_db, filter_= None):
        metrics = Pullpo.get_metrics_data(period, startdate, enddate, identities_db, filter_, False)
        if filter_ is not None: studies = {}
        else:
            studies = DataSource.get_studies_data(Pullpo, period, startdate, enddate, False)
        agg = dict(metrics.items()+studies.items())

        if (filter_ is None):
            static_url = Pullpo.get_url()
            agg = dict(agg.items() + static_url.items())

        return agg
开发者ID:VizGrimoire,项目名称:GrimoireLib,代码行数:14,代码来源:Pullpo.py

示例7: get_agg_data

# 需要导入模块: from vizgrimoire.data_source import DataSource [as 别名]
# 或者: from vizgrimoire.data_source.DataSource import get_studies_data [as 别名]
    def get_agg_data (period, startdate, enddate, identities_db, filter_ = None):
        if filter_ is not None:
            sf = EventsDS.get_supported_filters()
            if filter_.get_name() not in sf:
                logging.warn("EventsDS only supports " + ",".join(sf))
                return {}

        metrics =  EventsDS.get_metrics_data(period, startdate, enddate, identities_db, filter_, False)
        if filter_ is not None: studies = {}
        else:
            studies =  DataSource.get_studies_data(EventsDS, period, startdate, enddate, False)
        return dict(metrics.items()+studies.items())
开发者ID:jgbarah,项目名称:GrimoireLib,代码行数:14,代码来源:EventsDS.py

示例8: get_evolutionary_data

# 需要导入模块: from vizgrimoire.data_source import DataSource [as 别名]
# 或者: from vizgrimoire.data_source.DataSource import get_studies_data [as 别名]
    def get_evolutionary_data (period, startdate, enddate, identities_db, filter_ = None):
        metrics = SCM.get_metrics_data(period, startdate, enddate, identities_db, filter_, True)
        if filter_ is not None:
            studies = {}
            logging.info("No studies found for evolutionary report")
        else:
            logging.info("Studies found for evolutionary report")
            studies = DataSource.get_studies_data(SCM, period, startdate, enddate, True)
            logging.info(studies)
        evol_data = dict(metrics.items()+studies.items())

        return evol_data
开发者ID:VizGrimoire,项目名称:GrimoireLib,代码行数:14,代码来源:SCM.py

示例9: get_agg_data

# 需要导入模块: from vizgrimoire.data_source import DataSource [as 别名]
# 或者: from vizgrimoire.data_source.DataSource import get_studies_data [as 别名]
    def get_agg_data (cls, period, startdate, enddate, identities_db, filter_ = None):
        closed_condition = cls._get_closed_condition()

        metrics = cls.get_metrics_data(period, startdate, enddate, identities_db, filter_, False)
        if filter_ is not None: studies = {}
        else:
            studies = DataSource.get_studies_data(cls, period, startdate, enddate, False)
        agg =  dict(metrics.items()+studies.items())

        if filter_ is None:
            data = cls.get_url()
            agg = dict(agg.items() +  data.items())

        return agg
开发者ID:jgbarah,项目名称:GrimoireLib,代码行数:16,代码来源:ITS.py

示例10: get_agg_data

# 需要导入模块: from vizgrimoire.data_source import DataSource [as 别名]
# 或者: from vizgrimoire.data_source.DataSource import get_studies_data [as 别名]
    def get_agg_data (period, startdate, enddate, identities_db, filter_= None):
        metrics = SCM.get_metrics_data(period, startdate, enddate, identities_db, filter_, False)
        if filter_ is not None:
            studies = {}
            logging.info("No studies found for aggregated analysis")
        else:
            logging.info("Studies found for aggregated analysis")
            studies = DataSource.get_studies_data(SCM, period, startdate, enddate, False)
            logging.info(studies)
        agg = dict(metrics.items()+studies.items())

        if (filter_ is None):
            static_url = SCM.get_url()
            agg = dict(agg.items() + static_url.items())

        return agg
开发者ID:VizGrimoire,项目名称:GrimoireLib,代码行数:18,代码来源:SCM.py

示例11: _get_data

# 需要导入模块: from vizgrimoire.data_source import DataSource [as 别名]
# 或者: from vizgrimoire.data_source.DataSource import get_studies_data [as 别名]
    def _get_data (period, startdate, enddate, i_db, filter_, evol):
        data = {}

        type_analysis = None
        if (filter_ is not None):
            type_analysis = [filter_.get_name(), filter_.get_item()]
            logging.warn(DownloadsDS.get_name() + " does not support filters.")
            return data

        if (evol):
            metrics_on = DownloadsDS.get_metrics_core_ts()
        else:
            metrics_on = DownloadsDS.get_metrics_core_agg()
        mfilter = MetricFilters(period, startdate, enddate, type_analysis)
        all_metrics = DownloadsDS.get_metrics_set(DownloadsDS)

        for item in all_metrics:
            if item.id not in metrics_on: continue
            item.filters = mfilter
            if evol is False:
                mvalue = item.get_agg()
            else:
                mvalue = item.get_ts()
            data = dict(data.items() + mvalue.items())

            if evol is False:
                init_date = DownloadsDS.get_date_init(startdate, enddate, None, type_analysis)
                end_date = DownloadsDS.get_date_end(startdate, enddate, None, type_analysis)

                data = dict(data.items() + init_date.items() + end_date.items())

                # Tendencies
                metrics_trends = DownloadsDS.get_metrics_core_trends()

                for i in [7,30,365]:
                    for item in all_metrics:
                        if item.id not in metrics_trends: continue
                        period_data = item.get_trends(enddate, i)
                        data = dict(data.items() +  period_data.items())

        if filter_ is not None: studies = {}
        else:
            studies = DataSource.get_studies_data(DownloadsDS, period, startdate, enddate, evol)
        return dict(data.items()+studies.items())
开发者ID:jsmanrique,项目名称:GrimoireLib,代码行数:46,代码来源:DownloadsDS.py

示例12: __get_data__

# 需要导入模块: from vizgrimoire.data_source import DataSource [as 别名]
# 或者: from vizgrimoire.data_source.DataSource import get_studies_data [as 别名]

#.........这里部分代码省略.........
                if r in reports_on: metrics_on += [r]

        if type_analysis and type_analysis[1] is None:
            items = DS.get_filter_items(filter_, startdate, enddate, identities_db)
            items = items.pop('name')

        if DS.get_name()+"_start_date" in Report.get_config()['r']:
            startdate = "'"+Report.get_config()['r'][DS.get_name()+"_start_date"]+"'"
        if DS.get_name()+"_end_date" in Report.get_config()['r']:
            enddate = "'"+Report.get_config()['r'][DS.get_name()+"_end_date"]+"'"

        mfilter = MetricFilters(period, startdate, enddate, type_analysis, 10, people_out, None)
        all_metrics = SCR.get_metrics_set(SCR)

        # SCR specific: remove some metrics from filters
        if filter_ is not None:
            metrics_not_filters =  SCR.get_metrics_not_filters()
            metrics_on_filters = list(set(metrics_on) - set(metrics_not_filters))
            if filter_.get_name() == "repository":
                if 'review_time' in metrics_on: metrics_on_filters+= ['review_time']
                if 'submitted' in metrics_on: metrics_on_filters+= ['submitted']
            metrics_on = metrics_on_filters
        # END SCR specific

        for item in all_metrics:
            if item.id not in metrics_on: continue
            # logging.info(item.id)
            mfilter_orig = item.filters
            mfilter.global_filter = mfilter_orig.global_filter
            item.filters = mfilter
            if not evol: mvalue = item.get_agg()
            else:        mvalue = item.get_ts()

            if type_analysis and type_analysis[1] is None:
                logging.info(item.id)
                id_field = SCRQuery.get_group_field_alias(type_analysis[0])
                mvalue = check_array_values(mvalue)
                mvalue = fill_and_order_items(items, mvalue, id_field,
                                              evol, period, startdate, enddate)
            data = dict(data.items() + mvalue.items())
            item.filters = mfilter_orig

        # SCR SPECIFIC #
        if evol:
            if type_analysis and type_analysis[1] is None: pass
            else:
                metrics_on_changes = ['merged','abandoned','new']
                for item in all_metrics:
                    if item.id in metrics_on_changes and filter_ is None:
                        mfilter_orig = item.filters
                        item.filters = mfilter
                        mvalue = item.get_ts_changes()
                        data = dict(data.items() + mvalue.items())
                        item.filters = mfilter_orig
        # END SCR SPECIFIC #

        if not evol:
            init_date = DS.get_date_init(startdate, enddate, identities_db, type_analysis)
            end_date = DS.get_date_end(startdate, enddate, identities_db, type_analysis)

            if type_analysis and type_analysis[1] is None:
                if id_field is None:
                    id_field = dsquery.get_group_field_alias(type_analysis[0])
                init_date = fill_and_order_items(items, init_date, id_field,
                                                 evol, period, startdate, enddate)
                end_date = fill_and_order_items(items, end_date, id_field,
                                                evol, period, startdate, enddate)

            data = dict(data.items() + init_date.items() + end_date.items())

            # Tendencies
            metrics_trends = SCR.get_metrics_core_trends()

            automator_metrics = DS.get_name()+"_metrics_trends"
            if automator_metrics in automator['r']:
                metrics_trends = automator['r'][automator_metrics].split(",")

            for i in [7,30,365]:
                for item in all_metrics:
                    if item.id not in metrics_trends: continue
                    mfilter_orig = item.filters
                    item.filters = mfilter
                    period_data = item.get_trends(enddate, i)
                    item.filters = mfilter_orig

                    data = dict(data.items() +  period_data.items())

                    if type_analysis and type_analysis[1] is None:
                        id_field = SCRQuery.get_group_field_alias(type_analysis[0])
                        period_data = fill_and_order_items(items, period_data, id_field)

                    data = dict(data.items() +  period_data.items())


        if filter_ is not None: studies_data = {}
        else:
            studies_data = DataSource.get_studies_data(SCR, period, startdate, enddate, evol)
        data = dict(data.items() +  studies_data.items())

        return data
开发者ID:VizGrimoire,项目名称:GrimoireLib,代码行数:104,代码来源:SCR.py

示例13: __get_data

# 需要导入模块: from vizgrimoire.data_source import DataSource [as 别名]
# 或者: from vizgrimoire.data_source.DataSource import get_studies_data [as 别名]
 def __get_data (period, startdate, enddate, i_db, filter_, evol):
     metrics =  QAForums.get_metrics_data(period, startdate, enddate, i_db, filter_, evol)
     if filter_ is not None: studies = {}
     else:
         studies =  DataSource.get_studies_data(QAForums, period, startdate, enddate, evol)
     return dict(metrics.items()+studies.items())
开发者ID:VizGrimoire,项目名称:GrimoireLib,代码行数:8,代码来源:QAForums.py


注:本文中的vizgrimoire.data_source.DataSource.get_studies_data方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。