From b0445dba03bb03bea16d8fad5adf9ee6cd7d240b Mon Sep 17 00:00:00 2001 From: pulpbot Date: Sun, 22 Mar 2026 02:15:26 +0000 Subject: [PATCH] Update CI files --- .ci/scripts/check_release.py | 6 +++--- .ci/scripts/check_requirements.py | 1 - .ci/scripts/collect_changes.py | 1 - .github/workflows/build.yml | 10 +++++----- .github/workflows/publish.yml | 6 +++--- .../scripts/stage-changelog-for-default-branch.py | 7 ++----- .github/workflows/test.yml | 2 +- lint_requirements.txt | 2 +- pulp_gem/app/models.py | 1 - pulp_gem/app/tasks/publishing.py | 1 - pulp_gem/app/tasks/synchronizing.py | 1 - pulp_gem/specs.py | 1 - pulp_gem/tests/functional/constants.py | 1 + 13 files changed, 16 insertions(+), 24 deletions(-) diff --git a/.ci/scripts/check_release.py b/.ci/scripts/check_release.py index 611c882c..6e079995 100755 --- a/.ci/scripts/check_release.py +++ b/.ci/scripts/check_release.py @@ -99,9 +99,9 @@ def main(options: argparse.Namespace, template_config: dict[str, t.Any]) -> int: # Warning: This will not work if branch names contain "/" but we don't really care here. heads = [h.split("/")[-1] for h in repo.git.branch("--remote").split("\n")] - available_branches = [h for h in heads if re.fullmatch(RELEASE_BRANCH_REGEX, h)] - available_branches.sort(key=lambda ver: Version(ver)) - available_branches.append(DEFAULT_BRANCH) + available_branches = sorted( + {h for h in heads if re.fullmatch(RELEASE_BRANCH_REGEX, h)}, key=lambda ver: Version(ver) + ) + [DEFAULT_BRANCH] branches = options.branches if branches == "supported": diff --git a/.ci/scripts/check_requirements.py b/.ci/scripts/check_requirements.py index 35077c86..c68a1d4d 100755 --- a/.ci/scripts/check_requirements.py +++ b/.ci/scripts/check_requirements.py @@ -9,7 +9,6 @@ import warnings from packaging.requirements import Requirement - CHECK_MATRIX = [ ("pyproject.toml", True, True, True), ("requirements.txt", True, True, True), diff --git a/.ci/scripts/collect_changes.py b/.ci/scripts/collect_changes.py index c9aeb93c..c319dabc 100755 --- a/.ci/scripts/collect_changes.py +++ b/.ci/scripts/collect_changes.py @@ -25,7 +25,6 @@ from git import GitCommandError, Repo from packaging.version import parse as parse_version - PYPI_PROJECT = "pulp_gem" # Read Towncrier settings diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f3dad20a..549697a8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -46,7 +46,7 @@ jobs: pulpcore-manager openapi --file "api.json" pulpcore-manager openapi --bindings --component "gem" --file "gem-api.json" - name: "Upload Package whl" - uses: "actions/upload-artifact@v5" + uses: "actions/upload-artifact@v7" with: name: "plugin_package" path: "pulp_gem/dist/" @@ -54,7 +54,7 @@ jobs: retention-days: 5 overwrite: true - name: "Upload API specs" - uses: "actions/upload-artifact@v5" + uses: "actions/upload-artifact@v7" with: name: "api_spec" path: | @@ -73,7 +73,7 @@ jobs: GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" GITHUB_CONTEXT: "${{ github.event.pull_request.commits_url }}" - name: "Upload python client packages" - uses: "actions/upload-artifact@v5" + uses: "actions/upload-artifact@v7" with: name: "python-client.tar" path: | @@ -82,7 +82,7 @@ jobs: retention-days: 5 overwrite: true - name: "Upload python client docs" - uses: "actions/upload-artifact@v5" + uses: "actions/upload-artifact@v7" with: name: "python-client-docs.tar" path: | @@ -100,7 +100,7 @@ jobs: GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" GITHUB_CONTEXT: "${{ github.event.pull_request.commits_url }}" - name: "Upload Ruby client" - uses: "actions/upload-artifact@v5" + uses: "actions/upload-artifact@v7" with: name: "ruby-client.tar" path: | diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 822404e4..0d158601 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -30,7 +30,7 @@ jobs: id-token: "write" steps: - - uses: "actions/download-artifact@v4" + - uses: "actions/download-artifact@v8" with: name: "plugin_package" path: "dist/" @@ -53,7 +53,7 @@ jobs: path: "pulp_gem" - name: "Download Python client" - uses: "actions/download-artifact@v4" + uses: "actions/download-artifact@v8" with: name: "python-client.tar" path: "pulp_gem/" @@ -82,7 +82,7 @@ jobs: path: "pulp_gem" - name: "Download Ruby client" - uses: "actions/download-artifact@v4" + uses: "actions/download-artifact@v8" with: name: "ruby-client.tar" path: "pulp_gem/" diff --git a/.github/workflows/scripts/stage-changelog-for-default-branch.py b/.github/workflows/scripts/stage-changelog-for-default-branch.py index a66697ac..93d416b6 100755 --- a/.github/workflows/scripts/stage-changelog-for-default-branch.py +++ b/.github/workflows/scripts/stage-changelog-for-default-branch.py @@ -12,16 +12,13 @@ from git import Repo from git.exc import GitCommandError - -helper = textwrap.dedent( - """\ +helper = textwrap.dedent("""\ Stage the changelog for a release on main branch. Example: $ python .github/workflows/scripts/stage-changelog-for-default-branch.py 3.4.0 - """ -) + """) parser = argparse.ArgumentParser(formatter_class=argparse.RawTextHelpFormatter, description=helper) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e9def7c0..a9ca1ef7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -122,7 +122,7 @@ jobs: docker logs pulp 2>&1 | grep -i pulpcore.deprecation | tee deprecations-${{ matrix.env.TEST }}.txt - name: "Upload Deprecations" - uses: "actions/upload-artifact@v5" + uses: "actions/upload-artifact@v7" with: name: "deprecations-${{ matrix.env.TEST }}" path: "pulp_gem/deprecations-${{ matrix.env.TEST }}.txt" diff --git a/lint_requirements.txt b/lint_requirements.txt index ccb3d8ee..6377fc2e 100644 --- a/lint_requirements.txt +++ b/lint_requirements.txt @@ -5,7 +5,7 @@ # # For more info visit https://github.com/pulp/plugin_template -black==24.3.0 +black~=26.3 # Pin style to the year. https://black.readthedocs.io/en/stable/faq.html#how-stable-is-black-s-style bump-my-version check-manifest flake8 diff --git a/pulp_gem/app/models.py b/pulp_gem/app/models.py index 7adf29c5..3b04980f 100644 --- a/pulp_gem/app/models.py +++ b/pulp_gem/app/models.py @@ -17,7 +17,6 @@ from pulp_gem.specs import analyse_gem - log = getLogger(__name__) diff --git a/pulp_gem/app/tasks/publishing.py b/pulp_gem/app/tasks/publishing.py index 6d7ddc10..87867752 100644 --- a/pulp_gem/app/tasks/publishing.py +++ b/pulp_gem/app/tasks/publishing.py @@ -23,7 +23,6 @@ from pulp_gem.app.models import GemContent, GemPublication from pulp_gem.specs import ruby_ver_cmp, write_specs, GemKey - log = logging.getLogger(__name__) diff --git a/pulp_gem/app/tasks/synchronizing.py b/pulp_gem/app/tasks/synchronizing.py index 0968646e..42aa71f4 100644 --- a/pulp_gem/app/tasks/synchronizing.py +++ b/pulp_gem/app/tasks/synchronizing.py @@ -24,7 +24,6 @@ split_ext_version, ) - log = logging.getLogger(__name__) diff --git a/pulp_gem/specs.py b/pulp_gem/specs.py index c7384966..16fb5741 100644 --- a/pulp_gem/specs.py +++ b/pulp_gem/specs.py @@ -14,7 +14,6 @@ import rubymarshal.writer import rubymarshal.reader - log = getLogger(__name__) NAME_REGEX = re.compile(r"[\w\.-]+") diff --git a/pulp_gem/tests/functional/constants.py b/pulp_gem/tests/functional/constants.py index 5cb4a366..2c112897 100644 --- a/pulp_gem/tests/functional/constants.py +++ b/pulp_gem/tests/functional/constants.py @@ -1,5 +1,6 @@ # coding=utf-8 """Constants for Pulp Gem plugin tests.""" + from urllib.parse import urljoin PULP_FIXTURES_BASE_URL = "https://fixtures.pulpproject.org/"