Skip to content

Commit cf0821f

Browse files
committed
Update CI files
1 parent df31fb8 commit cf0821f

23 files changed

+36
-53
lines changed

.ci/scripts/check_release.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,9 @@ def main(options: argparse.Namespace, template_config: dict[str, t.Any]) -> int:
9999

100100
# Warning: This will not work if branch names contain "/" but we don't really care here.
101101
heads = [h.split("/")[-1] for h in repo.git.branch("--remote").split("\n")]
102-
available_branches = [h for h in heads if re.fullmatch(RELEASE_BRANCH_REGEX, h)]
103-
available_branches.sort(key=lambda ver: Version(ver))
104-
available_branches.append(DEFAULT_BRANCH)
102+
available_branches = sorted(
103+
{h for h in heads if re.fullmatch(RELEASE_BRANCH_REGEX, h)}, key=lambda ver: Version(ver)
104+
) + [DEFAULT_BRANCH]
105105

106106
branches = options.branches
107107
if branches == "supported":

.ci/scripts/check_requirements.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
import warnings
1010
from packaging.requirements import Requirement
1111

12-
1312
CHECK_MATRIX = [
1413
("pyproject.toml", True, True, True),
1514
("requirements.txt", True, True, True),

.ci/scripts/collect_changes.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
from git import GitCommandError, Repo
2626
from packaging.version import parse as parse_version
2727

28-
2928
PYPI_PROJECT = "pulp_rpm"
3029

3130
# Read Towncrier settings

.github/workflows/build.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,15 @@ jobs:
4646
pulpcore-manager openapi --file "api.json"
4747
pulpcore-manager openapi --bindings --component "rpm" --file "rpm-api.json"
4848
- name: "Upload Package whl"
49-
uses: "actions/upload-artifact@v5"
49+
uses: "actions/upload-artifact@v7"
5050
with:
5151
name: "plugin_package"
5252
path: "pulp_rpm/dist/"
5353
if-no-files-found: "error"
5454
retention-days: 5
5555
overwrite: true
5656
- name: "Upload API specs"
57-
uses: "actions/upload-artifact@v5"
57+
uses: "actions/upload-artifact@v7"
5858
with:
5959
name: "api_spec"
6060
path: |
@@ -73,7 +73,7 @@ jobs:
7373
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
7474
GITHUB_CONTEXT: "${{ github.event.pull_request.commits_url }}"
7575
- name: "Upload python client packages"
76-
uses: "actions/upload-artifact@v5"
76+
uses: "actions/upload-artifact@v7"
7777
with:
7878
name: "python-client.tar"
7979
path: |
@@ -82,7 +82,7 @@ jobs:
8282
retention-days: 5
8383
overwrite: true
8484
- name: "Upload python client docs"
85-
uses: "actions/upload-artifact@v5"
85+
uses: "actions/upload-artifact@v7"
8686
with:
8787
name: "python-client-docs.tar"
8888
path: |
@@ -100,7 +100,7 @@ jobs:
100100
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
101101
GITHUB_CONTEXT: "${{ github.event.pull_request.commits_url }}"
102102
- name: "Upload Ruby client"
103-
uses: "actions/upload-artifact@v5"
103+
uses: "actions/upload-artifact@v7"
104104
with:
105105
name: "ruby-client.tar"
106106
path: |

.github/workflows/publish.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
id-token: "write"
3131

3232
steps:
33-
- uses: "actions/download-artifact@v4"
33+
- uses: "actions/download-artifact@v8"
3434
with:
3535
name: "plugin_package"
3636
path: "dist/"
@@ -53,7 +53,7 @@ jobs:
5353
path: "pulp_rpm"
5454

5555
- name: "Download Python client"
56-
uses: "actions/download-artifact@v4"
56+
uses: "actions/download-artifact@v8"
5757
with:
5858
name: "python-client.tar"
5959
path: "pulp_rpm/"
@@ -82,7 +82,7 @@ jobs:
8282
path: "pulp_rpm"
8383

8484
- name: "Download Ruby client"
85-
uses: "actions/download-artifact@v4"
85+
uses: "actions/download-artifact@v8"
8686
with:
8787
name: "ruby-client.tar"
8888
path: "pulp_rpm/"

.github/workflows/scripts/stage-changelog-for-default-branch.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,13 @@
1212
from git import Repo
1313
from git.exc import GitCommandError
1414

15-
16-
helper = textwrap.dedent(
17-
"""\
15+
helper = textwrap.dedent("""\
1816
Stage the changelog for a release on main branch.
1917
2018
Example:
2119
$ python .github/workflows/scripts/stage-changelog-for-default-branch.py 3.4.0
2220
23-
"""
24-
)
21+
""")
2522

2623
parser = argparse.ArgumentParser(formatter_class=argparse.RawTextHelpFormatter, description=helper)
2724

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ jobs:
126126
docker logs pulp 2>&1 | grep -i pulpcore.deprecation | tee deprecations-${{ matrix.env.TEST }}.txt
127127
128128
- name: "Upload Deprecations"
129-
uses: "actions/upload-artifact@v5"
129+
uses: "actions/upload-artifact@v7"
130130
with:
131131
name: "deprecations-${{ matrix.env.TEST }}"
132132
path: "pulp_rpm/deprecations-${{ matrix.env.TEST }}.txt"

lint_requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#
66
# For more info visit https://github.com/pulp/plugin_template
77

8-
black==24.3.0
8+
black~=26.3 # Pin style to the year. https://black.readthedocs.io/en/stable/faq.html#how-stable-is-black-s-style
99
bump-my-version
1010
check-manifest
1111
flake8

pulp_rpm/app/depsolving.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
from django.conf import settings
88

9-
109
logger = logging.getLogger(__name__)
1110

1211
# The name for the repo inside libsolv which represents the combined set of target/destination
@@ -577,7 +576,7 @@ def get_units_from_solvables(self, solvables):
577576
"""Map a list of solvables into their Pulp units, keyed by the repo they came from."""
578577
repo_unit_map = collections.defaultdict(set)
579578
for solvable in solvables:
580-
(unit_id, repo_id) = self.get_unit_id(solvable)
579+
unit_id, repo_id = self.get_unit_id(solvable)
581580
repo_unit_map[repo_id].add(unit_id)
582581

583582
return repo_unit_map
@@ -1026,7 +1025,7 @@ def write_solver_debug_data(solver, problems, mapping, full=False):
10261025
print(file=summary)
10271026

10281027
for solvable in transaction.newsolvables():
1029-
(reason, rule) = solver.describe_decision(solvable)
1028+
reason, rule = solver.describe_decision(solvable)
10301029

10311030
print(
10321031
"{name}-{evr}.{arch}".format(
@@ -1035,15 +1034,15 @@ def write_solver_debug_data(solver, problems, mapping, full=False):
10351034
file=summary,
10361035
)
10371036

1038-
(reason_name, reason_description) = reason_desc_map[reason]
1039-
(unit_id, from_repo) = mapping.get_unit_id(solvable)
1037+
reason_name, reason_description = reason_desc_map[reason]
1038+
unit_id, from_repo = mapping.get_unit_id(solvable)
10401039
print(
10411040
" Pulp Content unit '{}' from repo '{}'".format(unit_id, from_repo), file=summary
10421041
)
10431042
print(" Reason: {} - {}".format(reason_name, reason_description), file=summary)
10441043
print(" Rules:", file=summary)
10451044
for info in rule.allinfos():
1046-
(rule_name, rule_description) = rule_desc_map[info.type]
1045+
rule_name, rule_description = rule_desc_map[info.type]
10471046
print(" {} - {}".format(rule_name, rule_description), file=summary)
10481047
if info.solvable:
10491048
pkg = str(info.solvable)

pulp_rpm/app/downloaders.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
from pulp_rpm.app.exceptions import UlnCredentialsError
1111
from pulp_rpm.app.shared_utils import urlpath_sanitize
1212

13-
1413
log = getLogger(__name__)
1514

1615

@@ -80,7 +79,7 @@ def __init__(
8079
# So, we have a pretty ugly workaround.
8180
parsed = urlparse(self.url)
8281
# two pieces of the URL: pre- and post-path
83-
(before_path, after_path) = self.url.split(parsed.path)
82+
before_path, after_path = self.url.split(parsed.path)
8483
new_path = quote(unquote(parsed.path), safe=":/") # fix the path
8584
new_url = "{}{}{}".format(before_path, new_path, after_path) # rebuild
8685
if self.sles_auth_token:

0 commit comments

Comments
 (0)