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


Python Report.get_data_source方法代码示例

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


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

示例1: get_options

# 需要导入模块: from vizgrimoire.report import Report [as 别名]
# 或者: from vizgrimoire.report.Report import get_data_source [as 别名]
    from vizgrimoire.report import Report

    logging.basicConfig(level=logging.INFO,format='%(asctime)s %(message)s')
    logging.info("Grimoire Metrics Tool")
    opts = get_options()

    Report.init(opts.automator_file, opts.metrics_path)

    # metrics = SCM.get_metrics_definition()
    # for name in metrics:
    #     print name

    dss = Report.get_data_sources()

    if (opts.data_source):
        ds = Report.get_data_source(opts.data_source)
        dss = [ds]
        if ds is None:
            logging.error("Data source not found " + opts.data_source)
            dss = []

    total_metrics = 0
    total_studies = 0

    # Metrics
    for ds in dss:
        print("\nGetting metrics for " + ds.get_name())
        metrics_set = ds.get_metrics_set(ds)
        for metrics in metrics_set:
            print "->" + metrics.get_definition()['name']
            total_metrics += 1
开发者ID:VizGrimoire,项目名称:GrimoireLib,代码行数:33,代码来源:metrics_tool.py


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