copier-python 0.20.0__tar.gz → 0.21.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.
Files changed (61) hide show
  1. copier_python-0.21.0/AGENTS.md +30 -0
  2. {copier_python-0.20.0 → copier_python-0.21.0}/CONTRIBUTING.md +12 -0
  3. {copier_python-0.20.0 → copier_python-0.21.0}/PKG-INFO +3 -3
  4. {copier_python-0.20.0 → copier_python-0.21.0}/copier_python/__main__.py +1 -1
  5. {copier_python-0.20.0 → copier_python-0.21.0}/copier_python/repo.py +1 -7
  6. {copier_python-0.20.0 → copier_python-0.21.0}/copier_python/update.py +1 -0
  7. {copier_python-0.20.0 → copier_python-0.21.0}/pyproject.toml +4 -4
  8. {copier_python-0.20.0 → copier_python-0.21.0}/tests/conftest.py +4 -6
  9. {copier_python-0.20.0 → copier_python-0.21.0}/tests/template/__snapshots__/test_dockerfile.ambr +18 -18
  10. {copier_python-0.20.0 → copier_python-0.21.0}/tests/template/__snapshots__/test_mise_toml.ambr +112 -112
  11. {copier_python-0.20.0 → copier_python-0.21.0}/tests/template/__snapshots__/test_pre_commit.ambr +2 -2
  12. {copier_python-0.20.0 → copier_python-0.21.0}/tests/template/__snapshots__/test_pyproject.ambr +191 -191
  13. {copier_python-0.20.0 → copier_python-0.21.0}/tests/template/__snapshots__/test_workflows.ambr +41 -41
  14. {copier_python-0.20.0 → copier_python-0.21.0}/tests/template/test_agents.py +2 -2
  15. {copier_python-0.20.0 → copier_python-0.21.0}/tests/template/test_commit_check.py +2 -2
  16. {copier_python-0.20.0 → copier_python-0.21.0}/tests/template/test_contributing.py +5 -3
  17. {copier_python-0.20.0 → copier_python-0.21.0}/tests/template/test_dockerfile.py +6 -2
  18. {copier_python-0.20.0 → copier_python-0.21.0}/tests/template/test_docs.py +4 -2
  19. {copier_python-0.20.0 → copier_python-0.21.0}/tests/template/test_license.py +8 -4
  20. {copier_python-0.20.0 → copier_python-0.21.0}/tests/template/test_pre_commit.py +2 -2
  21. {copier_python-0.20.0 → copier_python-0.21.0}/tests/template/test_pyproject.py +11 -5
  22. {copier_python-0.20.0 → copier_python-0.21.0}/tests/template/test_readme.py +4 -2
  23. {copier_python-0.20.0 → copier_python-0.21.0}/tests/template/test_structure.py +12 -6
  24. {copier_python-0.20.0 → copier_python-0.21.0}/tests/template/test_workflows.py +6 -2
  25. {copier_python-0.20.0 → copier_python-0.21.0}/tests/test_update.py +9 -7
  26. copier_python-0.21.0/tests/utils.py +124 -0
  27. copier_python-0.20.0/AGENTS.md +0 -9
  28. copier_python-0.20.0/tests/utils.py +0 -80
  29. {copier_python-0.20.0 → copier_python-0.21.0}/.gitignore +0 -0
  30. {copier_python-0.20.0 → copier_python-0.21.0}/LICENSE +0 -0
  31. {copier_python-0.20.0 → copier_python-0.21.0}/README.md +0 -0
  32. {copier_python-0.20.0 → copier_python-0.21.0}/copier_python/__init__.py +0 -0
  33. {copier_python-0.20.0 → copier_python-0.21.0}/copier_python/py.typed +0 -0
  34. {copier_python-0.20.0 → copier_python-0.21.0}/docs/contributing.md +0 -0
  35. {copier_python-0.20.0 → copier_python-0.21.0}/docs/development/requirements.md +0 -0
  36. {copier_python-0.20.0 → copier_python-0.21.0}/docs/development/updates.md +0 -0
  37. {copier_python-0.20.0 → copier_python-0.21.0}/docs/development/workflow.md +0 -0
  38. {copier_python-0.20.0 → copier_python-0.21.0}/docs/index.md +0 -0
  39. {copier_python-0.20.0 → copier_python-0.21.0}/docs/license.md +0 -0
  40. {copier_python-0.20.0 → copier_python-0.21.0}/docs/project-creation.md +0 -0
  41. {copier_python-0.20.0 → copier_python-0.21.0}/docs/project-development.md +0 -0
  42. {copier_python-0.20.0 → copier_python-0.21.0}/docs/project-release.md +0 -0
  43. {copier_python-0.20.0 → copier_python-0.21.0}/docs/project-setup.md +0 -0
  44. {copier_python-0.20.0 → copier_python-0.21.0}/docs/project-updates.md +0 -0
  45. {copier_python-0.20.0 → copier_python-0.21.0}/docs/releasing.md +0 -0
  46. {copier_python-0.20.0 → copier_python-0.21.0}/docs/requirements.md +0 -0
  47. {copier_python-0.20.0 → copier_python-0.21.0}/docs/setup.md +0 -0
  48. {copier_python-0.20.0 → copier_python-0.21.0}/tests/__init__.py +0 -0
  49. {copier_python-0.20.0 → copier_python-0.21.0}/tests/template/__init__.py +0 -0
  50. {copier_python-0.20.0 → copier_python-0.21.0}/tests/template/__snapshots__/test_agents.ambr +0 -0
  51. {copier_python-0.20.0 → copier_python-0.21.0}/tests/template/__snapshots__/test_compose.ambr +0 -0
  52. {copier_python-0.20.0 → copier_python-0.21.0}/tests/template/__snapshots__/test_contributing.ambr +0 -0
  53. {copier_python-0.20.0 → copier_python-0.21.0}/tests/template/__snapshots__/test_docs.ambr +0 -0
  54. {copier_python-0.20.0 → copier_python-0.21.0}/tests/template/__snapshots__/test_license.ambr +0 -0
  55. {copier_python-0.20.0 → copier_python-0.21.0}/tests/template/__snapshots__/test_readme.ambr +0 -0
  56. {copier_python-0.20.0 → copier_python-0.21.0}/tests/template/__snapshots__/test_zensical.ambr +0 -0
  57. {copier_python-0.20.0 → copier_python-0.21.0}/tests/template/test_compose.py +0 -0
  58. {copier_python-0.20.0 → copier_python-0.21.0}/tests/template/test_mise_toml.py +0 -0
  59. {copier_python-0.20.0 → copier_python-0.21.0}/tests/template/test_template.py +0 -0
  60. {copier_python-0.20.0 → copier_python-0.21.0}/tests/template/test_zensical.py +0 -0
  61. {copier_python-0.20.0 → copier_python-0.21.0}/tests/test_version.py +0 -0
