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
8 changes: 6 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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):
```

Expand Down
2 changes: 1 addition & 1 deletion cookiecutter.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
}
6 changes: 5 additions & 1 deletion {{ cookiecutter.project_slug }}/Dockerfile
Original file line number Diff line number Diff line change
@@ -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 }}"
Expand Down Expand Up @@ -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

Expand Down
8 changes: 8 additions & 0 deletions {{ cookiecutter.project_slug }}/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down