Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
镜像
Python_Packaging_Authority
pip
提交
c36cca51
P
pip
项目概览
镜像
/
Python_Packaging_Authority
/
pip
10 个月 前同步成功
通知
0
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
pip
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
c36cca51
编写于
3月 19, 2017
作者:
D
Donald Stufft
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Allow marking a change as "trivial" for the news file
上级
ef5317aa
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
43 addition
and
22 deletion
+43
-22
NEWS.rst
NEWS.rst
+1
-1
docs/development.rst
docs/development.rst
+36
-20
news/_template.rst
news/_template.rst
+1
-1
pyproject.toml
pyproject.toml
+5
-0
未找到文件。
NEWS.rst
浏览文件 @
c36cca51
...
...
@@ -3,7 +3,7 @@
fix
problems
like
typo
corrections
or
such
.
To
add
a
new
change
log
entry
,
please
see
https
://
pip
.
pypa
.
io
/
en
/
latest
/
development
/#
adding
-
news
https
://
pip
.
pypa
.
io
/
en
/
latest
/
development
/#
adding
-
a
-
news
-
entry
..
towncrier
release
notes
start
...
...
docs/development.rst
浏览文件 @
c36cca51
...
...
@@ -88,26 +88,42 @@ Later, when you think you're ready, get in touch with one of the maintainers,
and they will initiate a vote.
Adding News
===========
The pip project manages its changelog/news file using
`towncrier <https://pypi.org/project/towncrier/>`_. To add a new item to the
news file, you must create a file inside of the ``news/`` directory.
This file must be named as ``<issue>.<ext>``, where ``<issue>`` is the issue
number on GitHub (if it's important enough to have a news entry, it should be
important enough to have a bug describing the desired change) and ``<ext>`` is
one of ``removal``, ``feature``, ``bugfix``, ``doc``. Thus a file might be named
something like ``news/1234.bugfix``.
The contents of this file is the news file entry that you wish to add WITHOUT
referencing the issue number (the reference will be added automatically). These
contents can include reStructuredText formatting.
If you wish to reference multiple issues with the same news file entry, then
simply create multiple files with the exact same contents and towncrier will
deduplicate them and reference all of the specified issues.
Adding a NEWS Entry
===================
The ``NEWS.rst`` file is managed using
`towncrier <https://pypi.org/project/towncrier/>`_ and all non trivial changes
must be accompanied by a news entry.
To add an entry to the news file, first you need to have created an issue
describing the change you want to make. A Pull Request itself *may* function as
such, but it is preferred to have a dedicated issue (for example, in case the
PR ends up rejected due to code quality reasons).
Once you have an issue or pull request, you take the number and you create a
file inside of the ``news/`` directory named after that issue number with an
extension of ``removal``, ``feature``, ``bugfix``, or ``doc``. Thus if your
issue or PR number is ``1234`` and this change is fixing a bug, then you would
create a file ``news/1234.bugfix``. PRs can span multiple categories by creating
multiple files (for instance, if you added a feature and deprecated/removed the
old feature at the same time, you would create ``news/NNNN.feature`` and
``news/NNNN.removal``). Likewise if a PR touches multiple issues/PRs you may
create a file for each of them with the exact same contents and Towncrier will
deduplicate them.
The contents of this file are reStructuredText formatted text that will be used
as the content of the news file entry. You do not need to reference the issue
or PR numbers here as towncrier will automatically add a reference to all of
the affected issues when rendering the news file.
A trivial change is anything that does not warrant an entry in the news file.
Some examples are: Code refactors that don't change anything as far as the
public is concerned, typo fixes, white space modification, etc. To mark a PR
as trivial a contributor simply needs to add a randomly named, empty file to the
``news/`` directory with the extension of ``.trivial``. If you are on a POSIX
like operating system, one can be added by running
``touch news/$(uuidgen).trivial``. Core committers may also add a "trivial"
label to the PR which will accomplish the same thing.
Release Process
...
...
news/_template.rst
浏览文件 @
c36cca51
...
...
@@ -6,7 +6,7 @@
{% endif %}
{% if sections[section] %}
{% for category, val in definitions.items() if category in sections[section]%}
{% for category, val in definitions.items() if category in sections[section]
and category != 'trivial'
%}
{{ definitions[category]['name'] }}
{{ underline * definitions[category]['name']|length }}
...
...
pyproject.toml
浏览文件 @
c36cca51
...
...
@@ -27,3 +27,8 @@ template = "news/_template.rst"
directory
=
"doc"
name
=
"Improved Documentation"
showcontent
=
true
[[tool.towncrier.type]]
directory
=
"trivial"
name
=
"Trivial Changes"
showcontent
=
false
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录