From cf2274953ff98dc40c5c73265aa2b03bb4393c88 Mon Sep 17 00:00:00 2001 From: pulpbot Date: Sun, 2 Jun 2024 02:40:17 +0000 Subject: [PATCH] Update CI files [noissue] --- .ci/scripts/collect_changes.py | 8 +- .github/template_gitref | 2 +- CHANGES.md | 134 +++++++++++++++++++++++ CHANGES.rst | 187 --------------------------------- CHANGES/.TEMPLATE.md | 39 +++++++ MANIFEST.in | 2 +- docs/changes.rst | 7 +- docs/template_gitref | 2 +- pyproject.toml | 10 +- 9 files changed, 190 insertions(+), 201 deletions(-) create mode 100644 CHANGES.md delete mode 100644 CHANGES.rst create mode 100644 CHANGES/.TEMPLATE.md diff --git a/.ci/scripts/collect_changes.py b/.ci/scripts/collect_changes.py index 39dcc6d2..f5ff5945 100755 --- a/.ci/scripts/collect_changes.py +++ b/.ci/scripts/collect_changes.py @@ -1,3 +1,4 @@ +#!/bin/env python3 # WARNING: DO NOT EDIT! # # This file was generated by plugin_template, and is managed by it. Please use @@ -8,13 +9,14 @@ import itertools import os import re +import tomllib -import toml from git import GitCommandError, Repo from packaging.version import parse as parse_version # Read Towncrier settings -tc_settings = toml.load("pyproject.toml")["tool"]["towncrier"] +with open("pyproject.toml", "rb") as fp: + tc_settings = tomllib.load(fp)["tool"]["towncrier"] CHANGELOG_FILE = tc_settings.get("filename", "NEWS.rst") START_STRING = tc_settings.get( @@ -79,7 +81,7 @@ def main(): old_length = len(main_changes) for branch in branches: - print(f"Looking at branch {branch}") + print(f"Looking for './{CHANGELOG_FILE}' at branch {branch}") try: changelog = get_changelog(repo, branch) except GitCommandError: diff --git a/.github/template_gitref b/.github/template_gitref index 09354118..bfe538dd 100644 --- a/.github/template_gitref +++ b/.github/template_gitref @@ -1 +1 @@ -2021.08.26-335-gdf91f79 +2021.08.26-337-g7c7a09a diff --git a/CHANGES.md b/CHANGES.md new file mode 100644 index 00000000..f2d8e079 --- /dev/null +++ b/CHANGES.md @@ -0,0 +1,134 @@ +# Changelog + +[//]: # (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 the contributing docs.) +[//]: # (WARNING: Don't drop the towncrier directive!) + +[//]: # (towncrier release notes start) + +## 0.5.1 (2024-05-23) {: #0.5.1 } + +### Bugfixes + +- Fixed the wrong upper bound for pulpcore version requirement. + [#265](https://github.com/pulp/pulp_gem/issues/265) + +--- + +## 0.5.0 (2024-02-12) {: #0.5.0 } + +### Features + +- Added replica definitions. + [#216](https://github.com/pulp/pulp_gem/issues/216) + +### Bugfixes + +- Fixed a bug where legacy gems would cause an exception in pulpcore-content. + [#209](https://github.com/pulp/pulp_gem/issues/209) + +### Deprecations and Removals + +- Bumped the requirement on pulpcore to >=3.39 as the next supported version in the line. + +--- + +## 0.4.0 (2023-11-03) {: #0.4.0 } + +### Features + +- Bumped pulpcore compatibility to 3.54. +- Added support for RBAC and domains. + [#154](https://github.com/pulp/pulp_gem/issues/154) + +### Deprecations and Removals + +- Removed pre 0.2 residua. When you are upgrading from <0.3, and your system was operated on <0.2 before, make sure you have run the corresponding datarepair commands before upgrading the codebase to this version. + [#143](https://github.com/pulp/pulp_gem/issues/143) + +--- + +## 0.3.0 (2023-09-18) {: #0.3.0 } + +### Deprecations and Removals + +- Added a migration to tell admins to run certain datarepair commands before upgrading to 0.4. + [#141](https://github.com/pulp/pulp_gem/issues/141) + +--- + +## 0.2.0 (2023-08-15) {: #0.2.0 } + +### Features + +- Added support for gems with a platform that is not "ruby". + [#130](https://github.com/pulp/pulp_gem/issues/130) + +### Bugfixes + +- Fixed the detection of prerelease versions. + [#114](https://github.com/pulp/pulp_gem/issues/114) +- Added a datarepair-gemspec-platform command to regenerate the gemspec artifacts and properly set the platform attribute on existing gems. + [#130](https://github.com/pulp/pulp_gem/issues/130) +- Fixed the generation of gemspec data. + [#131](https://github.com/pulp/pulp_gem/issues/131) + +--- + +## 0.1.1 (2023-06-29) {: #0.1.1 } + +### Bugfixes + +- Fixed the detection of prerelease versions. + [#114](https://github.com/pulp/pulp_gem/issues/114) + +--- + +## 0.1.0 (2023-06-26) {: #0.1.0 } + +### Features + +- Added support for pull-through caching. Add a remote to a distribution to enable this feature. + [#94](https://github.com/pulp/pulp_gem/issues/94) +- Implemented new synching and publishing the compact index format. + Rubymarshal and quick index will still be generated when publishing, but synching is exclusive to the new format. + Added checksum and dependency information to gem content. + Added `prereleases` and `includes` / `excludes` filter to remotes. + [#96](https://github.com/pulp/pulp_gem/issues/96) +- Added compatibility for pulpcore 3.25, pulpcore support is now >=3.25,<3.40. + [#99](https://github.com/pulp/pulp_gem/issues/99) +- Added support to assign a remote to a repository. + [#101](https://github.com/pulp/pulp_gem/issues/101) + +### Bugfixes + +- Optimized publish task to be significantly faster. + [#93](https://github.com/pulp/pulp_gem/issues/93) + +### Improved Documentation + +- Added CLI commands to documented workflows. + [#107](https://github.com/pulp/pulp_gem/issues/107) + +### Deprecations and Removals + +- Disabled synching without compact index format. + Existing content will still be downloadable. + There is a `pulpcore-manager datarepair-shallow-gems` command that will reindex content to the new format given their artifacts are persisted. + [#96](https://github.com/pulp/pulp_gem/issues/96) + +--- + +## 0.0.1b3 (2022-03-01) + +### Misc + +- [#39](https://github.com/pulp/pulp_gem/issues/39) + +--- + +## 0.0.1b2 (2018-12-19) + +No significant changes. diff --git a/CHANGES.rst b/CHANGES.rst deleted file mode 100644 index 61fa68de..00000000 --- a/CHANGES.rst +++ /dev/null @@ -1,187 +0,0 @@ -========= -Changelog -========= - -.. - 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://docs.pulpproject.org/en/3.0/nightly/contributing/git.html#changelog-update - - WARNING: Don't drop the next directive! - -.. towncrier release notes start - -0.5.1 (2024-05-23) -================== - -Bugfixes --------- - -- Fixed the wrong upper bound for pulpcore version requirement. - `#265 `__ - - ----- - - -0.5.0 (2024-02-12) -================== - -Features --------- - -- Added replica definitions. - `#216 `__ - - -Bugfixes --------- - -- Fixed a bug where legacy gems would cause an exception in pulpcore-content. - `#209 `__ - - -Deprecations and Removals -------------------------- - -- Bumped the requirement on pulpcore to >=3.39 as the next supported version in the line. - - - ----- - - -0.4.0 (2023-11-03) -================== - -Features --------- - -- Bumped pulpcore compatibility to 3.54. -- Added support for RBAC and domains. - `#154 `__ - - -Deprecations and Removals -------------------------- - -- Removed pre 0.2 residua. When you are upgrading from <0.3, and your system was operated on <0.2 before, make sure you have run the corresponding datarepair commands before upgrading the codebase to this version. - `#143 `__ - - ----- - - -0.3.0 (2023-09-18) -================== - -Deprecations and Removals -------------------------- - -- Added a migration to tell admins to run certain datarepair commands before upgrading to 0.4. - `#141 `__ - - ----- - - -0.2.0 (2023-08-15) -================== - -Features --------- - -- Added support for gems with a platform that is not "ruby". - `#130 `__ - - -Bugfixes --------- - -- Fixed the detection of prerelease versions. - `#114 `__ -- Added a datarepair-gemspec-platform command to regenerate the gemspec artifacts and properly set the platform attribute on existing gems. - `#130 `__ -- Fixed the generation of gemspec data. - `#131 `__ - - ----- - - -0.1.1 (2023-06-29) -================== - -Bugfixes --------- - -- Fixed the detection of prerelease versions. - `#114 `__ - - ----- - - -0.1.0 (2023-06-26) -================== - -Features --------- - -- Added support for pull-through caching. Add a remote to a distribution to enable this feature. - `#94 `__ -- Implemented new synching and publishing the compact index format. - Rubymarshal and quick index will still be generated when publishing, but synching is exclusive to the new format. - Added checksum and dependency information to gem content. - Added ``prereleases`` and ``includes`` / ``excludes`` filter to remotes. - `#96 `__ -- Added compatibility for pulpcore 3.25, pulpcore support is now >=3.25,<3.40. - `#99 `__ -- Added support to assign a remote to a repository. - `#101 `__ - - -Bugfixes --------- - -- Optimized publish task to be significantly faster. - `#93 `__ - - -Improved Documentation ----------------------- - -- Added CLI commands to documented workflows. - `#107 `__ - - -Deprecations and Removals -------------------------- - -- Disabled synching without compact index format. - Existing content will still be downloadable. - There is a ``pulpcore-manager datarepair-shallow-gems`` command that will reindex content to the new format given their artifacts are persisted. - `#96 `__ - - ----- - - -0.0.1b3 (2022-03-01) -==================== - -Misc ----- - -- `#39 `__ - - ----- - - -0.0.1b2 (2018-12-19) -==================== - -No significant changes. diff --git a/CHANGES/.TEMPLATE.md b/CHANGES/.TEMPLATE.md new file mode 100644 index 00000000..2308193b --- /dev/null +++ b/CHANGES/.TEMPLATE.md @@ -0,0 +1,39 @@ +{# TOWNCRIER TEMPLATE #} +{% for section, _ in sections.items() %} +{%- set section_slug = "-" + section|replace(" ", "-")|replace("_", "-")|lower %} +{%- if section %} + +### {{section}} {: #{{versiondata.version}}{{section_slug}} } +{% else %} +{%- set section_slug = "" %} +{% endif %} +{% if sections[section] %} +{% for category, val in definitions.items() if category in sections[section]%} + +#### {{ definitions[category]['name'] }} {: #{{versiondata.version}}{{section_slug}}-{{category}} } + +{% if definitions[category]['showcontent'] %} +{% for text, values in sections[section][category].items() %} +- {{ text }} +{% if values %} + {{ values|join(',\n ') }} +{% endif %} +{% endfor %} +{% else %} +- {{ sections[section][category]['']|join(', ') }} +{% endif %} +{% if sections[section][category]|length == 0 %} + +No significant changes. +{% else %} +{% endif %} +{% endfor %} +{% else %} + +No significant changes. +{% endif %} +{% endfor %} + +--- + + diff --git a/MANIFEST.in b/MANIFEST.in index 56c2dda8..5f97250d 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,4 +1,4 @@ -include CHANGES.rst +include CHANGES.md include COMMITMENT include COPYRIGHT include README.md diff --git a/docs/changes.rst b/docs/changes.rst index 3df8f458..96e8eb90 100644 --- a/docs/changes.rst +++ b/docs/changes.rst @@ -1,5 +1,4 @@ -.. _pulp_gem-changes: +Changes +********* -.. include:: ../CHANGES.rst - -.. include:: ../HISTORY.rst +Removed due to docs migration process. diff --git a/docs/template_gitref b/docs/template_gitref index 09354118..bfe538dd 100644 --- a/docs/template_gitref +++ b/docs/template_gitref @@ -1 +1 @@ -2021.08.26-335-gdf91f79 +2021.08.26-337-g7c7a09a diff --git a/pyproject.toml b/pyproject.toml index 85644650..9c5d4aee 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,10 +1,12 @@ [tool.towncrier] package = "pulp_gem" -filename = "CHANGES.rst" +filename = "CHANGES.md" directory = "CHANGES/" -title_format = "{version} ({project_date})" -template = "CHANGES/.TEMPLATE.rst" -issue_format = "`#{issue} `__" +title_format = "## {version} ({project_date}) {{: #{version} }}" +template = "CHANGES/.TEMPLATE.md" +issue_format = "[#{issue}](https://github.com/pulp/pulp_gem/issues/{issue})" +start_string = "[//]: # (towncrier release notes start)\n" +underlines = ["", "", ""] [tool.black]