用于创建变更日志的工具
changelog-builder的Python项目详细描述
变更日志生成器
基于注释创建降价变更日志的工具。在
目录
安装
使用包管理器pip安装changelog builder。在
pip install changelog-builder
使用
^{pr2}$参数
- path项目目录的路径,默认为
getcwd()
- --filename-fn更改日志文件的名称,默认为变更日志.md
- --identifier-id一个或多个标识更改的字符串(忽略前面行中的空白),默认为“#NEW”“#NEW”
- --current version-cv三个数字,按major、minor和patch指定当前版本,默认为0 0 0
- --version increment-ic三个数字,按major、minor和patch指定增量,默认为0 1[示例:增量为0.1.0的4.2.1版本变为4.3.1]
- --files-fi扫描的一个或多个文件后缀(需要从一个点开始),默认为“.py”
这两个还不能正常工作:
- --includes-in另外包含的一个或多个文件,默认为[]
- --excludes-ex一个或多个被排除的文件,默认为[]
第一次在项目中运行changelog builder将创建一个.changelog_builder
文件,该文件以json格式存储上面的参数,并且可以手动修改,但这可能很少有必要,因为每个传递的参数都会更改设置文件。在
示例
以下代码:
defdivision(divident:int,divisior:int)->float:# NEW division by zero isn't allowed anymoreifdivisor==0:returnNone...
将生成此更改日志(而上面的# NEW division by zero isn't allowed anymore
行将被删除):
变更日志
0.0.12020-4-21
- division by zero isn't allowed anymore
多种用途如下:
变更日志
0.0.32020-4-27
- now in beta
- the screen size issue due to dpi settings should be resolved
0.0.22020-4-22
- some new stuff
- fixed #34
0.0.12020-4-21
- division by zero isn't allowed anymore
注释
A very popular use case might be setting a version in the parameters directly. In this case should the current-version parameter be set to the desired version and the version-increment to 0 0 0. This set the next version to the desired value but will also set the version-increment in the settings file which means every use in the future without the version-increment parameter set differently, will result in the version not to be increased.
It is also possible to mark the identifiers (like
# NEW
) in your IDEPycharm: File →Â Settings →Â Editor →Â TODO →Â [the plus sign in the upper right] →Â Type in the regex pattern (like
\bnew\b.*
which will catch both# new
and# NEW
if case sensitive is unchecked) and specify the way you want it to be highlightedThis is certainly possible with other IDEs as well.
Both the --includes as well as the --excludes parameter do not work properly at the moment.
许可证
此文件由pypipal.setup_生成器工具。
- 项目
标签: