Skip to content

Commit fc04640

Browse files
pulpbotdralley
authored andcommitted
Update CI files
1 parent 0a882d9 commit fc04640

29 files changed

Lines changed: 110 additions & 148 deletions

‎.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_rust | 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: 5 additions & 5 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
1515
import tomllib
1616
import typing as t
1717
from pathlib import Path
1818

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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77

88
import tomllib
99
import warnings
10+
1011
from packaging.requirements import Requirement
1112

1213
CHECK_MATRIX = [
1314
("pyproject.toml", True, True, True),
1415
("requirements.txt", True, True, True),
15-
("dev_requirements.txt", False, True, False),
1616
("ci_requirements.txt", False, True, True),
1717
("doc_requirements.txt", False, True, False),
1818
("lint_requirements.txt", False, True, True),

‎.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/",

‎.ci/scripts/validate_commit_message.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
import subprocess
77
import sys
88
import tomllib
9-
import yaml
109
from pathlib import Path
1110

11+
import yaml
1212
from github import Github
1313

1414

‎.flake8‎

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

‎.github/workflows/lint.yml‎

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -36,20 +36,13 @@ jobs:
3636
run: |
3737
yamllint -s -d '{extends: relaxed, rules: {line-length: disable}}' .github/workflows
3838
39-
# run black separately from flake8 to get a diff
40-
- name: "Run black"
39+
- name: "Check formating"
4140
run: |
42-
black --version
43-
black --check --diff .
41+
ruff format --check --diff
4442
45-
# Lint code.
46-
- name: "Run flake8"
43+
- name: "Lint code"
4744
run: |
48-
flake8
49-
50-
- name: "Check for common gettext problems"
51-
run: |
52-
sh .ci/scripts/check_gettext.sh
45+
ruff check
5346
5447
- name: "Run extra lint checks"
5548
run: |

0 commit comments

Comments
 (0)