Skip to content

Commit 7fa468c

Browse files
committed
Update CI files
1 parent 1d10516 commit 7fa468c

52 files changed

Lines changed: 627 additions & 562 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.ci/ansible/filter/repr.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
from __future__ import absolute_import, division, print_function
2+
23
from packaging.version import parse as parse_version
34

45
__metaclass__ = type

.ci/scripts/calc_constraints.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,12 @@
77

88
import argparse
99
import fileinput
10-
import urllib.request
1110
import sys
11+
import urllib.request
12+
13+
import yaml
1214
from packaging.requirements import Requirement
1315
from packaging.version import Version
14-
import yaml
1516

1617
try:
1718
import tomllib

.ci/scripts/check_gettext.sh

Lines changed: 0 additions & 21 deletions
This file was deleted.

.ci/scripts/check_pulpcore_imports.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
# make sure this script runs at the repo root
1111
cd "$(dirname "$(realpath -e "$0")")"/../..
1212

13-
set -uv
13+
set -u
1414

1515
# check for imports not from pulpcore.plugin. exclude tests
16-
MATCHES=$(grep -n -r --include \*.py "from pulpcore.*import" . | grep -v "tests\|plugin")
16+
MATCHES="$(grep -n -r --include \*.py "from pulpcore.*import" pulp_python | grep -v "tests\|plugin")"
1717

1818
if [ $? -ne 1 ]; then
1919
printf "\nERROR: Detected bad imports from pulpcore:\n"

.ci/scripts/check_release.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,16 @@
99
# ///
1010

1111
import argparse
12-
import re
1312
import os
13+
import re
1414
import sys
15-
import tomllib
1615
import typing as t
1716
from pathlib import Path
1817

18+
import tomllib
1919
import yaml
20-
from packaging.version import Version
2120
from git import Repo
21+
from packaging.version import Version
2222

2323
RELEASE_BRANCH_REGEX = r"^([0-9]+)\.([0-9]+)$"
2424
Y_CHANGELOG_EXTS = [".feature"]
@@ -157,9 +157,9 @@ def main(options: argparse.Namespace, template_config: dict[str, t.Any]) -> int:
157157

158158
if reasons:
159159
curr_version = Version(last_tag)
160-
assert curr_version.base_version.startswith(
161-
branch
162-
), "Current-version has to belong to the current branch!"
160+
assert curr_version.base_version.startswith(branch), (
161+
"Current-version has to belong to the current branch!"
162+
)
163163
next_version = Version(f"{branch}.{curr_version.micro + 1}")
164164
print(
165165
f"A Z-release is needed for {branch}, "

.ci/scripts/check_requirements.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,14 @@
55
#
66
# For more info visit https://github.com/pulp/plugin_template
77

8-
import tomllib
98
import warnings
10-
from packaging.requirements import Requirement
119

10+
import tomllib
11+
from packaging.requirements import Requirement
1212

1313
CHECK_MATRIX = [
1414
("pyproject.toml", True, True, True),
1515
("requirements.txt", True, True, True),
16-
("dev_requirements.txt", False, True, False),
1716
("ci_requirements.txt", False, True, True),
1817
("doc_requirements.txt", False, True, False),
1918
("lint_requirements.txt", False, True, True),

.ci/scripts/collect_changes.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,13 @@
1818
import json
1919
import os
2020
import re
21-
import tomllib
2221
import urllib.request
2322
from pathlib import Path
2423

24+
import tomllib
2525
from git import GitCommandError, Repo
2626
from packaging.version import parse as parse_version
2727

28-
2928
PYPI_PROJECT = "pulp_python"
3029

3130
# Read Towncrier settings

.ci/scripts/pr_labels.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44

55
import re
66
import sys
7-
import tomllib
87
from pathlib import Path
98

9+
import tomllib
1010
from git import Repo
1111

1212

.ci/scripts/schema.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
But some pulp paths start with curly brackets e.g. {artifact_href}
88
This script modifies drf-spectacular schema validation to accept slashes and curly brackets.
99
"""
10+
1011
import json
12+
1113
from drf_spectacular.validation import JSON_SCHEMA_SPEC_PATH
1214

1315
with open(JSON_SCHEMA_SPEC_PATH) as fh:

.ci/scripts/skip_tests.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,13 @@
1515
*: Error
1616
"""
1717

18-
import sys
18+
import argparse
1919
import os
2020
import re
21-
import git
21+
import sys
2222
import textwrap
23-
import argparse
23+
24+
import git
2425

2526
DOC_PATTERNS = [
2627
r"^docs/",

0 commit comments

Comments
 (0)