Merge pull request #2607 from davidhewitt/towncrier
use towncrier to generate CHANGELOG
This commit is contained in:
commit
7b3ad2b718
|
@ -1,7 +1,7 @@
|
|||
Thank you for contributing to pyo3!
|
||||
|
||||
Please consider adding the following to your pull request:
|
||||
- an entry in CHANGELOG.md
|
||||
- an entry for this PR in newsfragments - see [https://pyo3.rs/main/contributing.html#documenting-changes]
|
||||
- docs to all new functions and / or detail in the guide
|
||||
- tests for all new or changed functions
|
||||
|
||||
|
|
|
@ -23,6 +23,10 @@ else
|
|||
echo "<meta http-equiv=refresh content=0;url=v${PYO3_VERSION}/>" > netlify_build/index.html
|
||||
fi
|
||||
|
||||
## Generate towncrier release notes
|
||||
|
||||
pip install towncrier
|
||||
towncrier build --yes --version Unreleased --date TBC
|
||||
|
||||
## Build guide
|
||||
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
{% for section_text, section in sections.items() %}{%- if section %}{{section_text}}{% endif -%}
|
||||
{% if section %}
|
||||
{% for category in ['packaging', 'added', 'changed', 'removed', 'fixed' ] if category in section %}
|
||||
### {{ definitions[category]['name'] }}
|
||||
|
||||
{% if definitions[category]['showcontent'] %}
|
||||
{% for text, pull_requests in section[category].items() %}
|
||||
- {{ text }} {{ pull_requests|join(', ') }}
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
- {{ section[category]['']|join(', ') }}
|
||||
{% endif %}
|
||||
|
||||
{% endfor %}{% else %}No significant changes.{% endif %}{% endfor %}
|
10
CHANGELOG.md
10
CHANGELOG.md
|
@ -6,15 +6,7 @@ PyO3 versions, please see the [migration guide](https://pyo3.rs/latest/migration
|
|||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
### Added
|
||||
|
||||
- Added `type_input()` and `type_output()` to get the Python type of any Python-compatible object. [#2490](https://github.com/PyO3/pyo3/pull/2490)
|
||||
|
||||
### Removed
|
||||
|
||||
- Remove the deprecated `pyproto` feature, `#[pyproto]` macro, and all accompanying APIs. [#2587](https://github.com/PyO3/pyo3/pull/2587)
|
||||
<!-- towncrier release notes start -->
|
||||
|
||||
## [0.17.1] - 2022-08-28
|
||||
|
||||
|
|
|
@ -98,6 +98,17 @@ You can run these tests yourself with
|
|||
```cargo xtask ci```
|
||||
See [its documentation](https://github.com/PyO3/pyo3/tree/main/xtask#readme) for more commands you can run.
|
||||
|
||||
### Documenting changes
|
||||
|
||||
We use [towncrier](https://towncrier.readthedocs.io/en/stable/index.html) to generate a CHANGELOG for each release.
|
||||
|
||||
To include your changes in the release notes, you should create one (or more) news items in the `newsfragments` directory. Valid news items should be saved as `<PR>.<CATEGORY>.md` where `<PR>` is the pull request number and `<CATEGORY>` is one of the following:
|
||||
- `packaging` - for dependency changes and Python / Rust version compatibility changes
|
||||
- `added` - for new features
|
||||
- `changed` - for features which already existed but have been altered or deprecated
|
||||
- `removed` - for features which have been removed
|
||||
- `fixed` - for "changed" features which were classed as a bugfix
|
||||
|
||||
## Python and Rust version support policy
|
||||
|
||||
PyO3 aims to keep sufficient compatibility to make packaging Python extensions built with PyO3 feasible on most common package managers.
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
Added `type_input()` and `type_output()` to get the Python type of any Python-compatible object.
|
|
@ -0,0 +1 @@
|
|||
Remove the deprecated `pyproto` feature, `#[pyproto]` macro, and all accompanying APIs.
|
|
@ -17,3 +17,27 @@ exclude = '''
|
|||
)/
|
||||
)
|
||||
'''
|
||||
|
||||
[tool.towncrier]
|
||||
filename = "CHANGELOG.md"
|
||||
version = "0.17.1"
|
||||
start_string = "<!-- towncrier release notes start -->\n"
|
||||
template = ".towncrier.template.md"
|
||||
title_format = "## [{version}] - {project_date}"
|
||||
issue_format = "[#{issue}](https://github.com/PyO3/pyo3/pull/{issue})" # Note PyO3 shows pulls, not issues, in the CHANGELOG
|
||||
underlines = ["", "", ""]
|
||||
|
||||
[tool.towncrier.fragment.packaging]
|
||||
name = "Packaging"
|
||||
|
||||
[tool.towncrier.fragment.added]
|
||||
name = "Added"
|
||||
|
||||
[tool.towncrier.fragment.changed]
|
||||
name = "Changed"
|
||||
|
||||
[tool.towncrier.fragment.removed]
|
||||
name = "Removed"
|
||||
|
||||
[tool.towncrier.fragment.fixed]
|
||||
name = "Fixed"
|
||||
|
|
Loading…
Reference in New Issue