diff --git a/newsfragments/README.md b/newsfragments/README.md deleted file mode 100644 index a532cc9..0000000 --- a/newsfragments/README.md +++ /dev/null @@ -1,27 +0,0 @@ -This directory collects "newsfragments": short files that each contain -a snippet of ReST-formatted text that will be added to the next -release notes. This should be a description of aspects of the change -(if any) that are relevant to users. (This contrasts with the -commit message and PR description, which are a description of the change as -relevant to people working on the code itself.) - -Each file should be named like `..rst`, where -`` is an issue number, and `` is one of: - -- `breaking` -- `bugfix` -- `deprecation` -- `docs` -- `feature` -- `internal` -- `misc` -- `performance` -- `removal` - -So for example: `123.feature.rst`, `456.bugfix.rst` - -If the PR fixes an issue, use that number here. If there is no issue, -then open up the PR first and use the PR number for the newsfragment. - -Release notes are now handled in GitHub Releases. Use these fragments only if a -maintainer asks for one while a longer release-notes migration is in progress. diff --git a/newsfragments/validate_files.py b/newsfragments/validate_files.py deleted file mode 100755 index 02b0e3e..0000000 --- a/newsfragments/validate_files.py +++ /dev/null @@ -1,45 +0,0 @@ -#!/usr/bin/env python3 - -# Towncrier silently ignores files that do not match the expected ending. -# We use this script to ensure we catch these as errors in CI. - -import pathlib -import sys - -ALLOWED_EXTENSIONS = { - ".breaking.rst", - ".bugfix.rst", - ".deprecation.rst", - ".docs.rst", - ".feature.rst", - ".internal.rst", - ".misc.rst", - ".performance.rst", - ".removal.rst", -} - -ALLOWED_FILES = { - "validate_files.py", - "README.md", -} - -THIS_DIR = pathlib.Path(__file__).parent - -num_args = len(sys.argv) - 1 -assert num_args in {0, 1} -if num_args == 1: - assert sys.argv[1] in ("is-empty",) - -for fragment_file in THIS_DIR.iterdir(): - if fragment_file.name in ALLOWED_FILES: - continue - elif num_args == 0: - full_extension = "".join(fragment_file.suffixes) - if full_extension not in ALLOWED_EXTENSIONS: - raise Exception(f"Unexpected file: {fragment_file}") - elif sys.argv[1] == "is-empty": - raise Exception(f"Unexpected file: {fragment_file}") - else: - raise RuntimeError( - f"Strange: arguments {sys.argv} were validated, but not found" - )