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
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
matrix:
python:
- "3.11"
- "3.12"
- "3.13"
steps:
- uses: "actions/checkout@v4"
- uses: "actions/cache@v4"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ env:

jobs:
unittest:
runs-on: "ubuntu-20.04"
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v4"
- uses: "actions/cache@v4"
Expand All @@ -37,7 +37,7 @@ jobs:
run: |
make unittest
test:
runs-on: "ubuntu-20.04"
runs-on: "ubuntu-24.04"
needs:
- "unittest"
strategy:
Expand Down
2 changes: 1 addition & 1 deletion cookiecutter/ci/hooks/post_gen_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"pulp-glue{{ cookiecutter.__app_label_suffix }}",
"CHANGES/pulp-glue{{ cookiecutter.__app_label_suffix }}",
{%- endif %}
{% if not cookiecutter.app_label -%}
{% if not cookiecutter.app_label or not cookiecutter.glue -%}
".ci/scripts/check_cli_dependencies.py",
{%- endif %}
]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,34 +1,28 @@
#!/bin/env python3
import typing as t

import tomllib
from pathlib import Path

from packaging.requirements import Requirement


GLUE_DIR = "pulp-glue{{ cookiecutter.__app_label_suffix }}"


def dependencies(path: Path) -> t.Iterator[Requirement]:
with (path / "pyproject.toml").open("rb") as fp:
pyproject = tomllib.load(fp)

return (Requirement(r) for r in pyproject["project"]["dependencies"])


if __name__ == "__main__":
base_path = Path(__file__).parent.parent.parent
glue_path = "pulp-glue{{ cookiecutter.__app_label_suffix }}"
with (base_path / "pyproject.toml").open("rb") as fp:
cli_pyproject = tomllib.load(fp)

cli_dependency = next(
(
Requirement(r)
for r in cli_pyproject["project"]["dependencies"]
if r.startswith("pulp-cli")
)
)

with (base_path / glue_path / "pyproject.toml").open("rb") as fp:
glue_pyproject = tomllib.load(fp)

glue_dependency = next(
(
Requirement(r)
for r in glue_pyproject["project"]["dependencies"]
if r.startswith("pulp-glue")
)
)
glue_path = base_path / GLUE_DIR

cli_dependency = next((r for r in dependencies(base_path) if r.name == "pulp-cli"))
glue_dependency = next((r for r in dependencies(glue_path) if r.name == "pulp-glue"))

if cli_dependency.specifier != glue_dependency.specifier:
print("🪢 CLI and GLUE dependencies mismatch:")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
matrix:
python:
- "3.11"
- "3.12"
- "3.13"
steps:
- uses: "actions/checkout@v4"
{%- include "cache_action" %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ env:
jobs:
{%- if cookiecutter.unittests %}
unittest:
runs-on: "ubuntu-20.04"
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v4"
{%- include "cache_action" %}
Expand All @@ -33,7 +33,7 @@ jobs:
make unittest
{%- endif %}
test:
runs-on: "ubuntu-20.04"
runs-on: "ubuntu-24.04"
{%- if cookiecutter.unittests %}
needs:
- "unittest"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Lint requirements
black==25.1.0
flake8==7.1.2
flake8==7.2.0
flake8-pyproject==1.2.3
isort==6.0.1
mypy==1.15.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ exclude = "cookiecutter"
# This section is managed by the cookiecutter templates.
profile = "black"
line_length = 100
skip = ["pulp-glue{{ cookiecutter.__app_label_suffix }}"{% if cookiecutter.app_label == "" %}, "cookiecutter"{% endif %}]
extend_skip = ["pulp-glue{{ cookiecutter.__app_label_suffix }}"{% if cookiecutter.app_label == "" %}, "cookiecutter"{% endif %}]

[tool.flake8]
# This section is managed by the cookiecutter templates.
Expand Down
Loading