From 3fb0969fc7043c3a421652188b5c3fefc924b490 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Wed, 15 May 2024 21:32:36 +0200 Subject: [PATCH 1/6] Add REUSE badge. (#163) --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 5f31a9c..b13939e 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,7 @@ SPDX-License-Identifier: GPL-3.0-or-later [![Discuss on Matrix at #antsibull:ansible.com](https://img.shields.io/matrix/antsibull:ansible.com.svg?server_fqdn=ansible-accounts.ems.host&label=Discuss%20on%20Matrix%20at%20%23antsibull:ansible.com&logo=matrix)](https://matrix.to/#/#antsibull:ansible.com) [![Nox badge](https://github.com/ansible-community/antsibull-changelog/workflows/nox/badge.svg?event=push&branch=main)](https://github.com/ansible-community/antsibull-changelog/actions?query=workflow%3A%22nox%22+branch%3Amain) [![Codecov badge](https://img.shields.io/codecov/c/github/ansible-community/antsibull-changelog)](https://codecov.io/gh/ansible-community/antsibull-changelog) +[![REUSE status](https://api.reuse.software/badge/github.com/ansible-community/antsibull-changelog)](https://api.reuse.software/info/github.com/ansible-community/antsibull-changelog) A changelog generator used by ansible-core and Ansible collections. From a4f1b7c1540cdc6b46bfd07a39a29f298a2c13a6 Mon Sep 17 00:00:00 2001 From: Sandra McCann Date: Sat, 18 May 2024 10:39:15 -0400 Subject: [PATCH 2/6] Add period to end of new plugin statements in changelog (#162) * add period to short description changelog entry * partial fix - basic test * fix case where there is already a period * update basic tests to add period * update two more test files * updated one more test * updated final CI test. All nox passing now * Update src/antsibull_changelog/plugins.py streamline the code (based on feedback) Co-authored-by: Felix Fontein * based on feedback - extend the tests of when to add a period * include add_plugin_period as config option * add structure for config param * remove my mistaken debug effort * implement feedback. Passes local nox tests * Add changelog fragment and documentation * Apply suggestions from code review Co-authored-by: Felix Fontein * fix CI errors for test --------- Co-authored-by: Felix Fontein --- changelogs/config.yaml | 1 + .../fragments/162-add-plugin-period.yaml | 2 + docs/changelog-configuration.md | 8 ++ src/antsibull_changelog/cli.py | 3 + src/antsibull_changelog/config.py | 5 + src/antsibull_changelog/plugins.py | 27 +++++- .../test_changelog_basic_ansible.py | 36 +++---- .../test_changelog_basic_ansible_classic.py | 23 ++--- .../test_changelog_basic_collection.py | 96 +++++++++---------- 9 files changed, 120 insertions(+), 81 deletions(-) create mode 100644 changelogs/fragments/162-add-plugin-period.yaml diff --git a/changelogs/config.yaml b/changelogs/config.yaml index eebf2d4..391d6d2 100644 --- a/changelogs/config.yaml +++ b/changelogs/config.yaml @@ -36,3 +36,4 @@ title: Ansible Changelog Tool output_formats: - rst - md +add_plugin_period: false diff --git a/changelogs/fragments/162-add-plugin-period.yaml b/changelogs/fragments/162-add-plugin-period.yaml new file mode 100644 index 0000000..7453397 --- /dev/null +++ b/changelogs/fragments/162-add-plugin-period.yaml @@ -0,0 +1,2 @@ +minor_changes: + - "Adds period where needed at end of new plugin short descriptions. Controlled by the ``add_plugin_period`` option in the config file (https://github.com/ansible-community/antsibull-changelog/issues/87)." \ No newline at end of file diff --git a/docs/changelog-configuration.md b/docs/changelog-configuration.md index ab4cb39..5e0b632 100644 --- a/docs/changelog-configuration.md +++ b/docs/changelog-configuration.md @@ -11,6 +11,14 @@ This document describes all settings that are supported in ## General options +### `add_plugin_period` (boolean) + +The default value is `false` for existing configurations, and `true` for +new configurations. + +If set to `false`, the plugin short description is used. If set to `true`, a period is added to the end of the plugin short description if no other end punctuation is present. Setting to `true` complies with the [Ansible changelog format](https://docs.ansible.com/ansible/latest/community/development_process.html#changelogs-how-to-format). + + ### `always_refresh` (string) Allowed values are `none`, `full`, or a comma-separated combination of diff --git a/src/antsibull_changelog/cli.py b/src/antsibull_changelog/cli.py index 64e8cf3..a3ab6c3 100644 --- a/src/antsibull_changelog/cli.py +++ b/src/antsibull_changelog/cli.py @@ -471,6 +471,7 @@ def _do_refresh( # pylint: disable=too-many-arguments version=changes.latest_version, force_reload=args.reload_plugins, use_ansible_doc=args.use_ansible_doc, + add_plugin_period=config.add_plugin_period, ) allow_removals = refresh_plugins == "allow-removal" @@ -665,6 +666,7 @@ def command_release(args: Any) -> int: version=version, force_reload=args.reload_plugins, use_ansible_doc=args.use_ansible_doc, + add_plugin_period=config.add_plugin_period, ) fragments = load_fragments(paths, config) lint_rc = lint_fragments(config, fragments, []) @@ -749,6 +751,7 @@ def command_generate(args: Any) -> int: # pylint: disable=too-many-locals collection_details=collection_details, version=changes.latest_version, force_reload=args.reload_plugins, + add_plugin_period=config.add_plugin_period, ) if output and len(config.output_formats) > 1 and not output_format: print( diff --git a/src/antsibull_changelog/config.py b/src/antsibull_changelog/config.py index a42cd18..81908c6 100644 --- a/src/antsibull_changelog/config.py +++ b/src/antsibull_changelog/config.py @@ -378,6 +378,7 @@ class ChangelogConfig: is_other_project: bool sections: Mapping[str, str] output_formats: set[TextFormat] + add_plugin_period: bool def __init__( self, @@ -465,6 +466,8 @@ def __init__( f"Found unknown extension in output_formats: {exc}" ) from exc + self.add_plugin_period = self.config.get("add_plugin_period", False) + self._validate_config(ignore_is_other_project) def _validate_config(self, ignore_is_other_project: bool) -> None: @@ -514,6 +517,7 @@ def store(self) -> None: # noqa: C901 "trivial_section_name": self.trivial_section_name, "ignore_other_fragment_extensions": self.ignore_other_fragment_extensions, "sanitize_changelog": self.sanitize_changelog, + "add_plugin_period": self.add_plugin_period, } if not self.is_collection: if self.use_semantic_versioning: @@ -592,6 +596,7 @@ def default( "use_fqcn": True, "ignore_other_fragment_extensions": True, "sanitize_changelog": True, + "add_plugin_period": True, } if title is not None: config["title"] = title diff --git a/src/antsibull_changelog/plugins.py b/src/antsibull_changelog/plugins.py index 2b261a8..2746d08 100644 --- a/src/antsibull_changelog/plugins.py +++ b/src/antsibull_changelog/plugins.py @@ -67,7 +67,9 @@ def __init__( @staticmethod def from_dict( - data: dict[str, dict[str, dict[str, Any]]], category: str = "plugin" + data: dict[str, dict[str, dict[str, Any]]], + category: str = "plugin", + add_plugin_period: bool = False, ) -> list[PluginDescription]: """ Return a list of ``PluginDescription`` objects from the given data. @@ -79,12 +81,19 @@ def from_dict( for plugin_type, plugin_data in data.items(): for plugin_name, plugin_details in plugin_data.items(): + description = plugin_details["description"] + if ( + add_plugin_period + and description + and not description.endswith((".", ",", "!", "?")) + ): + description += "." plugins.append( PluginDescription( plugin_type=plugin_type, name=plugin_name, namespace=plugin_details.get("namespace"), - description=plugin_details["description"], + description=description, version_added=plugin_details["version_added"], category=category, ) @@ -543,12 +552,13 @@ def _refresh_plugin_cache( return plugins_data -def load_plugins( +def load_plugins( # pylint: disable=too-many-arguments paths: PathsConfig, collection_details: CollectionDetails, version: str, force_reload: bool = False, use_ansible_doc: bool = False, + add_plugin_period: bool = False, ) -> list[PluginDescription]: """ Load plugins from ansible-doc. @@ -582,10 +592,17 @@ def load_plugins( ) store_yaml(plugin_cache_path, plugins_data) - plugins = PluginDescription.from_dict(plugins_data["plugins"]) + plugins = PluginDescription.from_dict( + plugins_data["plugins"], + add_plugin_period=add_plugin_period, + ) if "objects" in plugins_data: plugins.extend( - PluginDescription.from_dict(plugins_data["objects"], category="object") + PluginDescription.from_dict( + plugins_data["objects"], + category="object", + add_plugin_period=add_plugin_period, + ) ) return plugins diff --git a/tests/functional/test_changelog_basic_ansible.py b/tests/functional/test_changelog_basic_ansible.py index a8bd84e..c22253e 100644 --- a/tests/functional/test_changelog_basic_ansible.py +++ b/tests/functional/test_changelog_basic_ansible.py @@ -170,6 +170,7 @@ def test_changelog_release_ansible_simple( # pylint: disable=redefined-outer-na notesdir: fragments prelude_section_name: release_summary new_plugins_after_name: removed_features +add_plugin_period: true sections: - ['major_changes', 'Major Changes'] - ['minor_changes', 'Minor Changes'] @@ -264,7 +265,7 @@ def test_changelog_release_ansible_simple( # pylint: disable=redefined-outer-na assert changelog["releases"]["2.10"]["modules"] == [ { "name": "test", - "description": "This is a test module", + "description": "This is a test module.", "namespace": "", }, ] @@ -272,7 +273,7 @@ def test_changelog_release_ansible_simple( # pylint: disable=redefined-outer-na "lookup": [ { "name": "bar", - "description": "A foo bar lookup", + "description": "A foo bar lookup.", "namespace": None, }, ], @@ -308,12 +309,12 @@ def test_changelog_release_ansible_simple( # pylint: disable=redefined-outer-na Lookup ~~~~~~ -- bar - A foo bar lookup +- bar - A foo bar lookup. New Modules ----------- -- test - This is a test module +- test - This is a test module. """ ) @@ -399,7 +400,7 @@ def test_changelog_release_ansible_simple( # pylint: disable=redefined-outer-na assert changelog["releases"]["2.10"]["modules"] == [ { "name": "test", - "description": "This is a TEST module", + "description": "This is a TEST module.", "namespace": "", }, ] @@ -407,7 +408,7 @@ def test_changelog_release_ansible_simple( # pylint: disable=redefined-outer-na "lookup": [ { "name": "bar", - "description": "A foo_bar lookup", + "description": "A foo_bar lookup.", "namespace": None, }, ], @@ -441,12 +442,12 @@ def test_changelog_release_ansible_simple( # pylint: disable=redefined-outer-na Lookup ~~~~~~ -- bar - A foo_bar lookup +- bar - A foo_bar lookup. New Modules ----------- -- test - This is a TEST module +- test - This is a TEST module. """ ) @@ -539,7 +540,7 @@ def test_changelog_release_ansible_simple( # pylint: disable=redefined-outer-na assert changelog["releases"]["2.10.1b1"]["modules"] == [ { "name": "test_new", - "description": "This is ANOTHER test module", + "description": "This is ANOTHER test module.", "namespace": "", }, ] @@ -569,7 +570,7 @@ def test_changelog_release_ansible_simple( # pylint: disable=redefined-outer-na New Modules ----------- -- test_new - This is ANOTHER test module +- test_new - This is ANOTHER test module. v2.10 ===== @@ -592,12 +593,12 @@ def test_changelog_release_ansible_simple( # pylint: disable=redefined-outer-na Lookup ~~~~~~ -- bar - A foo_bar lookup +- bar - A foo_bar lookup. New Modules ----------- -- test - This is a TEST module +- test - This is a TEST module. """ ) @@ -706,7 +707,7 @@ def test_changelog_release_ansible_simple( # pylint: disable=redefined-outer-na assert changelog["releases"]["2.10.1"]["modules"] == [ { "name": "test_new2", - "description": "This is ANOTHER test module!!!11", + "description": "This is ANOTHER test module!!!11.", "namespace": "", }, { @@ -747,8 +748,8 @@ def test_changelog_release_ansible_simple( # pylint: disable=redefined-outer-na New Modules ----------- -- test_new - This is ANOTHER test module -- test_new2 - This is ANOTHER test module!!!11 +- test_new - This is ANOTHER test module. +- test_new2 - This is ANOTHER test module!!!11. - test_new3 - This is yet another test module. v2.10 @@ -772,12 +773,12 @@ def test_changelog_release_ansible_simple( # pylint: disable=redefined-outer-na Lookup ~~~~~~ -- bar - A foo_bar lookup +- bar - A foo_bar lookup. New Modules ----------- -- test - This is a TEST module +- test - This is a TEST module. """ ) @@ -899,6 +900,7 @@ def test_changelog_release_ansible_plugin_cache( # pylint: disable=redefined-ou notesdir: fragments prelude_section_name: release_summary new_plugins_after_name: removed_features +add_plugin_period: false sections: - ['major_changes', 'Major Changes'] - ['minor_changes', 'Minor Changes'] diff --git a/tests/functional/test_changelog_basic_ansible_classic.py b/tests/functional/test_changelog_basic_ansible_classic.py index 7fe0920..cd7cd58 100644 --- a/tests/functional/test_changelog_basic_ansible_classic.py +++ b/tests/functional/test_changelog_basic_ansible_classic.py @@ -172,6 +172,7 @@ def test_changelog_release_ansible_simple( # pylint: disable=redefined-outer-na notesdir: fragments prelude_section_name: release_summary new_plugins_after_name: removed_features +add_plugin_period: true sections: - ['major_changes', 'Major Changes'] - ['minor_changes', 'Minor Changes'] @@ -291,12 +292,12 @@ def test_changelog_release_ansible_simple( # pylint: disable=redefined-outer-na Lookup ~~~~~~ -- bar - A foo bar lookup +- bar - A foo bar lookup. New Modules ----------- -- test - This is a test module +- test - This is a test module. """ ) @@ -405,12 +406,12 @@ def test_changelog_release_ansible_simple( # pylint: disable=redefined-outer-na Lookup ~~~~~~ -- bar - A foo_bar lookup +- bar - A foo_bar lookup. New Modules ----------- -- test - This is a TEST module +- test - This is a TEST module. """ ) @@ -521,7 +522,7 @@ def test_changelog_release_ansible_simple( # pylint: disable=redefined-outer-na New Modules ----------- -- test_new - This is ANOTHER test module +- test_new - This is ANOTHER test module. v2.9 ==== @@ -544,12 +545,12 @@ def test_changelog_release_ansible_simple( # pylint: disable=redefined-outer-na Lookup ~~~~~~ -- bar - A foo_bar lookup +- bar - A foo_bar lookup. New Modules ----------- -- test - This is a TEST module +- test - This is a TEST module. """ ) @@ -683,8 +684,8 @@ def test_changelog_release_ansible_simple( # pylint: disable=redefined-outer-na New Modules ----------- -- test_new - This is ANOTHER test module -- test_new2 - This is ANOTHER test module!!!11 +- test_new - This is ANOTHER test module. +- test_new2 - This is ANOTHER test module!!!11. - test_new3 - This is yet another test module. v2.9 @@ -708,12 +709,12 @@ def test_changelog_release_ansible_simple( # pylint: disable=redefined-outer-na Lookup ~~~~~~ -- bar - A foo_bar lookup +- bar - A foo_bar lookup. New Modules ----------- -- test - This is a TEST module +- test - This is a TEST module. """ ) diff --git a/tests/functional/test_changelog_basic_collection.py b/tests/functional/test_changelog_basic_collection.py index f0f9592..6897593 100644 --- a/tests/functional/test_changelog_basic_collection.py +++ b/tests/functional/test_changelog_basic_collection.py @@ -429,7 +429,7 @@ def test_changelog_release_simple( # pylint: disable=redefined-outer-name assert changelog["releases"]["1.0.0"]["modules"] == [ { "name": "test", - "description": "This is a test module", + "description": "This is a test module.", "namespace": "", }, ] @@ -437,7 +437,7 @@ def test_changelog_release_simple( # pylint: disable=redefined-outer-name "lookup": [ { "name": "bar", - "description": "A foo bar lookup", + "description": "A foo bar lookup.", "namespace": None, }, ], @@ -471,12 +471,12 @@ def test_changelog_release_simple( # pylint: disable=redefined-outer-name Lookup ~~~~~~ -- acme.test.bar - A foo bar lookup +- acme.test.bar - A foo bar lookup. New Modules ----------- -- acme.test.test - This is a test module +- acme.test.test - This is a test module. """ ) @@ -548,7 +548,7 @@ def test_changelog_release_simple( # pylint: disable=redefined-outer-name assert changelog["releases"]["1.0.0"]["modules"] == [ { "name": "test", - "description": "This is a TEST module", + "description": "This is a TEST module.", "namespace": "", }, ] @@ -556,7 +556,7 @@ def test_changelog_release_simple( # pylint: disable=redefined-outer-name "lookup": [ { "name": "bar", - "description": "A foo_bar lookup", + "description": "A foo_bar lookup.", "namespace": None, }, ], @@ -589,12 +589,12 @@ def test_changelog_release_simple( # pylint: disable=redefined-outer-name Lookup ~~~~~~ -- acme.test.bar - A foo_bar lookup +- acme.test.bar - A foo_bar lookup. New Modules ----------- -- acme.test.test - This is a TEST module +- acme.test.test - This is a TEST module. """ ) @@ -685,7 +685,7 @@ def test_changelog_release_simple( # pylint: disable=redefined-outer-name assert changelog["releases"]["1.1.0-beta-1"]["modules"] == [ { "name": "test_new", - "description": "This is ANOTHER test module", + "description": "This is ANOTHER test module.", "namespace": "", }, ] @@ -716,7 +716,7 @@ def test_changelog_release_simple( # pylint: disable=redefined-outer-name New Modules ----------- -- acme.test.test_new - This is ANOTHER test module +- acme.test.test_new - This is ANOTHER test module. v1.0.0 ====== @@ -738,12 +738,12 @@ def test_changelog_release_simple( # pylint: disable=redefined-outer-name Lookup ~~~~~~ -- acme.test.bar - A foo_bar lookup +- acme.test.bar - A foo_bar lookup. New Modules ----------- -- acme.test.test - This is a TEST module +- acme.test.test - This is a TEST module. """ ) @@ -862,7 +862,7 @@ def test_changelog_release_simple( # pylint: disable=redefined-outer-name assert changelog["releases"]["1.1.0"]["modules"] == [ { "name": "test_new2", - "description": "This is ANOTHER test module!!!11", + "description": "This is ANOTHER test module!!!11.", "namespace": "", }, { @@ -904,8 +904,8 @@ def test_changelog_release_simple( # pylint: disable=redefined-outer-name New Modules ----------- -- acme.test.test_new - This is ANOTHER test module -- acme.test.test_new2 - This is ANOTHER test module!!!11 +- acme.test.test_new - This is ANOTHER test module. +- acme.test.test_new2 - This is ANOTHER test module!!!11. - acme.test.test_new3 - This is yet another test module. v1.0.0 @@ -928,12 +928,12 @@ def test_changelog_release_simple( # pylint: disable=redefined-outer-name Lookup ~~~~~~ -- acme.test.bar - A foo_bar lookup +- acme.test.bar - A foo_bar lookup. New Modules ----------- -- acme.test.test - This is a TEST module +- acme.test.test - This is a TEST module. """ ) @@ -1225,8 +1225,8 @@ def test_changelog_release_simple( # pylint: disable=redefined-outer-name New Modules ----------- -- acme.test.test_new - This is ANOTHER test module -- acme.test.test_new2 - This is ANOTHER test module!!!11 +- acme.test.test_new - This is ANOTHER test module. +- acme.test.test_new2 - This is ANOTHER test module!!!11. - acme.test.test_new3 - This is yet another test module. v1.0.0 @@ -1249,12 +1249,12 @@ def test_changelog_release_simple( # pylint: disable=redefined-outer-name Lookup ~~~~~~ -- acme.test.bar - A foo_bar lookup +- acme.test.bar - A foo_bar lookup. New Modules ----------- -- acme.test.test - This is a TEST module +- acme.test.test - This is a TEST module. """ ) @@ -1347,8 +1347,8 @@ def test_changelog_release_simple( # pylint: disable=redefined-outer-name New Modules ----------- -- acme.test.test_new - This is ANOTHER test module -- acme.test.test_new2 - This is ANOTHER test module!!!11 +- acme.test.test_new - This is ANOTHER test module. +- acme.test.test_new2 - This is ANOTHER test module!!!11. - acme.test.test_new3 - This is yet another test module. v1.0.0 @@ -1371,12 +1371,12 @@ def test_changelog_release_simple( # pylint: disable=redefined-outer-name Lookup ~~~~~~ -- acme.test.bar - A foo_bar lookup +- acme.test.bar - A foo_bar lookup. New Modules ----------- -- acme.test.test - This is a TEST module +- acme.test.test - This is a TEST module. """ ) @@ -1422,8 +1422,8 @@ def test_changelog_release_simple( # pylint: disable=redefined-outer-name New Modules ----------- -- acme.test.test_new - This is ANOTHER test module -- acme.test.test_new2 - This is ANOTHER test module!!!11 +- acme.test.test_new - This is ANOTHER test module. +- acme.test.test_new2 - This is ANOTHER test module!!!11. - acme.test.test_new3 - This is yet another test module. """ ) @@ -1470,12 +1470,12 @@ def test_changelog_release_simple( # pylint: disable=redefined-outer-name ### Lookup -* acme\.test\.bar \- A foo\_bar lookup +* acme\.test\.bar \- A foo\_bar lookup\. ## New Modules -* acme\.test\.test \- This is a TEST module +* acme\.test\.test \- This is a TEST module\. """ ) @@ -1714,37 +1714,37 @@ def test_changelog_release_simple_no_galaxy( # pylint: disable=redefined-outer- assert changelog["releases"]["1.0.0"]["modules"] == [ { "name": "test", - "description": "This is a test module", + "description": "This is a test module.", "namespace": "", }, { "name": "test1", - "description": "This is a test module", + "description": "This is a test module.", "namespace": "test", }, { "name": "test2", - "description": "This is a test module", + "description": "This is a test module.", "namespace": "test.foo", }, { "name": "test3", - "description": "This is a test module", + "description": "This is a test module.", "namespace": "test.bar", }, { "name": "test4", - "description": "This is a test module", + "description": "This is a test module.", "namespace": "foo", }, { "name": "test5", - "description": "This is a test module", + "description": "This is a test module.", "namespace": "bar.baz", }, { "name": "test6", - "description": "This is a test module", + "description": "This is a test module.", "namespace": "foo.bar.baz", }, ] @@ -1752,7 +1752,7 @@ def test_changelog_release_simple_no_galaxy( # pylint: disable=redefined-outer- "lookup": [ { "name": "bar", - "description": "A foo bar lookup", + "description": "A foo bar lookup.", "namespace": None, }, ], @@ -1786,12 +1786,12 @@ def test_changelog_release_simple_no_galaxy( # pylint: disable=redefined-outer- Lookup ~~~~~~ -- bar - A foo bar lookup +- bar - A foo bar lookup. New Modules ----------- -- test - This is a test module +- test - This is a test module. Bar ~~~ @@ -1799,32 +1799,32 @@ def test_changelog_release_simple_no_galaxy( # pylint: disable=redefined-outer- baz ^^^ -- test5 - This is a test module +- test5 - This is a test module. Foo ~~~ -- test4 - This is a test module +- test4 - This is a test module. bar.baz ^^^^^^^ -- test6 - This is a test module +- test6 - This is a test module. Test ~~~~ -- test1 - This is a test module +- test1 - This is a test module. bar ^^^ -- test3 - This is a test module +- test3 - This is a test module. foo ^^^ -- test2 - This is a test module +- test2 - This is a test module. """ ) @@ -2182,7 +2182,7 @@ def test_changelog_release_plugin_cache( # pylint: disable=redefined-outer-name assert changelog["releases"]["1.0.0"]["modules"][0]["namespace"] == "" assert ( changelog["releases"]["1.0.0"]["modules"][0]["description"] - == "A test module" + == "A test module." ) assert "version_added" not in changelog["releases"]["1.0.0"]["modules"][0] @@ -2204,12 +2204,12 @@ def test_changelog_release_plugin_cache( # pylint: disable=redefined-outer-name New Modules ----------- -- acme.test.test_module - A test module +- acme.test.test_module - A test module. New Roles --------- -- acme.test.test_role - Test role +- acme.test.test_role - Test role. """ ) From 77c9479d8f127f0f9852da25a8d07eefc1d3b900 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Mon, 20 May 2024 08:35:43 +0200 Subject: [PATCH 3/6] Prepare 0.27.0. --- changelogs/fragments/0.27.0.yml | 1 + src/antsibull_changelog/__init__.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/0.27.0.yml diff --git a/changelogs/fragments/0.27.0.yml b/changelogs/fragments/0.27.0.yml new file mode 100644 index 0000000..512efc9 --- /dev/null +++ b/changelogs/fragments/0.27.0.yml @@ -0,0 +1 @@ +release_summary: Feature release. diff --git a/src/antsibull_changelog/__init__.py b/src/antsibull_changelog/__init__.py index a8e0664..01b9fe4 100644 --- a/src/antsibull_changelog/__init__.py +++ b/src/antsibull_changelog/__init__.py @@ -8,6 +8,6 @@ Ansible Changelog Tool. """ -__version__ = "0.26.0.post0" +__version__ = "0.27.0" __all__ = ("__version__",) From ece6662897825c40b1c3af6561f3674a241cb6d1 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Mon, 20 May 2024 08:35:47 +0200 Subject: [PATCH 4/6] Release 0.27.0. --- CHANGELOG.md | 156 ++++++++++-------- CHANGELOG.rst | 13 ++ changelogs/changelog.yaml | 10 ++ changelogs/fragments/0.27.0.yml | 1 - .../fragments/162-add-plugin-period.yaml | 2 - 5 files changed, 109 insertions(+), 73 deletions(-) delete mode 100644 changelogs/fragments/0.27.0.yml delete mode 100644 changelogs/fragments/162-add-plugin-period.yaml diff --git a/CHANGELOG.md b/CHANGELOG.md index 2546223..33c317a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,93 +2,96 @@ **Topics** -- v0\.26\.0 +- v0\.27\.0 - Release Summary - Minor Changes -- v0\.25\.0 +- v0\.26\.0 - Release Summary - Minor Changes - - Bugfixes -- v0\.24\.0 +- v0\.25\.0 - Release Summary - Minor Changes - - Deprecated Features -- v0\.23\.0 + - Bugfixes +- v0\.24\.0 - Release Summary - Minor Changes -- v0\.22\.0 + - Deprecated Features +- v0\.23\.0 - Release Summary - Minor Changes -- v0\.21\.0 +- v0\.22\.0 - Release Summary + - Minor Changes +- v0\.21\.0 + - Release Summary - Deprecated Features - v0\.20\.0 - - Release Summary + - Release Summary - Major Changes - Bugfixes - v0\.19\.0 - - Release Summary - - Minor Changes -- v0\.18\.0 - Release Summary + - Minor Changes +- v0\.18\.0 + - Release Summary - Breaking Changes / Porting Guide - v0\.17\.0 - - Release Summary - - Minor Changes -- v0\.16\.0 - Release Summary - Minor Changes - - Bugfixes -- v0\.15\.0 +- v0\.16\.0 - Release Summary - Minor Changes -- v0\.14\.0 + - Bugfixes +- v0\.15\.0 - Release Summary - Minor Changes -- v0\.13\.0 +- v0\.14\.0 - Release Summary - Minor Changes - - Bugfixes -- v0\.12\.0 +- v0\.13\.0 - Release Summary - Minor Changes + - Bugfixes +- v0\.12\.0 + - Release Summary + - Minor Changes - Bugfixes - v0\.11\.0 - - Minor Changes + - Minor Changes - Bugfixes - v0\.10\.0 - - Minor Changes + - Minor Changes - Bugfixes - v0\.9\.0 - Major Changes - - Minor Changes + - Minor Changes - Breaking Changes / Porting Guide - v0\.8\.1 - Bugfixes - v0\.8\.0 - - Minor Changes -- v0\.7\.0 - Minor Changes -- v0\.6\.0 +- v0\.7\.0 - Minor Changes -- v0\.5\.0 +- v0\.6\.0 - Minor Changes -- v0\.4\.0 +- v0\.5\.0 - Minor Changes +- v0\.4\.0 + - Minor Changes - Bugfixes - v0\.3\.1 - Bugfixes - v0\.3\.0 - - Minor Changes + - Minor Changes - v0\.2\.1 - Bugfixes - v0\.2\.0 - - Minor Changes + - Minor Changes - v0\.1\.0 - - Release Summary + - Release Summary - -## v0\.26\.0 + +## v0\.27\.0 ### Release Summary @@ -98,17 +101,30 @@ Feature release\. ### Minor Changes +* Adds period where needed at end of new plugin short descriptions\. Controlled by the add\_plugin\_period option in the config file \([https\://github\.com/ansible\-community/antsibull\-changelog/issues/87](https\://github\.com/ansible\-community/antsibull\-changelog/issues/87)\)\. + + +## v0\.26\.0 + + +### Release Summary + +Feature release\. + + +### Minor Changes + * The Markdown output format is now compatible with [python\-markdown](https\://python\-markdown\.github\.io/) and [mkdocs](https\://www\.mkdocs\.org/)\, as long as the [pymdownx\.escapeall](https\://facelessuser\.github\.io/pymdown\-extensions/extensions/escapeall/) extension is enabled \([https\://github\.com/ansible\-community/antsibull\-changelog/pull/153](https\://github\.com/ansible\-community/antsibull\-changelog/pull/153)\)\. ## v0\.25\.0 - + ### Release Summary Bugfix and feature release\. - + ### Minor Changes * Add \-\-version flag to print package version and exit \([https\://github\.com/ansible\-community/antsibull\-changelog/pull/147](https\://github\.com/ansible\-community/antsibull\-changelog/pull/147)\)\. @@ -121,12 +137,12 @@ Bugfix and feature release\. ## v0\.24\.0 - + ### Release Summary Feature release which now allows to output MarkDown\. - + ### Minor Changes * Allow automatically retrieving package version for hatch projects with the hatch version command \([https\://github\.com/ansible\-community/antsibull\-changelog/pull/141](https\://github\.com/ansible\-community/antsibull\-changelog/pull/141)\)\. @@ -141,12 +157,12 @@ Feature release which now allows to output MarkDown\. ## v0\.23\.0 - + ### Release Summary Feature release\. - + ### Minor Changes * Allow to generate changelog for a specific version \([https\://github\.com/ansible\-community/antsibull\-changelog/pull/130](https\://github\.com/ansible\-community/antsibull\-changelog/pull/130)\)\. @@ -156,12 +172,12 @@ Feature release\. ## v0\.22\.0 - + ### Release Summary New feature release - + ### Minor Changes * Add antsibull\-changelog\-lint and antsibull\-changelog\-lint\-changelog\-yaml pre\-commit\.com hooks \([https\://github\.com/ansible\-community/antsibull\-changelog/pull/125](https\://github\.com/ansible\-community/antsibull\-changelog/pull/125)\)\. @@ -170,7 +186,7 @@ New feature release ## v0\.21\.0 - + ### Release Summary Maintenance release with a deprecation\. @@ -183,7 +199,7 @@ Maintenance release with a deprecation\. ## v0\.20\.0 - + ### Release Summary Bugfix and maintenance release using a new build system\. @@ -201,12 +217,12 @@ Bugfix and maintenance release using a new build system\. ## v0\.19\.0 - + ### Release Summary Feature release\. - + ### Minor Changes * Allow to extract other project versions for JavaScript / TypeScript projects from package\.json \([https\://github\.com/ansible\-community/antsibull\-changelog/pull/100](https\://github\.com/ansible\-community/antsibull\-changelog/pull/100)\)\. @@ -217,7 +233,7 @@ Feature release\. ## v0\.18\.0 - + ### Release Summary Maintenance release that drops support for older Python versions\. @@ -230,12 +246,12 @@ Maintenance release that drops support for older Python versions\. ## v0\.17\.0 - + ### Release Summary Feature release for ansible\-core\. - + ### Minor Changes * Only allow a trival section in the ansible\-core/ansible\-base changelog when explicitly configured \([https\://github\.com/ansible\-community/antsibull\-changelog/pull/90](https\://github\.com/ansible\-community/antsibull\-changelog/pull/90)\)\. @@ -243,12 +259,12 @@ Feature release for ansible\-core\. ## v0\.16\.0 - + ### Release Summary Feature and bugfix release\. - + ### Minor Changes * Allow to extract other project versions for Python poetry projects from pyproject\.toml \([https\://github\.com/ansible\-community/antsibull\-changelog/pull/80](https\://github\.com/ansible\-community/antsibull\-changelog/pull/80)\)\. @@ -262,12 +278,12 @@ Feature and bugfix release\. ## v0\.15\.0 - + ### Release Summary Feature release\. - + ### Minor Changes * Add changelogs/changelog\.yaml file format linting subcommand that was previously part of antsibull\-lint \([https\://github\.com/ansible\-community/antsibull\-changelog/pull/76](https\://github\.com/ansible\-community/antsibull\-changelog/pull/76)\, [https\://github\.com/ansible\-community/antsibull/issues/410](https\://github\.com/ansible\-community/antsibull/issues/410)\)\. @@ -275,12 +291,12 @@ Feature release\. ## v0\.14\.0 - + ### Release Summary Feature release that will speed up the release process with ansible\-core 2\.13\. - + ### Minor Changes * The internal changelog\.yaml linting API allows to use packaging\.version\.Version for version numbers instead of semantic versioning \([https\://github\.com/ansible\-community/antsibull\-changelog/pull/73](https\://github\.com/ansible\-community/antsibull\-changelog/pull/73)\)\. @@ -289,12 +305,12 @@ Feature release that will speed up the release process with ansible\-core 2\.13\ ## v0\.13\.0 - + ### Release Summary This release makes changelog building more reliable\. - + ### Minor Changes * Always lint fragments before releasing \([https\://github\.com/ansible\-community/antsibull\-changelog/issues/65](https\://github\.com/ansible\-community/antsibull\-changelog/issues/65)\, [https\://github\.com/ansible\-community/antsibull\-changelog/pull/67](https\://github\.com/ansible\-community/antsibull\-changelog/pull/67)\)\. @@ -308,12 +324,12 @@ This release makes changelog building more reliable\. ## v0\.12\.0 - + ### Release Summary New feature release which supports other projects than ansible\-core and Ansible collections\. - + ### Minor Changes * Support changelogs for other projects than ansible\-core/\-base and Ansible collections \([https\://github\.com/ansible\-community/antsibull\-changelog/pull/60](https\://github\.com/ansible\-community/antsibull\-changelog/pull/60)\)\. @@ -326,7 +342,7 @@ New feature release which supports other projects than ansible\-core and Ansible ## v0\.11\.0 - + ### Minor Changes * When using ansible\-core 2\.11 or newer\, will now detect new roles with argument spec\. We only consider the main entrypoint of roles\. @@ -339,7 +355,7 @@ New feature release which supports other projects than ansible\-core and Ansible ## v0\.10\.0 - + ### Minor Changes * The new \-\-cummulative\-release option for antsibull\-changelog release allows to add all plugins and objects to a release since whose version\_added is later than the previous release version \(or ancestor if there was no previous release\)\, and at latest the current release version\. This is needed for major releases of community\.general and similarly organized collections\. @@ -378,7 +394,7 @@ New feature release which supports other projects than ansible\-core and Ansible For every entry\, a list of plugins \(section add plugin\.xxx\) or objects \(section add object\.xxx\) of the given type \(filter\, test for plugins\, playbook\, role for objects\) will be added\. Every plugin or object has a short name as well as a short description\. These fields correspond to the module/plugin name and the short\_description field of the DOCUMENTATION block of modules and documentable plugins\. - + ### Minor Changes * Add \-\-update\-existing option for antsibull\-changelog release\, which allows to update the current release\'s release date and \(if relevant\) codename instead of simply reporting that the release already exists\. @@ -399,7 +415,7 @@ New feature release which supports other projects than ansible\-core and Ansible ## v0\.8\.0 - + ### Minor Changes * Allow to not save a changelog on release when using API\. @@ -408,7 +424,7 @@ New feature release which supports other projects than ansible\-core and Ansible ## v0\.7\.0 - + ### Minor Changes * A new config option\, ignore\_other\_fragment\_extensions allows for configuring whether only \.yaml and \.yml files are used \(as mandated by the ansible\-test sanity \-\-test changelog test\)\. The default value for existing configurations is false\, and for new configurations true\. @@ -418,7 +434,7 @@ New feature release which supports other projects than ansible\-core and Ansible ## v0\.6\.0 - + ### Minor Changes * New changelog configurations place the CHANGELOG\.rst file by default in the top\-level directory\, and not in changelogs/\. @@ -428,7 +444,7 @@ New feature release which supports other projects than ansible\-core and Ansible ## v0\.5\.0 - + ### Minor Changes * The internal changelog generator code got more flexible to help antsibull generate Ansible porting guides\. @@ -436,7 +452,7 @@ New feature release which supports other projects than ansible\-core and Ansible ## v0\.4\.0 - + ### Minor Changes * Allow to enable or disable flatmapping via config\.yaml\. @@ -459,7 +475,7 @@ New feature release which supports other projects than ansible\-core and Ansible ## v0\.3\.0 - + ### Minor Changes * Allow to pass path to ansible\-doc binary via \-\-ansible\-doc\-bin\. @@ -477,7 +493,7 @@ New feature release which supports other projects than ansible\-core and Ansible ## v0\.2\.0 - + ### Minor Changes * Added more testing\. @@ -491,7 +507,7 @@ New feature release which supports other projects than ansible\-core and Ansible ## v0\.1\.0 - + ### Release Summary Initial release as antsibull\-changelog\. The Ansible Changelog Tool has originally been developed by \@mattclay in [the ansible/ansible](https\://github\.com/ansible/ansible/blob/stable\-2\.9/packaging/release/changelogs/changelog\.py) repository for Ansible itself\. It has been extended in [felixfontein/ansible\-changelog](https\://github\.com/felixfontein/ansible\-changelog/) and [ansible\-community/antsibull](https\://github\.com/ansible\-community/antsibull/) to work with collections\, until it was moved to its current location [ansible\-community/antsibull\-changelog](https\://github\.com/ansible\-community/antsibull\-changelog/)\. diff --git a/CHANGELOG.rst b/CHANGELOG.rst index a65dde5..623be32 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -4,6 +4,19 @@ Ansible Changelog Tool Release Notes .. contents:: Topics +v0.27.0 +======= + +Release Summary +--------------- + +Feature release. + +Minor Changes +------------- + +- Adds period where needed at end of new plugin short descriptions. Controlled by the ``add_plugin_period`` option in the config file (https://github.com/ansible-community/antsibull-changelog/issues/87). + v0.26.0 ======= diff --git a/changelogs/changelog.yaml b/changelogs/changelog.yaml index 6cb53bb..c0484f3 100644 --- a/changelogs/changelog.yaml +++ b/changelogs/changelog.yaml @@ -266,6 +266,16 @@ releases: - 0.26.0.yml - 153-pymd-improvements.yaml release_date: '2024-03-17' + 0.27.0: + changes: + minor_changes: + - Adds period where needed at end of new plugin short descriptions. Controlled + by the ``add_plugin_period`` option in the config file (https://github.com/ansible-community/antsibull-changelog/issues/87). + release_summary: Feature release. + fragments: + - 0.27.0.yml + - 162-add-plugin-period.yaml + release_date: '2024-05-20' 0.3.0: changes: minor_changes: diff --git a/changelogs/fragments/0.27.0.yml b/changelogs/fragments/0.27.0.yml deleted file mode 100644 index 512efc9..0000000 --- a/changelogs/fragments/0.27.0.yml +++ /dev/null @@ -1 +0,0 @@ -release_summary: Feature release. diff --git a/changelogs/fragments/162-add-plugin-period.yaml b/changelogs/fragments/162-add-plugin-period.yaml deleted file mode 100644 index 7453397..0000000 --- a/changelogs/fragments/162-add-plugin-period.yaml +++ /dev/null @@ -1,2 +0,0 @@ -minor_changes: - - "Adds period where needed at end of new plugin short descriptions. Controlled by the ``add_plugin_period`` option in the config file (https://github.com/ansible-community/antsibull-changelog/issues/87)." \ No newline at end of file From 94767458a5e46f502d22ac520de5a3cfd866e7eb Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Mon, 20 May 2024 08:39:07 +0200 Subject: [PATCH 5/6] Post-release version bump. --- src/antsibull_changelog/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/antsibull_changelog/__init__.py b/src/antsibull_changelog/__init__.py index 01b9fe4..7f217d4 100644 --- a/src/antsibull_changelog/__init__.py +++ b/src/antsibull_changelog/__init__.py @@ -8,6 +8,6 @@ Ansible Changelog Tool. """ -__version__ = "0.27.0" +__version__ = "0.27.0.post0" __all__ = ("__version__",) From 2c743607d67befb043d2c2cf90ee28ab591a3939 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Mon, 20 May 2024 08:43:25 +0200 Subject: [PATCH 6/6] Add link to PR. --- CHANGELOG.md | 2 +- CHANGELOG.rst | 2 +- changelogs/changelog.yaml | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 33c317a..70f6750 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -101,7 +101,7 @@ Feature release\. ### Minor Changes -* Adds period where needed at end of new plugin short descriptions\. Controlled by the add\_plugin\_period option in the config file \([https\://github\.com/ansible\-community/antsibull\-changelog/issues/87](https\://github\.com/ansible\-community/antsibull\-changelog/issues/87)\)\. +* Adds period where needed at end of new plugin short descriptions\. Controlled by the add\_plugin\_period option in the config file \([https\://github\.com/ansible\-community/antsibull\-changelog/issues/87](https\://github\.com/ansible\-community/antsibull\-changelog/issues/87)\, [https\://github\.com/ansible\-community/antsibull\-changelog/pull/162](https\://github\.com/ansible\-community/antsibull\-changelog/pull/162)\)\. ## v0\.26\.0 diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 623be32..4882f08 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -15,7 +15,7 @@ Feature release. Minor Changes ------------- -- Adds period where needed at end of new plugin short descriptions. Controlled by the ``add_plugin_period`` option in the config file (https://github.com/ansible-community/antsibull-changelog/issues/87). +- Adds period where needed at end of new plugin short descriptions. Controlled by the ``add_plugin_period`` option in the config file (https://github.com/ansible-community/antsibull-changelog/issues/87, https://github.com/ansible-community/antsibull-changelog/pull/162). v0.26.0 ======= diff --git a/changelogs/changelog.yaml b/changelogs/changelog.yaml index c0484f3..9f94327 100644 --- a/changelogs/changelog.yaml +++ b/changelogs/changelog.yaml @@ -270,7 +270,8 @@ releases: changes: minor_changes: - Adds period where needed at end of new plugin short descriptions. Controlled - by the ``add_plugin_period`` option in the config file (https://github.com/ansible-community/antsibull-changelog/issues/87). + by the ``add_plugin_period`` option in the config file (https://github.com/ansible-community/antsibull-changelog/issues/87, + https://github.com/ansible-community/antsibull-changelog/pull/162). release_summary: Feature release. fragments: - 0.27.0.yml