跳转到主要内容

检查开发者使用git历史记录所贡献的模块。

项目描述

Venom

Build Status Maintainability Test Coverage PyPI version PyPI - Python Version

检查开发者使用git历史记录所贡献的模块。

安装

pip install we-are-venom

使用

首先,在setup.cfg中的venom部分提供模块结构配置

[venom]
history_depth_years=2
min_lines_in_file=20
extensions_to_check=py,html,css,md,cfg,js,ts
min_new_lines_for_accumulated_module=50
modules=
    apps/foo
    apps/bar
    scripts
    core

modules变量是必需的,其他都是可选的。

检查总累积级别

$ venom check melevir@gmail.com .
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━┓
┃ Module                         ┃ Total lines ┃ Touched lines ┃ Accumulated ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━┩
│ opensource_watchman/pipelines/ │ 557         │ 120           │ ✅          │
│ opensource_watchman/utils/     │ 30          │ 30            │ ❌          │
│ opensource_watchman/templates/ │ 105         │ 127           │ ✅          │
│ opensource_watchman/api/       │ 218         │ 12            │ ❌          │
│ tests/                         │ 8           │ 16            │ -           │
│ opensource_watchman/api/       │ 218         │ 0             │ ❌          │
│ opensource_watchman/pipelines/ │ 557         │ 0             │ ❌          │
│ opensource_watchman/templates/ │ 105         │ 0             │ ❌          │
│ opensource_watchman/utils/     │ 30          │ 0             │ ❌          │
│ tests/                         │ 8           │ 0             │ -           │
└────────────────────────────────┴─────────────┴───────────────┴─────────────┘
Total accumulation rate: 25%

生成大型代码审查报告

$ venom grand-code-review . 2020-05-01 2020-06-01 https://github.com/best-doctor/import_me/ --min_lines=100 --module=finance --module=chat --generate_pretty_changesets
# TODO
Ticket num
    Info:
        Touched lines: 23
        Touched modules: finance
        Authors: melevir
    Commits:
        commit1 (link)
        commit2 (link)
...
Summary: total tickets, total commits, total loc in report and filtered.

此功能按工单号分组提交,过滤掉更改超过min_lines行或影响module(可以是多个)的提交组。如果generate_pretty_changesets,则每个组都会单独挑选到分支中,以生成漂亮的差异视图。

贡献

我们非常希望您为我们的项目做出贡献。这很简单

  • 创建一个包含您发现的问题或建议的问题。等待维护者的批准。
  • 创建一个拉取请求。确保所有检查都为绿色。
  • 如果有任何审阅评论,请修复。
  • 做得很棒。

以下是一些有用的提示

  • 您可以使用 make check 运行所有检查和测试。请在 TravisCI 做之前完成。
  • 我们使用 BestDoctor python styleguide
  • 我们尊重 Django CoC。要柔和,不要胡说八道。

项目详情


下载文件

下载您平台上的文件。如果您不确定选择哪个,请了解更多关于 安装包 的信息。

源分发

we_are_venom-0.0.2.tar.gz (10.9 kB 查看哈希值)

上传时间

AWSAWS云计算和安全赞助商DatadogDatadog监控FastlyFastlyCDNGoogleGoogle下载分析MicrosoftMicrosoftPSF赞助商PingdomPingdom监控SentrySentry错误日志StatusPageStatusPage状态页面