copier-python 0.20.1__tar.gz → 0.22.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {copier_python-0.20.1 → copier_python-0.22.0}/PKG-INFO +3 -3
- {copier_python-0.20.1 → copier_python-0.22.0}/copier_python/__main__.py +7 -2
- {copier_python-0.20.1 → copier_python-0.22.0}/copier_python/repo.py +1 -7
- {copier_python-0.20.1 → copier_python-0.22.0}/copier_python/update.py +6 -4
- {copier_python-0.20.1 → copier_python-0.22.0}/pyproject.toml +3 -4
- {copier_python-0.20.1 → copier_python-0.22.0}/tests/conftest.py +1 -1
- {copier_python-0.20.1 → copier_python-0.22.0}/tests/template/__snapshots__/test_dockerfile.ambr +18 -18
- {copier_python-0.20.1 → copier_python-0.22.0}/tests/template/__snapshots__/test_mise_toml.ambr +112 -112
- {copier_python-0.20.1 → copier_python-0.22.0}/tests/template/__snapshots__/test_pyproject.ambr +191 -191
- {copier_python-0.20.1 → copier_python-0.22.0}/tests/template/__snapshots__/test_workflows.ambr +41 -41
- {copier_python-0.20.1 → copier_python-0.22.0}/tests/template/test_dockerfile.py +6 -2
- {copier_python-0.20.1 → copier_python-0.22.0}/tests/template/test_pyproject.py +7 -3
- {copier_python-0.20.1 → copier_python-0.22.0}/tests/template/test_workflows.py +6 -2
- {copier_python-0.20.1 → copier_python-0.22.0}/tests/test_update.py +17 -9
- {copier_python-0.20.1 → copier_python-0.22.0}/tests/utils.py +37 -8
- {copier_python-0.20.1 → copier_python-0.22.0}/.gitignore +0 -0
- {copier_python-0.20.1 → copier_python-0.22.0}/AGENTS.md +0 -0
- {copier_python-0.20.1 → copier_python-0.22.0}/CONTRIBUTING.md +0 -0
- {copier_python-0.20.1 → copier_python-0.22.0}/LICENSE +0 -0
- {copier_python-0.20.1 → copier_python-0.22.0}/README.md +0 -0
- {copier_python-0.20.1 → copier_python-0.22.0}/copier_python/__init__.py +0 -0
- {copier_python-0.20.1 → copier_python-0.22.0}/copier_python/py.typed +0 -0
- {copier_python-0.20.1 → copier_python-0.22.0}/docs/contributing.md +0 -0
- {copier_python-0.20.1 → copier_python-0.22.0}/docs/development/requirements.md +0 -0
- {copier_python-0.20.1 → copier_python-0.22.0}/docs/development/updates.md +0 -0
- {copier_python-0.20.1 → copier_python-0.22.0}/docs/development/workflow.md +0 -0
- {copier_python-0.20.1 → copier_python-0.22.0}/docs/index.md +0 -0
- {copier_python-0.20.1 → copier_python-0.22.0}/docs/license.md +0 -0
- {copier_python-0.20.1 → copier_python-0.22.0}/docs/project-creation.md +0 -0
- {copier_python-0.20.1 → copier_python-0.22.0}/docs/project-development.md +0 -0
- {copier_python-0.20.1 → copier_python-0.22.0}/docs/project-release.md +0 -0
- {copier_python-0.20.1 → copier_python-0.22.0}/docs/project-setup.md +0 -0
- {copier_python-0.20.1 → copier_python-0.22.0}/docs/project-updates.md +0 -0
- {copier_python-0.20.1 → copier_python-0.22.0}/docs/releasing.md +0 -0
- {copier_python-0.20.1 → copier_python-0.22.0}/docs/requirements.md +0 -0
- {copier_python-0.20.1 → copier_python-0.22.0}/docs/setup.md +0 -0
- {copier_python-0.20.1 → copier_python-0.22.0}/tests/__init__.py +0 -0
- {copier_python-0.20.1 → copier_python-0.22.0}/tests/template/__init__.py +0 -0
- {copier_python-0.20.1 → copier_python-0.22.0}/tests/template/__snapshots__/test_agents.ambr +0 -0
- {copier_python-0.20.1 → copier_python-0.22.0}/tests/template/__snapshots__/test_compose.ambr +0 -0
- {copier_python-0.20.1 → copier_python-0.22.0}/tests/template/__snapshots__/test_contributing.ambr +0 -0
- {copier_python-0.20.1 → copier_python-0.22.0}/tests/template/__snapshots__/test_docs.ambr +0 -0
- {copier_python-0.20.1 → copier_python-0.22.0}/tests/template/__snapshots__/test_license.ambr +0 -0
- {copier_python-0.20.1 → copier_python-0.22.0}/tests/template/__snapshots__/test_pre_commit.ambr +0 -0
- {copier_python-0.20.1 → copier_python-0.22.0}/tests/template/__snapshots__/test_readme.ambr +0 -0
- {copier_python-0.20.1 → copier_python-0.22.0}/tests/template/__snapshots__/test_zensical.ambr +0 -0
- {copier_python-0.20.1 → copier_python-0.22.0}/tests/template/test_agents.py +0 -0
- {copier_python-0.20.1 → copier_python-0.22.0}/tests/template/test_commit_check.py +0 -0
- {copier_python-0.20.1 → copier_python-0.22.0}/tests/template/test_compose.py +0 -0
- {copier_python-0.20.1 → copier_python-0.22.0}/tests/template/test_contributing.py +0 -0
- {copier_python-0.20.1 → copier_python-0.22.0}/tests/template/test_docs.py +0 -0
- {copier_python-0.20.1 → copier_python-0.22.0}/tests/template/test_license.py +0 -0
- {copier_python-0.20.1 → copier_python-0.22.0}/tests/template/test_mise_toml.py +0 -0
- {copier_python-0.20.1 → copier_python-0.22.0}/tests/template/test_pre_commit.py +0 -0
- {copier_python-0.20.1 → copier_python-0.22.0}/tests/template/test_readme.py +0 -0
- {copier_python-0.20.1 → copier_python-0.22.0}/tests/template/test_structure.py +0 -0
- {copier_python-0.20.1 → copier_python-0.22.0}/tests/template/test_template.py +0 -0
- {copier_python-0.20.1 → copier_python-0.22.0}/tests/template/test_zensical.py +0 -0
- {copier_python-0.20.1 → copier_python-0.22.0}/tests/test_version.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: copier-python
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.22.0
|
|
4
4
|
Summary: Copier template for Python projects with modern tooling
|
|
5
5
|
Project-URL: Homepage, https://smkent.github.io/copier-python
|
|
6
6
|
Project-URL: Repository, https://github.com/smkent/copier-python
|
|
@@ -12,16 +12,16 @@ Classifier: Development Status :: 3 - Alpha
|
|
|
12
12
|
Classifier: Intended Audience :: Developers
|
|
13
13
|
Classifier: Programming Language :: Python :: 3
|
|
14
14
|
Classifier: Programming Language :: Python :: 3 :: Only
|
|
15
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
16
15
|
Classifier: Programming Language :: Python :: 3.11
|
|
17
16
|
Classifier: Programming Language :: Python :: 3.12
|
|
18
17
|
Classifier: Programming Language :: Python :: 3.13
|
|
19
18
|
Classifier: Programming Language :: Python :: 3.14
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.15
|
|
20
20
|
Classifier: Topic :: Documentation
|
|
21
21
|
Classifier: Topic :: Software Development
|
|
22
22
|
Classifier: Topic :: Utilities
|
|
23
23
|
Classifier: Typing :: Typed
|
|
24
|
-
Requires-Python: >=3.
|
|
24
|
+
Requires-Python: >=3.11
|
|
25
25
|
Requires-Dist: pyyaml>=6
|
|
26
26
|
Requires-Dist: rich>=15
|
|
27
27
|
Requires-Dist: typer>=0.9
|
|
@@ -73,6 +73,9 @@ class UpdateResult:
|
|
|
73
73
|
def update(
|
|
74
74
|
repos: Args.Repos,
|
|
75
75
|
*,
|
|
76
|
+
vcs_ref: Annotated[
|
|
77
|
+
str | None, Option("--vcs-ref", "-r", help="Template ref to update to")
|
|
78
|
+
] = None,
|
|
76
79
|
dry_run: Args.DryRun = False,
|
|
77
80
|
branch: Annotated[str, Option(help="Branch name to create.")] = "updates",
|
|
78
81
|
) -> None:
|
|
@@ -82,14 +85,16 @@ def update(
|
|
|
82
85
|
repo_targets = {(target := RepoTarget(repo)).url: target for repo in repos}
|
|
83
86
|
for target in repo_targets.values():
|
|
84
87
|
try:
|
|
85
|
-
pr_url = UpdateAction(
|
|
88
|
+
pr_url = UpdateAction(
|
|
89
|
+
target, branch=branch, vcs_ref=vcs_ref, dry_run=dry_run
|
|
90
|
+
)()
|
|
86
91
|
if pr_url:
|
|
87
92
|
results.append(
|
|
88
93
|
UpdateResult(target, UpdateStatus.UPDATED, pr_url=pr_url)
|
|
89
94
|
)
|
|
90
95
|
else:
|
|
91
96
|
results.append(UpdateResult(target, UpdateStatus.CURRENT))
|
|
92
|
-
except Exception as exc: # noqa: BLE001
|
|
97
|
+
except Exception as exc: # noqa: BLE001
|
|
93
98
|
console.print_exception()
|
|
94
99
|
results.append(
|
|
95
100
|
UpdateResult(target, status=UpdateStatus.FAILED, exception=exc)
|
|
@@ -3,24 +3,18 @@ from __future__ import annotations
|
|
|
3
3
|
import os
|
|
4
4
|
import re
|
|
5
5
|
import subprocess
|
|
6
|
-
import sys
|
|
7
6
|
import tempfile
|
|
8
7
|
from contextlib import contextmanager, suppress
|
|
9
8
|
from dataclasses import InitVar, dataclass, field
|
|
10
9
|
from functools import cached_property
|
|
11
10
|
from pathlib import Path
|
|
12
|
-
from typing import TYPE_CHECKING, Any, ClassVar
|
|
11
|
+
from typing import TYPE_CHECKING, Any, ClassVar, Self
|
|
13
12
|
|
|
14
13
|
import yaml
|
|
15
14
|
from rich import print # noqa: A004
|
|
16
15
|
from rich.panel import Panel
|
|
17
16
|
from rich.text import Text
|
|
18
17
|
|
|
19
|
-
if sys.version_info >= (3, 11):
|
|
20
|
-
from typing import Self
|
|
21
|
-
else:
|
|
22
|
-
from typing_extensions import Self
|
|
23
|
-
|
|
24
18
|
if TYPE_CHECKING:
|
|
25
19
|
from collections.abc import Generator, Sequence
|
|
26
20
|
|
|
@@ -3,7 +3,7 @@ from __future__ import annotations
|
|
|
3
3
|
import json
|
|
4
4
|
import os
|
|
5
5
|
import subprocess
|
|
6
|
-
from dataclasses import dataclass
|
|
6
|
+
from dataclasses import dataclass, field
|
|
7
7
|
from typing import TYPE_CHECKING
|
|
8
8
|
|
|
9
9
|
from .repo import RepoWorktree
|
|
@@ -18,7 +18,8 @@ TEMPLATE_REPO_URL = "https://github.com/smkent/copier-python"
|
|
|
18
18
|
class UpdateAction:
|
|
19
19
|
repo: RepoTarget
|
|
20
20
|
branch: str
|
|
21
|
-
|
|
21
|
+
vcs_ref: str | None = None
|
|
22
|
+
dry_run: bool = field(default=False, kw_only=True)
|
|
22
23
|
|
|
23
24
|
def __call__(self) -> str | None:
|
|
24
25
|
with RepoWorktree.clone(self.repo, branch=self.branch) as worktree:
|
|
@@ -33,10 +34,11 @@ class UpdateAction:
|
|
|
33
34
|
).stdout.strip()
|
|
34
35
|
)
|
|
35
36
|
start_ref = "v" + copier_status["current_version"]
|
|
36
|
-
end_ref = "v" + copier_status["latest_version"]
|
|
37
|
+
end_ref = self.vcs_ref or ("v" + copier_status["latest_version"])
|
|
37
38
|
if not copier_status.get("update_available", False):
|
|
38
39
|
return None
|
|
39
|
-
repo.run(["copier", "update", "--skip-answered"])
|
|
40
|
+
repo.run(["copier", "update", "--skip-answered", "--vcs-ref", end_ref])
|
|
41
|
+
repo.run(["mise", "install"])
|
|
40
42
|
|
|
41
43
|
status = repo.git_status()
|
|
42
44
|
if not status:
|
|
@@ -9,18 +9,18 @@ description = "Copier template for Python projects with modern tooling"
|
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = "MIT"
|
|
11
11
|
license-files = ["LICENSE"]
|
|
12
|
-
requires-python = ">=3.
|
|
12
|
+
requires-python = ">=3.11"
|
|
13
13
|
authors = [{ name = "Stephen Kent", email = "smkent@smkent.net" }]
|
|
14
14
|
classifiers = [
|
|
15
15
|
"Development Status :: 3 - Alpha",
|
|
16
16
|
"Intended Audience :: Developers",
|
|
17
17
|
"Programming Language :: Python :: 3",
|
|
18
18
|
"Programming Language :: Python :: 3 :: Only",
|
|
19
|
-
"Programming Language :: Python :: 3.10",
|
|
20
19
|
"Programming Language :: Python :: 3.11",
|
|
21
20
|
"Programming Language :: Python :: 3.12",
|
|
22
21
|
"Programming Language :: Python :: 3.13",
|
|
23
22
|
"Programming Language :: Python :: 3.14",
|
|
23
|
+
"Programming Language :: Python :: 3.15",
|
|
24
24
|
"Topic :: Documentation",
|
|
25
25
|
"Topic :: Software Development",
|
|
26
26
|
"Topic :: Utilities",
|
|
@@ -47,7 +47,6 @@ dev = [
|
|
|
47
47
|
"bump-my-version>=1.3.0",
|
|
48
48
|
"commit-check>=2.18",
|
|
49
49
|
"copier>=9",
|
|
50
|
-
"poethepoet>=0.46",
|
|
51
50
|
"pysentry-rs>=0.4",
|
|
52
51
|
"pytest>=9",
|
|
53
52
|
"pytest-cov>=7",
|
|
@@ -96,7 +95,7 @@ exclude_lines = ["pragma: no cover", "if TYPE_CHECKING:", "@abstractmethod"]
|
|
|
96
95
|
[tool.ruff]
|
|
97
96
|
line-length = 79
|
|
98
97
|
output-format = "concise"
|
|
99
|
-
target-version = "
|
|
98
|
+
target-version = "py311"
|
|
100
99
|
|
|
101
100
|
[tool.ruff.lint]
|
|
102
101
|
select = ["ALL"]
|
|
@@ -22,7 +22,7 @@ DEFAULT_DATA: dict[str, Any] = {
|
|
|
22
22
|
"project_description": "Onett Little League",
|
|
23
23
|
"project_type": "application",
|
|
24
24
|
"project_visibility": "public",
|
|
25
|
-
"python_version_minimum": "3.
|
|
25
|
+
"python_version_minimum": f"3.{template.python_versions.minor_min}",
|
|
26
26
|
"user_name": "Ness",
|
|
27
27
|
"user_email": "ness@onett.example.com",
|
|
28
28
|
"github_user": "ness",
|
{copier_python-0.20.1 → copier_python-0.22.0}/tests/template/__snapshots__/test_dockerfile.ambr
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# serializer version: 1
|
|
2
|
-
# name: test_workflows_container[3.
|
|
2
|
+
# name: test_workflows_container[3.13-3.11]
|
|
3
3
|
'''
|
|
4
|
-
FROM python:3.
|
|
4
|
+
FROM python:3.13-slim AS builder
|
|
5
5
|
|
|
6
6
|
COPY --from=ghcr.io/astral-sh/uv /uv /uvx /bin/
|
|
7
7
|
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
RUN --mount=type=cache,target=/root/.cache/uv \
|
|
18
18
|
uv sync --no-dev --no-editable
|
|
19
19
|
|
|
20
|
-
FROM python:3.
|
|
20
|
+
FROM python:3.13-slim
|
|
21
21
|
|
|
22
22
|
COPY --from=builder /app/.venv /app/.venv
|
|
23
23
|
|
|
@@ -28,9 +28,9 @@
|
|
|
28
28
|
|
|
29
29
|
'''
|
|
30
30
|
# ---
|
|
31
|
-
# name: test_workflows_container[3.
|
|
31
|
+
# name: test_workflows_container[3.13-3.13]
|
|
32
32
|
'''
|
|
33
|
-
FROM python:3.
|
|
33
|
+
FROM python:3.13-slim AS builder
|
|
34
34
|
|
|
35
35
|
COPY --from=ghcr.io/astral-sh/uv /uv /uvx /bin/
|
|
36
36
|
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
RUN --mount=type=cache,target=/root/.cache/uv \
|
|
47
47
|
uv sync --no-dev --no-editable
|
|
48
48
|
|
|
49
|
-
FROM python:3.
|
|
49
|
+
FROM python:3.13-slim
|
|
50
50
|
|
|
51
51
|
COPY --from=builder /app/.venv /app/.venv
|
|
52
52
|
|
|
@@ -57,9 +57,9 @@
|
|
|
57
57
|
|
|
58
58
|
'''
|
|
59
59
|
# ---
|
|
60
|
-
# name: test_workflows_container[3.
|
|
60
|
+
# name: test_workflows_container[3.15-3.11]
|
|
61
61
|
'''
|
|
62
|
-
FROM python:3.
|
|
62
|
+
FROM python:3.15-slim AS builder
|
|
63
63
|
|
|
64
64
|
COPY --from=ghcr.io/astral-sh/uv /uv /uvx /bin/
|
|
65
65
|
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
RUN --mount=type=cache,target=/root/.cache/uv \
|
|
76
76
|
uv sync --no-dev --no-editable
|
|
77
77
|
|
|
78
|
-
FROM python:3.
|
|
78
|
+
FROM python:3.15-slim
|
|
79
79
|
|
|
80
80
|
COPY --from=builder /app/.venv /app/.venv
|
|
81
81
|
|
|
@@ -86,9 +86,9 @@
|
|
|
86
86
|
|
|
87
87
|
'''
|
|
88
88
|
# ---
|
|
89
|
-
# name: test_workflows_container[3.
|
|
89
|
+
# name: test_workflows_container[3.15-3.13]
|
|
90
90
|
'''
|
|
91
|
-
FROM python:3.
|
|
91
|
+
FROM python:3.15-slim AS builder
|
|
92
92
|
|
|
93
93
|
COPY --from=ghcr.io/astral-sh/uv /uv /uvx /bin/
|
|
94
94
|
|
|
@@ -104,7 +104,7 @@
|
|
|
104
104
|
RUN --mount=type=cache,target=/root/.cache/uv \
|
|
105
105
|
uv sync --no-dev --no-editable
|
|
106
106
|
|
|
107
|
-
FROM python:3.
|
|
107
|
+
FROM python:3.15-slim
|
|
108
108
|
|
|
109
109
|
COPY --from=builder /app/.venv /app/.venv
|
|
110
110
|
|
|
@@ -115,9 +115,9 @@
|
|
|
115
115
|
|
|
116
116
|
'''
|
|
117
117
|
# ---
|
|
118
|
-
# name: test_workflows_container[No maximum-3.
|
|
118
|
+
# name: test_workflows_container[No maximum-3.11]
|
|
119
119
|
'''
|
|
120
|
-
FROM python:3.
|
|
120
|
+
FROM python:3.15-slim AS builder
|
|
121
121
|
|
|
122
122
|
COPY --from=ghcr.io/astral-sh/uv /uv /uvx /bin/
|
|
123
123
|
|
|
@@ -133,7 +133,7 @@
|
|
|
133
133
|
RUN --mount=type=cache,target=/root/.cache/uv \
|
|
134
134
|
uv sync --no-dev --no-editable
|
|
135
135
|
|
|
136
|
-
FROM python:3.
|
|
136
|
+
FROM python:3.15-slim
|
|
137
137
|
|
|
138
138
|
COPY --from=builder /app/.venv /app/.venv
|
|
139
139
|
|
|
@@ -144,9 +144,9 @@
|
|
|
144
144
|
|
|
145
145
|
'''
|
|
146
146
|
# ---
|
|
147
|
-
# name: test_workflows_container[No maximum-3.
|
|
147
|
+
# name: test_workflows_container[No maximum-3.13]
|
|
148
148
|
'''
|
|
149
|
-
FROM python:3.
|
|
149
|
+
FROM python:3.15-slim AS builder
|
|
150
150
|
|
|
151
151
|
COPY --from=ghcr.io/astral-sh/uv /uv /uvx /bin/
|
|
152
152
|
|
|
@@ -162,7 +162,7 @@
|
|
|
162
162
|
RUN --mount=type=cache,target=/root/.cache/uv \
|
|
163
163
|
uv sync --no-dev --no-editable
|
|
164
164
|
|
|
165
|
-
FROM python:3.
|
|
165
|
+
FROM python:3.15-slim
|
|
166
166
|
|
|
167
167
|
COPY --from=builder /app/.venv /app/.venv
|
|
168
168
|
|