使用AI/ML技术从提交消息中生成变更日志条目

thoth-glyph的Python项目详细描述


Glyph使用机器学习和自然语言处理来理解 提交消息。这些知识可用于将提交分类为 如错误修复、功能添加、改进等

  • 使用带Kebechet的Glyph, 可以生成智能更改日志项。在
  • Glyph还可以用作分析来自 本地存储库的使用情况(请参阅下面的存储库)

从Git运行此项目

git clone git@github.com:thoth-station/glyph.git  # or use https
cd glyph
pipenv install --dev
PYTHONPATH=. pipenv run ./thoth-glyph --help

从PyPI安装此项目

此项目在PyPI上可用,要安装它:

^{pr2}$

特点

  • Commit Classification:可以使用 以下命令:

    thoth-glyph classify -m "COMMIT MESSAGE TO BE ANALYZED"
  • 对多个提交进行分类:多个提交可以一起分类 使用classify repo命令。默认情况下,此操作将所有 在存储库中提交。可选地,日期范围(YYYY-MM-DD)可以是 提供:

    thoth-glyph classify-repo --path /path/to/git/repo --start 2020-05-01 --end 2020-05-10
  • 使用标记分类:也可以使用git标记选择提交。这个 下面的命令将在标记v3.7.1和v3.7.2之间选择提交

    thoth-glyph classify-repo-by-tag --path /path/to/git/repo --start_tag v3.7.1 --end_tag v3.7.2

示例用法

$ thoth-glyph classify -m "Fixed server bug that impacted performance"2020-08-12 19:45:47,798 4594 WARNING  thoth.common:346: Logging to a Sentry instance is turned off
2020-08-12 19:45:47,799 4594 INFO     thoth.common:368: Logging to rsyslog endpoint is turned off
2020-08-12 19:45:47,799 4594 INFO     glyph:68: Version: 0.0.0
2020-08-12 19:45:47,800 4594 INFO     glyph:83: Classifying commit
2020-08-12 19:45:47,800 4594 INFO     thoth.glyph.models:33: Model Path : /home/tussharm/.local/lib/python3.6/site-     packages/thoth/glyph/data/model_commits_v2_quant.bin
Label : corrective
$ thoth-glyph classify-repo --path /home/tussharm/fork/glyph/ --start 2020-08-08 --end 2020-08-12
2020-08-12 19:51:26,743 4873 WARNING  thoth.common:346: Logging to a Sentry instance is turned off
2020-08-12 19:51:26,743 4873 INFO     thoth.common:368: Logging to rsyslog endpoint is turned off
2020-08-12 19:51:26,744 4873 INFO     glyph:68: Version: 0.0.0
2020-08-12 19:51:26,744 4873 INFO     glyph:100: Classifying commits in the given date-range
2020-08-12 19:51:26,749 4873 INFO     thoth.glyph.models:44: Model Path : /home/tussharm/.local/lib/python3.6/site-p    packages/thoth/glyph/data/model_commits_v2_quant.bin
2020-08-12 19:51:26,768 4873 INFO     thoth.glyph.models:52: 6 commits classified
                                           message labels_predicted
0                                 readme updated #27       perfective
1  merge pull request #1 from tushar7sharma/commi...    nonfunctional
2  merge remote-tracking branch 'upstream/master'...         features
3  grouping user-defined commit phrases (#28)* co...         features
4  commits can be collected inside user-defined g...         features
5  merge remote-tracking branch 'upstream/master'...         features

与Kebechet集成

Kebechet可以通过从中读取项目配置来使用Glyph。托特·亚姆 文件。Glyph支持的格式化程序和ML classifiers可以在此中指定 配置文件。在

  • 请参阅示例管理器配置here
  • 请参阅使用Glyphhere生成的示例变更日志

模型和数据集

目前Glyph附带了一个使用Facebook的fasttext库训练的模型,该模型覆盖从 多个大型开源项目(参见参考出版物了解更多 细节)。这个库可以很容易地扩展以容纳更多的模型。 欢迎开发人员投稿,提高分类精度。在

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java如何在数据库中存储工作日数据以及开始时间和结束时间?   mysql Java JPA内部联接查询不起作用   java MQ消息在不同的客户端应用程序中显示不同   javascript如何在xPage上提高typeAhead性能?   java在尝试保存EditText时无法暂停   mongodb“未能使用带参数的构造函数NO_构造函数实例化java.util.List”,   java如何修改使IllegalArgumentException:列“\u id”不存在的游标   转换Android。网Uri到Java。伊奥。输入流   java NetBeans RCP居中弹出窗口无法按预期工作   java将sql开发人员与netbeans连接起来   带有xmldsig签名的java JAXB编组   java ORACLE JDBC批处理执行不会返回受影响行的实际计数   java无法理解如何在由swagger自动生成的jaxrs服务器中访问请求头   java如何处理漏洞CVE20181258,同时将Spring安全版本5与外部客户端(最新版本)一起使用?   JavaSpring数据JPA存储库多租户单模式技术