@@ -0,0 +1,30 @@
1
+ # Environment/Tools
2
+
3
+ * `mise` manages dev tools and tasks, including `uv` which manages Python and dependencies.
4
+ * Use `uv add`/`uv run python` instead of bare `pip`/`python`
5
+ * `mise install`: After-clone setup (install tools, dependencies, pre-commit hooks)
6
+ * `mise run lint`: Pre-commit hooks (via `pre-commit`-compatible `prek`) including lint, format, type check (ruff, ty)
7
+ * `mise run test`: Run tests (accepts pytest arguments)
8
+ * `mise run lt`: Lint+test (no arguments)
9
+ * `mise run snapup`: Update test snapshots (syrupy, accepts pytest arguments)
10
+
11
+ # Commit conventions
12
+
13
+ * Keep commit messages concise and in plain language, so a maintainer can
14
+ quickly understand the change. Use a short subject, and add a body only when
15
+ the change needs explaining, in a few lines about why. Don't list changed
16
+ files, restate the diff, or report test results.
17
+ * If a commit contains code or text largely generated by an LLM, add an
18
+ `Assisted-by: <tool>:<model>` trailer, for example with `git commit --trailer`.
19
+ * Don't add `Co-authored-by` or `Signed-off-by` lines for LLM tools, links to
20
+ LLM sessions, or promotional lines such as "Generated with [...]".
21
+
22
+ # Submitting contributions
23
+
24
+ * You may commit locally without asking. Before submitting anything, such as
25
+ pushing commits or creating or editing a pull request, issue, or comment,
26
+ show the user (who is the contributor) exactly what will be submitted, and
27
+ wait for their explicit approval. Submit it as approved. This includes but is
28
+ not limited to commit messages, titles, and bodies.
29
+ * Keep titles and descriptions short and specific. Don't restate what the diff
30
+ already shows.
@@ -21,3 +21,15 @@ licensed under the project's license, the
21
21
  [MIT License](https://github.com/smkent/copier-python/blob/main/LICENSE),
22
22
  with no additional terms,
23
23
  and that you have the right to submit it under that license.
24
+
25
+ ## LLM use
26
+
27
+ A contributor is always the author of their contributions.
28
+ You must read, review, and understand everything you submit, including
29
+ LLM-generated code or text, and be able to explain it on request.
30
+
31
+ If a commit contains code or text largely generated by an LLM, add an
32
+ `Assisted-by: <tool>:<model>` trailer to its message. This can be done
33
+ automatically with `git commit --trailer="Assisted-by: <tool>:<model>"`.
34
+
35
+ Do not use `Co-authored-by:` for LLM attribution. LLMs are tools, not authors.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: copier-python
3
- Version: 0.20.0
3
+ Version: 0.21.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.10
24
+ Requires-Python: >=3.11
25
25
  Requires-Dist: pyyaml>=6
26
26
  Requires-Dist: rich>=15
27
27
  Requires-Dist: typer>=0.9
@@ -89,7 +89,7 @@ def update(
89
89
  )
90
90
  else:
91
91
  results.append(UpdateResult(target, UpdateStatus.CURRENT))
92
- except Exception as exc: # noqa: BLE001, PERF203
92
+ except Exception as exc: # noqa: BLE001
93
93
  console.print_exception()
94
94
  results.append(
95
95
  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
 
@@ -37,6 +37,7 @@ class UpdateAction:
37
37
  if not copier_status.get("update_available", False):
38
38
  return None
39
39
  repo.run(["copier", "update", "--skip-answered"])
40
+ repo.run(["mise", "install"])
40
41
 
41
42
  status = repo.git_status()
42
43
  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.10"
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",
@@ -45,8 +45,8 @@ Issues = "https://github.com/smkent/copier-python/issues"
45
45
  [dependency-groups]
46
46
  dev = [
47
47
  "bump-my-version>=1.3.0",
48
+ "commit-check>=2.18",
48
49
  "copier>=9",
49
- "poethepoet>=0.46",
50
50
  "pysentry-rs>=0.4",
51
51
  "pytest>=9",
52
52
  "pytest-cov>=7",
@@ -95,7 +95,7 @@ exclude_lines = ["pragma: no cover", "if TYPE_CHECKING:", "@abstractmethod"]
95
95
  [tool.ruff]
96
96
  line-length = 79
97
97
  output-format = "concise"
98
- target-version = "py310"
98
+ target-version = "py311"
99
99
 
100
100
  [tool.ruff.lint]
101
101
  select = ["ALL"]
@@ -3,7 +3,6 @@ from __future__ import annotations
3
3
  import subprocess
4
4
  import warnings
5
5
  from functools import partial
6
- from pathlib import Path
7
6
  from typing import TYPE_CHECKING, Any
8
7
 
9
8
  import copier
@@ -12,19 +11,18 @@ import yaml
12
11
 
13
12
  from copier_python.__main__ import setup_env
14
13
 
15
- from .utils import DisallowCallable
14
+ from .utils import DisallowCallable, template
16
15
 
17
16
  if TYPE_CHECKING:
18
17
  from collections.abc import Callable, Iterator
19
-
20
- TEMPLATE_ROOT = Path(__file__).parent.parent
18
+ from pathlib import Path
21
19
 
22
20
  DEFAULT_DATA: dict[str, Any] = {
23
21
  "project_name": "PKFire",
24
22
  "project_description": "Onett Little League",
25
23
  "project_type": "application",
26
24
  "project_visibility": "public",
27
- "python_version_minimum": "3.10",
25
+ "python_version_minimum": f"3.{template.python_versions.minor_min}",
28
26
  "user_name": "Ness",
29
27
  "user_email": "ness@onett.example.com",
30
28
  "github_user": "ness",
@@ -84,7 +82,7 @@ def session_render_template(
84
82
  )
85
83
  with disallow_subprocess.pause():
86
84
  copier.run_copy(
87
- src_path=str(TEMPLATE_ROOT),
85
+ src_path=str(template.dir),
88
86
  dst_path=str(worktree),
89
87
  data=data,
90
88
  vcs_ref=vcs_ref,
@@ -1,7 +1,7 @@
1
1
  # serializer version: 1
2
- # name: test_workflows_container[3.12-3.10]
2
+ # name: test_workflows_container[3.13-3.11]
3
3
  '''
4
- FROM python:3.12-slim AS builder
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.12-slim
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.12-3.12]
31
+ # name: test_workflows_container[3.13-3.13]
32
32
  '''
33
- FROM python:3.12-slim AS builder
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.12-slim
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.14-3.10]
60
+ # name: test_workflows_container[3.15-3.11]
61
61
  '''
62
- FROM python:3.14-slim AS builder
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.14-slim
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.14-3.12]
89
+ # name: test_workflows_container[3.15-3.13]
90
90
  '''
91
- FROM python:3.14-slim AS builder
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.14-slim
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.10]
118
+ # name: test_workflows_container[No maximum-3.11]
119
119
  '''
120
- FROM python:3.14-slim AS builder
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.14-slim
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.12]
147
+ # name: test_workflows_container[No maximum-3.13]
148
148
  '''
149
- FROM python:3.14-slim AS builder
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.14-slim
165
+ FROM python:3.15-slim
166
166
 
167
167
  COPY --from=builder /app/.venv /app/.venv
168
168