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


Python Report.get_filter方法代码示例

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


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

示例1: _get_metrics_for_pending_all

# 需要导入模块: from vizgrimoire.report import Report [as 别名]
# 或者: from vizgrimoire.report.Report import get_filter [as 别名]
    def _get_metrics_for_pending_all(self, isevol):
        """ Return the metric for all items normalized """
        metrics = self._get_metrics_for_pending()
        if isevol:
            submitted = metrics['submitted'].get_ts()
            merged = metrics['merged'].get_ts()
            abandoned = metrics['abandoned'].get_ts()
        else:
            submitted = metrics['submitted'].get_agg()
            merged = metrics['merged'].get_agg()
            abandoned = metrics['abandoned'].get_agg()

        from vizgrimoire.report import Report
        filter = Report.get_filter(self.filters.type_analysis[0])
        items = Pullpo.get_filter_items(filter, self.filters.startdate,
                                     self.filters.enddate, self.db.identities_db)
        items = items.pop('name')

        from vizgrimoire.GrimoireUtils import fill_and_order_items
        id_field = self.db.get_group_field_alias(self.filters.type_analysis[0])
        submitted = check_array_values(submitted)
        merged = check_array_values(merged)
        abandoned = check_array_values(abandoned)

        submitted = fill_and_order_items(items, submitted, id_field,
                                         isevol, self.filters.period,
                                         self.filters.startdate, self.filters.enddate)
        merged = fill_and_order_items(items, merged, id_field,
                                         isevol, self.filters.period,
                                         self.filters.startdate, self.filters.enddate)
        abandoned = fill_and_order_items(items, abandoned, id_field,
                                         isevol, self.filters.period,
                                         self.filters.startdate, self.filters.enddate)
        metrics_for_pendig_all = {
          id_field: submitted[id_field],
          "submitted": submitted["submitted"],
          "merged": merged["merged"],
          "abandoned": abandoned["abandoned"]
        }
        if isevol:
            metrics_for_pendig_all[self.filters.period] = submitted[self.filters.period]

        return metrics_for_pendig_all
开发者ID:VizGrimoire,项目名称:GrimoireLib,代码行数:45,代码来源:pullpo_metrics.py


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