diff --git a/Dockerfile b/Dockerfile index 0ccf7a4..9fd13b8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,14 @@ -FROM registry.access.redhat.com/ubi9/python-312@sha256:bb8fd1ba3f7c4c28f04e124654ad95bf575cf5015d768e0bd523196b9d903d52 AS test +FROM registry.access.redhat.com/ubi10/python-314-minimal@sha256:0c5b5d198178280e65577e63251ee5ee49435e1a711bef4e4b5b471723e0ed3c AS test COPY --from=ghcr.io/astral-sh/uv:0.11.16@sha256:440fd6477af86a2f1b38080c539f1672cd22acb1b1a47e321dba5158ab08864d /uv /bin/uv ENV \ - UV_PYTHON="/usr/bin/python3.12" \ + UV_PYTHON="/usr/bin/python3.14" \ # disable uv cache. it doesn't make sense in a container UV_NO_CACHE=true +USER root +RUN microdnf install -y make +USER 1001 + COPY . . RUN make _test diff --git a/README.md b/README.md index 5055838..253fc09 100644 --- a/README.md +++ b/README.md @@ -31,8 +31,7 @@ This is a template for a Python project. Choose from [1/2] (1): [8/9] version (0.1.0): [9/9] Select python_version - 1 - 3.12 - 2 - 3.11 + 1 - 3.14 Choose from [1/2] (1): ``` diff --git a/cookiecutter.json b/cookiecutter.json index 0656253..72030e7 100644 --- a/cookiecutter.json +++ b/cookiecutter.json @@ -7,5 +7,5 @@ "project_short_description": "Please enter a short description of your project", "deployment": ["openshift", "pypi"], "version": "0.1.0", - "python_version": ["3.12", "3.11"] + "python_version": ["3.14"] } diff --git a/{{ cookiecutter.project_slug }}/Dockerfile b/{{ cookiecutter.project_slug }}/Dockerfile index 46d1c2d..b6b9cbb 100644 --- a/{{ cookiecutter.project_slug }}/Dockerfile +++ b/{{ cookiecutter.project_slug }}/Dockerfile @@ -1,6 +1,6 @@ # # Base image with defaults for all stages -FROM registry.access.redhat.com/ubi9/python-{{ cookiecutter.python_version.replace(".", "") }} AS base +FROM registry.access.redhat.com/ubi10/python-{{ cookiecutter.python_version.replace(".", "") }}-minimal AS base # Keep this version tag in sync with pyproject.toml or feel free to remove it LABEL konflux.additional-tags="{{ cookiecutter.version }}" @@ -37,6 +37,10 @@ RUN uv sync --frozen --no-group dev # FROM builder AS test +USER root +RUN microdnf install -y make +USER 1001 + COPY Makefile ./ RUN uv sync --frozen diff --git a/{{ cookiecutter.project_slug }}/pyproject.toml b/{{ cookiecutter.project_slug }}/pyproject.toml index 9c7ef5d..8960b0a 100644 --- a/{{ cookiecutter.project_slug }}/pyproject.toml +++ b/{{ cookiecutter.project_slug }}/pyproject.toml @@ -101,6 +101,14 @@ preview = true [tool.ruff.lint.isort] known-first-party = ["{{ cookiecutter.project_module }}"] +[tool.ruff.lint.flake8-type-checking] +runtime-evaluated-base-classes = ["pydantic.BaseModel"] +runtime-evaluated-decorators = [ + "dataclasses.dataclass", + "pydantic.dataclasses.dataclass", + "pydantic.validate_call", +] + # Mypy configuration [tool.mypy] files = ["{{ cookiecutter.project_module }}", "tests"]