diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..1b3e5b6 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,17 @@ +Thanks for submitting a PR, your contribution is really appreciated! + +Here's a quick checklist that should be present in PRs: + +- [ ] Make sure to include reasonable tests for your change if necessary + +- [ ] Add a new news fragment into the changelog folder, following these guidelines: + * Name it `$issue_id.$type` for example `588.bug` + * If you don't have an issue_id change it to the PR id after creating it + * Ensure type is one of `removal`, `feature`, `bugfix`, `vendor`, `doc` or `trivial` + * Make sure to use full sentences with correct case and punctuation, for example: + + ``` + Fix issue with non-ascii contents in doctest text files. + ``` + + diff --git a/CHANGELOG b/CHANGELOG.rst similarity index 94% rename from CHANGELOG rename to CHANGELOG.rst index 65afd1b..81a5a35 100644 --- a/CHANGELOG +++ b/CHANGELOG.rst @@ -1,3 +1,14 @@ +.. + You should *NOT* be adding new change log entries to this file, this + file is managed by towncrier. You *may* edit previous change logs to + fix problems like typo corrections or such. + To add a new change log entry, please see + https://pip.pypa.io/en/latest/development/#adding-a-news-entry + We named the news folder ``changelog`` + +.. towncrier release notes start + + 1.17.0 ------ diff --git a/changelog/154.doc b/changelog/154.doc new file mode 100644 index 0000000..abc92f1 --- /dev/null +++ b/changelog/154.doc @@ -0,0 +1 @@ +Introduced ``towncrier`` for ``CHANGELOG`` management. diff --git a/changelog/_template.rst b/changelog/_template.rst new file mode 100644 index 0000000..66fd6ae --- /dev/null +++ b/changelog/_template.rst @@ -0,0 +1,39 @@ +{% for section in sections %} +{% set underline = "-" %} +{% if section %} +{{section}} +{{ underline * section|length }}{% set underline = "~" %} + +{% endif %} +{% if sections[section] %} +{% for category, val in definitions.items() if category in sections[section] and category != 'trivial' %} + +{{ definitions[category]['name'] }} +{{ underline * definitions[category]['name']|length }} + +{% if definitions[category]['showcontent'] %} +{% for text, values in sections[section][category]|dictsort(by='value') %} +- {{ text }}{% if category != 'vendor' %} ({{ values|sort|join(', ') }}){% endif %} + + +{% endfor %} +{% else %} +- {{ sections[section][category]['']|sort|join(', ') }} + + +{% endif %} +{% if sections[section][category]|length == 0 %} + +No significant changes. + + +{% else %} +{% endif %} +{% endfor %} +{% else %} + +No significant changes. + + +{% endif %} +{% endfor %} diff --git a/dev-requirements.txt b/dev-requirements.txt new file mode 100644 index 0000000..0d2d2d7 --- /dev/null +++ b/dev-requirements.txt @@ -0,0 +1 @@ +towncrier diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..ac82bda --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,36 @@ +[tool.towncrier] +package = "xdist" +filename = "CHANGELOG.rst" +directory = "changelog/" +title_format = "pytest-xdist {version} ({project_date})" +template = "changelog/_template.rst" + + [[tool.towncrier.type]] + directory = "removal" + name = "Deprecations and Removals" + showcontent = true + + [[tool.towncrier.type]] + directory = "feature" + name = "Features" + showcontent = true + + [[tool.towncrier.type]] + directory = "bugfix" + name = "Bug Fixes" + showcontent = true + + [[tool.towncrier.type]] + directory = "vendor" + name = "Vendored Libraries" + showcontent = true + + [[tool.towncrier.type]] + directory = "doc" + name = "Improved Documentation" + showcontent = true + + [[tool.towncrier.type]] + directory = "trivial" + name = "Trivial Changes" + showcontent = false