copier-python 0.19.0__tar.gz → 0.20.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.19.0 → copier_python-0.20.0}/CONTRIBUTING.md +8 -0
- {copier_python-0.19.0 → copier_python-0.20.0}/PKG-INFO +8 -1
- {copier_python-0.19.0 → copier_python-0.20.0}/README.md +7 -0
- {copier_python-0.19.0 → copier_python-0.20.0}/tests/conftest.py +15 -5
- copier_python-0.20.0/tests/template/__snapshots__/test_agents.ambr +71 -0
- copier_python-0.20.0/tests/template/__snapshots__/test_contributing.ambr +994 -0
- copier_python-0.20.0/tests/template/__snapshots__/test_pre_commit.ambr +171 -0
- {copier_python-0.19.0 → copier_python-0.20.0}/tests/template/__snapshots__/test_pyproject.ambr +51 -0
- {copier_python-0.19.0 → copier_python-0.20.0}/tests/template/__snapshots__/test_workflows.ambr +161 -60
- copier_python-0.20.0/tests/template/test_agents.py +21 -0
- copier_python-0.20.0/tests/template/test_commit_check.py +29 -0
- {copier_python-0.19.0 → copier_python-0.20.0}/tests/template/test_contributing.py +10 -3
- {copier_python-0.19.0 → copier_python-0.20.0}/tests/template/test_docs.py +2 -2
- {copier_python-0.19.0 → copier_python-0.20.0}/tests/template/test_license.py +3 -24
- copier_python-0.20.0/tests/template/test_pre_commit.py +25 -0
- {copier_python-0.19.0 → copier_python-0.20.0}/tests/template/test_pyproject.py +2 -2
- {copier_python-0.19.0 → copier_python-0.20.0}/tests/template/test_readme.py +2 -2
- copier_python-0.20.0/tests/template/test_structure.py +185 -0
- copier_python-0.20.0/tests/template/test_template.py +170 -0
- {copier_python-0.19.0 → copier_python-0.20.0}/tests/template/test_workflows.py +1 -7
- {copier_python-0.19.0 → copier_python-0.20.0}/tests/utils.py +9 -7
- copier_python-0.19.0/tests/template/__snapshots__/test_agents.ambr +0 -15
- copier_python-0.19.0/tests/template/__snapshots__/test_contributing.ambr +0 -506
- copier_python-0.19.0/tests/template/test_agents.py +0 -13
- copier_python-0.19.0/tests/template/test_structure.py +0 -107
- copier_python-0.19.0/tests/template/test_template.py +0 -22
- {copier_python-0.19.0 → copier_python-0.20.0}/.gitignore +0 -0
- {copier_python-0.19.0 → copier_python-0.20.0}/AGENTS.md +0 -0
- {copier_python-0.19.0 → copier_python-0.20.0}/LICENSE +0 -0
- {copier_python-0.19.0 → copier_python-0.20.0}/copier_python/__init__.py +0 -0
- {copier_python-0.19.0 → copier_python-0.20.0}/copier_python/__main__.py +0 -0
- {copier_python-0.19.0 → copier_python-0.20.0}/copier_python/py.typed +0 -0
- {copier_python-0.19.0 → copier_python-0.20.0}/copier_python/repo.py +0 -0
- {copier_python-0.19.0 → copier_python-0.20.0}/copier_python/update.py +0 -0
- {copier_python-0.19.0 → copier_python-0.20.0}/docs/contributing.md +0 -0
- {copier_python-0.19.0 → copier_python-0.20.0}/docs/development/requirements.md +0 -0
- {copier_python-0.19.0 → copier_python-0.20.0}/docs/development/updates.md +0 -0
- {copier_python-0.19.0 → copier_python-0.20.0}/docs/development/workflow.md +0 -0
- {copier_python-0.19.0 → copier_python-0.20.0}/docs/index.md +0 -0
- {copier_python-0.19.0 → copier_python-0.20.0}/docs/license.md +0 -0
- {copier_python-0.19.0 → copier_python-0.20.0}/docs/project-creation.md +0 -0
- {copier_python-0.19.0 → copier_python-0.20.0}/docs/project-development.md +0 -0
- {copier_python-0.19.0 → copier_python-0.20.0}/docs/project-release.md +0 -0
- {copier_python-0.19.0 → copier_python-0.20.0}/docs/project-setup.md +0 -0
- {copier_python-0.19.0 → copier_python-0.20.0}/docs/project-updates.md +0 -0
- {copier_python-0.19.0 → copier_python-0.20.0}/docs/releasing.md +0 -0
- {copier_python-0.19.0 → copier_python-0.20.0}/docs/requirements.md +0 -0
- {copier_python-0.19.0 → copier_python-0.20.0}/docs/setup.md +0 -0
- {copier_python-0.19.0 → copier_python-0.20.0}/pyproject.toml +0 -0
- {copier_python-0.19.0 → copier_python-0.20.0}/tests/__init__.py +0 -0
- {copier_python-0.19.0 → copier_python-0.20.0}/tests/template/__init__.py +0 -0
- {copier_python-0.19.0 → copier_python-0.20.0}/tests/template/__snapshots__/test_compose.ambr +0 -0
- {copier_python-0.19.0 → copier_python-0.20.0}/tests/template/__snapshots__/test_dockerfile.ambr +0 -0
- {copier_python-0.19.0 → copier_python-0.20.0}/tests/template/__snapshots__/test_docs.ambr +0 -0
- {copier_python-0.19.0 → copier_python-0.20.0}/tests/template/__snapshots__/test_license.ambr +0 -0
- {copier_python-0.19.0 → copier_python-0.20.0}/tests/template/__snapshots__/test_mise_toml.ambr +0 -0
- {copier_python-0.19.0 → copier_python-0.20.0}/tests/template/__snapshots__/test_readme.ambr +0 -0
- {copier_python-0.19.0 → copier_python-0.20.0}/tests/template/__snapshots__/test_zensical.ambr +0 -0
- {copier_python-0.19.0 → copier_python-0.20.0}/tests/template/test_compose.py +0 -0
- {copier_python-0.19.0 → copier_python-0.20.0}/tests/template/test_dockerfile.py +0 -0
- {copier_python-0.19.0 → copier_python-0.20.0}/tests/template/test_mise_toml.py +0 -0
- {copier_python-0.19.0 → copier_python-0.20.0}/tests/template/test_zensical.py +0 -0
- {copier_python-0.19.0 → copier_python-0.20.0}/tests/test_update.py +0 -0
- {copier_python-0.19.0 → copier_python-0.20.0}/tests/test_version.py +0 -0
|
@@ -13,3 +13,11 @@ Thank you for your time and interest in improving
|
|
|
13
13
|
for submitting pull requests
|
|
14
14
|
* **Issue tracker**: <https://github.com/smkent/copier-python/issues>
|
|
15
15
|
for questions or bug reports
|
|
16
|
+
|
|
17
|
+
## Contribution terms
|
|
18
|
+
|
|
19
|
+
By submitting a contribution to copier-python, you agree that it is
|
|
20
|
+
licensed under the project's license, the
|
|
21
|
+
[MIT License](https://github.com/smkent/copier-python/blob/main/LICENSE),
|
|
22
|
+
with no additional terms,
|
|
23
|
+
and that you have the right to submit it under that license.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: copier-python
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.20.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
|
|
@@ -81,6 +81,11 @@ copier copy "gh:smkent/copier-python" /new/project/path
|
|
|
81
81
|
* [**pytest**][pytest] test framework with [**codecov.io**][codecovio] support
|
|
82
82
|
* [**Zensical**][zensical] project documentation with automatic deployment to
|
|
83
83
|
[**GitHub Pages**][github-pages]
|
|
84
|
+
* Contribution terms including selectable LLM use policy, with commit message
|
|
85
|
+
checks by [**commit-check**][commit-check]
|
|
86
|
+
|
|
87
|
+
[![commit-check][commit-check-badge]][commit-check]
|
|
88
|
+
|
|
84
89
|
|
|
85
90
|
## Credits
|
|
86
91
|
|
|
@@ -96,6 +101,8 @@ Licensed under the MIT License
|
|
|
96
101
|
|
|
97
102
|
[astral]: https://astral.sh
|
|
98
103
|
[codecovio]: https://codecov.io
|
|
104
|
+
[commit-check]: https://commit-check.com
|
|
105
|
+
[commit-check-badge]: https://commit-check.com/badge.svg
|
|
99
106
|
[copier-astral]: https://ritwiktiwari.github.io/copier-astral/
|
|
100
107
|
[copier-badge]: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/copier-org/copier/master/img/badge/badge-grayscale-inverted-border-purple.json
|
|
101
108
|
[copier-update]: https://copier.readthedocs.io/en/stable/updating/
|
|
@@ -51,6 +51,11 @@ copier copy "gh:smkent/copier-python" /new/project/path
|
|
|
51
51
|
* [**pytest**][pytest] test framework with [**codecov.io**][codecovio] support
|
|
52
52
|
* [**Zensical**][zensical] project documentation with automatic deployment to
|
|
53
53
|
[**GitHub Pages**][github-pages]
|
|
54
|
+
* Contribution terms including selectable LLM use policy, with commit message
|
|
55
|
+
checks by [**commit-check**][commit-check]
|
|
56
|
+
|
|
57
|
+
[![commit-check][commit-check-badge]][commit-check]
|
|
58
|
+
|
|
54
59
|
|
|
55
60
|
## Credits
|
|
56
61
|
|
|
@@ -66,6 +71,8 @@ Licensed under the MIT License
|
|
|
66
71
|
|
|
67
72
|
[astral]: https://astral.sh
|
|
68
73
|
[codecovio]: https://codecov.io
|
|
74
|
+
[commit-check]: https://commit-check.com
|
|
75
|
+
[commit-check-badge]: https://commit-check.com/badge.svg
|
|
69
76
|
[copier-astral]: https://ritwiktiwari.github.io/copier-astral/
|
|
70
77
|
[copier-badge]: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/copier-org/copier/master/img/badge/badge-grayscale-inverted-border-purple.json
|
|
71
78
|
[copier-update]: https://copier.readthedocs.io/en/stable/updating/
|
|
@@ -2,6 +2,7 @@ from __future__ import annotations
|
|
|
2
2
|
|
|
3
3
|
import subprocess
|
|
4
4
|
import warnings
|
|
5
|
+
from functools import partial
|
|
5
6
|
from pathlib import Path
|
|
6
7
|
from typing import TYPE_CHECKING, Any
|
|
7
8
|
|
|
@@ -38,7 +39,7 @@ def ensure_env() -> None:
|
|
|
38
39
|
setup_env()
|
|
39
40
|
|
|
40
41
|
|
|
41
|
-
@pytest.fixture(autouse=True)
|
|
42
|
+
@pytest.fixture(autouse=True, scope="session")
|
|
42
43
|
def disallow_subprocess(
|
|
43
44
|
request: pytest.FixtureRequest,
|
|
44
45
|
) -> Iterator[DisallowCallable]:
|
|
@@ -46,18 +47,19 @@ def disallow_subprocess(
|
|
|
46
47
|
yield mock
|
|
47
48
|
|
|
48
49
|
|
|
49
|
-
@pytest.fixture
|
|
50
|
+
@pytest.fixture(scope="session")
|
|
50
51
|
def allow_subprocess(disallow_subprocess: DisallowCallable) -> Iterator[None]:
|
|
51
52
|
with disallow_subprocess.pause():
|
|
52
53
|
yield
|
|
53
54
|
|
|
54
55
|
|
|
55
|
-
@pytest.fixture
|
|
56
|
-
def
|
|
57
|
-
|
|
56
|
+
@pytest.fixture(scope="session")
|
|
57
|
+
def session_render_template(
|
|
58
|
+
disallow_subprocess: DisallowCallable,
|
|
58
59
|
) -> Callable[..., Path]:
|
|
59
60
|
def _render(
|
|
60
61
|
*,
|
|
62
|
+
tmp_path: Path,
|
|
61
63
|
vcs_ref: str = "HEAD",
|
|
62
64
|
previous_answers: dict[str, Any] | None = None,
|
|
63
65
|
**kwargs: Any,
|
|
@@ -93,3 +95,11 @@ def render_template(
|
|
|
93
95
|
return worktree
|
|
94
96
|
|
|
95
97
|
return _render
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
@pytest.fixture
|
|
101
|
+
def render_template(
|
|
102
|
+
session_render_template: Callable[..., Path],
|
|
103
|
+
tmp_path: Path,
|
|
104
|
+
) -> Callable[..., Path]:
|
|
105
|
+
return partial(session_render_template, tmp_path=tmp_path)
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# serializer version: 1
|
|
2
|
+
# name: test_agents[accepted-with-disclosure]
|
|
3
|
+
'''
|
|
4
|
+
# Environment/Tools
|
|
5
|
+
|
|
6
|
+
* `mise` manages dev tools and tasks, including `uv` which manages Python and dependencies.
|
|
7
|
+
* Use `uv add`/`uv run python` instead of bare `pip`/`python`
|
|
8
|
+
* `mise install`: After-clone setup (install tools, dependencies, pre-commit hooks)
|
|
9
|
+
* `mise run lint`: Pre-commit hooks (via `pre-commit`-compatible `prek`) including lint, format, type check (ruff, ty)
|
|
10
|
+
* `mise run test`: Run tests (accepts pytest arguments)
|
|
11
|
+
* `mise run lt`: Lint+test (no arguments)
|
|
12
|
+
* `mise run snapup`: Update test snapshots (syrupy, accepts pytest arguments)
|
|
13
|
+
|
|
14
|
+
# Commit conventions
|
|
15
|
+
|
|
16
|
+
* Keep commit messages concise and in plain language, so a maintainer can
|
|
17
|
+
quickly understand the change. Use a short subject, and add a body only when
|
|
18
|
+
the change needs explaining, in a few lines about why. Don't list changed
|
|
19
|
+
files, restate the diff, or report test results.
|
|
20
|
+
* If a commit contains code or text largely generated by an LLM, add an
|
|
21
|
+
`Assisted-by: <tool>:<model>` trailer, for example with `git commit --trailer`.
|
|
22
|
+
* Don't add `Co-authored-by` or `Signed-off-by` lines for LLM tools, links to
|
|
23
|
+
LLM sessions, or promotional lines such as "Generated with [...]".
|
|
24
|
+
|
|
25
|
+
# Submitting contributions
|
|
26
|
+
|
|
27
|
+
* You may commit locally without asking. Before submitting anything, such as
|
|
28
|
+
pushing commits or creating or editing a pull request, issue, or comment,
|
|
29
|
+
show the user (who is the contributor) exactly what will be submitted, and
|
|
30
|
+
wait for their explicit approval. Submit it as approved. This includes but is
|
|
31
|
+
not limited to commit messages, titles, and bodies.
|
|
32
|
+
* Keep titles and descriptions short and specific. Don't restate what the diff
|
|
33
|
+
already shows.
|
|
34
|
+
|
|
35
|
+
'''
|
|
36
|
+
# ---
|
|
37
|
+
# name: test_agents[accepted]
|
|
38
|
+
'''
|
|
39
|
+
# Environment/Tools
|
|
40
|
+
|
|
41
|
+
* `mise` manages dev tools and tasks, including `uv` which manages Python and dependencies.
|
|
42
|
+
* Use `uv add`/`uv run python` instead of bare `pip`/`python`
|
|
43
|
+
* `mise install`: After-clone setup (install tools, dependencies, pre-commit hooks)
|
|
44
|
+
* `mise run lint`: Pre-commit hooks (via `pre-commit`-compatible `prek`) including lint, format, type check (ruff, ty)
|
|
45
|
+
* `mise run test`: Run tests (accepts pytest arguments)
|
|
46
|
+
* `mise run lt`: Lint+test (no arguments)
|
|
47
|
+
* `mise run snapup`: Update test snapshots (syrupy, accepts pytest arguments)
|
|
48
|
+
|
|
49
|
+
'''
|
|
50
|
+
# ---
|
|
51
|
+
# name: test_agents[not-accepted]
|
|
52
|
+
'''
|
|
53
|
+
# Environment/Tools
|
|
54
|
+
|
|
55
|
+
* `mise` manages dev tools and tasks, including `uv` which manages Python and dependencies.
|
|
56
|
+
* Use `uv add`/`uv run python` instead of bare `pip`/`python`
|
|
57
|
+
* `mise install`: After-clone setup (install tools, dependencies, pre-commit hooks)
|
|
58
|
+
* `mise run lint`: Pre-commit hooks (via `pre-commit`-compatible `prek`) including lint, format, type check (ruff, ty)
|
|
59
|
+
* `mise run test`: Run tests (accepts pytest arguments)
|
|
60
|
+
* `mise run lt`: Lint+test (no arguments)
|
|
61
|
+
* `mise run snapup`: Update test snapshots (syrupy, accepts pytest arguments)
|
|
62
|
+
|
|
63
|
+
# LLM use
|
|
64
|
+
|
|
65
|
+
This project does not accept code or text generated by an LLM. Everything
|
|
66
|
+
submitted to the project, including code, commit messages, and pull request or
|
|
67
|
+
issue text, must be written by the user (who is the contributor). Explain,
|
|
68
|
+
review, run commands, and help plan instead.
|
|
69
|
+
|
|
70
|
+
'''
|
|
71
|
+
# ---
|