Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .ci/scripts/check_release.py
Original file line number Diff line number Diff line change
Expand Up @@ -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":
Expand Down
1 change: 0 additions & 1 deletion .ci/scripts/check_requirements.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import warnings
from packaging.requirements import Requirement


CHECK_MATRIX = [
("pyproject.toml", True, True, True),
("requirements.txt", True, True, True),
Expand Down
1 change: 0 additions & 1 deletion .ci/scripts/collect_changes.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
from git import GitCommandError, Repo
from packaging.version import parse as parse_version


PYPI_PROJECT = "pulp_ansible"

# Read Towncrier settings
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,15 @@ jobs:
pulpcore-manager openapi --file "api.json"
pulpcore-manager openapi --bindings --component "ansible" --file "ansible-api.json"
- name: "Upload Package whl"
uses: "actions/upload-artifact@v5"
uses: "actions/upload-artifact@v7"
with:
name: "plugin_package"
path: "pulp_ansible/dist/"
if-no-files-found: "error"
retention-days: 5
overwrite: true
- name: "Upload API specs"
uses: "actions/upload-artifact@v5"
uses: "actions/upload-artifact@v7"
with:
name: "api_spec"
path: |
Expand All @@ -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: |
Expand All @@ -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: |
Expand All @@ -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: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/"
Expand All @@ -53,7 +53,7 @@ jobs:
path: "pulp_ansible"

- name: "Download Python client"
uses: "actions/download-artifact@v4"
uses: "actions/download-artifact@v8"
with:
name: "python-client.tar"
path: "pulp_ansible/"
Expand Down Expand Up @@ -82,7 +82,7 @@ jobs:
path: "pulp_ansible"

- name: "Download Ruby client"
uses: "actions/download-artifact@v4"
uses: "actions/download-artifact@v8"
with:
name: "ruby-client.tar"
path: "pulp_ansible/"
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/scripts/create_tag_and_build_package.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@

from git import Repo

helper = textwrap.dedent(
"""\
helper = textwrap.dedent("""\
Create a new tag and build a Python package.

Example:
Expand All @@ -25,8 +24,7 @@
If the package does not exist on PyPI, two new packages are built with the names
pulp-ansible-[tag].tar.gz and pulp_ansible-[tag]-py3-none-any.whl. They are
stored in the 'dist' directory.
"""
)
""")
parser = argparse.ArgumentParser(formatter_class=argparse.RawTextHelpFormatter, description=helper)
parser.add_argument(
"desired_tag",
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/scripts/get_or_create_python_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@

from pypi_tools import get_package_from_pypi

helper = textwrap.dedent(
"""\
helper = textwrap.dedent("""\
Get Python client from PyPI or generate it using openapi-generator-cli.

Example:
Expand All @@ -17,8 +16,7 @@

If a client package with the specified version does not exist on PyPI, it is generated using
openapi-generator-cli.
"""
)
""")
parser = argparse.ArgumentParser(formatter_class=argparse.RawTextHelpFormatter, description=helper)
parser.add_argument(
"client_version",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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_ansible/deprecations-${{ matrix.env.TEST }}.txt"
Expand Down
2 changes: 1 addition & 1 deletion lint_requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion pulp_ansible/app/downloaders.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

from pulpcore.plugin.download import DownloaderFactory, FileDownloader, HttpDownloader


log = getLogger(__name__)


Expand Down
1 change: 0 additions & 1 deletion pulp_ansible/app/galaxy/v3/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@

from pulp_ansible.app.utils import filter_content_for_repo_version


_CAN_VIEW_REPO_CONTENT = {
"action": ["list", "retrieve", "download"],
"principal": "authenticated",
Expand Down
1 change: 0 additions & 1 deletion pulp_ansible/app/management/commands/download-log.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

from pulp_ansible.app.models import DownloadLog


SEPARATOR = "\t"


Expand Down
1 change: 0 additions & 1 deletion pulp_ansible/app/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
from .downloaders import AnsibleDownloaderFactory
from .utils import get_collection_deferred_fields


log = getLogger(__name__)


Expand Down
1 change: 0 additions & 1 deletion pulp_ansible/app/tasks/collectionversion_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@

from pulpcore.plugin.models import RepositoryVersion


log = logging.getLogger(__name__)


Expand Down
1 change: 0 additions & 1 deletion pulp_ansible/app/tasks/roles.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
from pulp_ansible.app.models import AnsibleRepository, RoleRemote, Role
from pulp_ansible.app.tasks.utils import get_api_version, get_page_url, parse_metadata


log = logging.getLogger(__name__)


Expand Down
1 change: 0 additions & 1 deletion pulp_ansible/app/tasks/signature.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
from pulp_ansible.app.tasks.utils import get_file_obj_from_tarball
from rest_framework import serializers


log = logging.getLogger(__name__)


Expand Down
1 change: 0 additions & 1 deletion pulp_ansible/app/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
from pulpcore.plugin.models import RepositoryVersion, RepositoryContent, Task
from django.db.models.functions import Cast, JSONObject


_collection_deferred_fields = ContextVar("collection_deferred_fields", default=[])


Expand Down
1 change: 0 additions & 1 deletion pulp_ansible/pytest_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
from pulp_ansible.tests.functional.constants import ANSIBLE_FIXTURE_URL
from pulp_ansible.tests.functional.utils import randstr


# Bindings API Fixtures


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import pytest


REQUIREMENTS_FILE = "collections:\n - testing.k8s_demo_collection"


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

from pulpcore.client.pulp_ansible import ApiException


FakeRepository = namedtuple("FakeRepository", "pulp_href")


Expand Down
1 change: 0 additions & 1 deletion pulp_ansible/tests/functional/api/test_export_import.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
from pulpcore.client.pulp_ansible import AnsibleRepositorySyncURL
from pulp_ansible.tests.functional.constants import ANSIBLE_FIXTURE_URL


# As long as we cannot run this test in domains, it must not run as parallel.
# Orphan cleanup is unsafe in any scenario here.

Expand Down
1 change: 0 additions & 1 deletion pulp_ansible/tests/functional/constants.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from urllib.parse import urljoin


GALAXY_ANSIBLE_BASE_URL = "https://galaxy.ansible.com"

ANSIBLE_ROLE_NAME = "ansible.role"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
create_repos_with_collections,
)


parser = argparse.ArgumentParser(
description="Create Repositories with Collections and several " "RepositoryVersions."
)
Expand Down
1 change: 0 additions & 1 deletion pulp_ansible/tests/performance/fast_load_collections.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
import_collection_from_path,
)


parser = argparse.ArgumentParser(description="Quickly load collections form a folder.")

parser.add_argument(
Expand Down
1 change: 0 additions & 1 deletion pulp_ansible/tests/performance/generate_collections.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
create_namespace,
)


parser = argparse.ArgumentParser(description="Generate some collections.")

parser.add_argument(
Expand Down
1 change: 0 additions & 1 deletion pulp_ansible/tests/performance/promote.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
promote_content,
)


parser = argparse.ArgumentParser(description="Find a collection and promote it.")

parser.add_argument(
Expand Down