Skip to content

Commit 718a485

Browse files
coretlclaude
andauthored
fix: copier should not be a dev dependency (#364)
## Summary `copier` should not be installed as a dev dependency of *generated* projects — it should be invoked via `uvx copier` instead. This PR removes it from the template's dev dependency group and updates the docs to recommend `uvx copier update`. - `template/pyproject.toml.jinja`: removed `"copier"` from the `dev` dependency-group list. - `docs/how-to/update-template.md`: changed the two bare `copier update` invocations to `uvx copier update`. - `.github/CONTRIBUTING.md`: changed `copier update --vcs-ref=<branch_name>` to `uvx copier update --vcs-ref=<branch_name>`. ## Deliberately left untouched - Root `pyproject.toml` — this template repo's own test suite imports `copier` (`from copier import run_copy`), so it legitimately needs `copier` as a dev dependency here. - `tests/test_example.py` — its bare `copier update` call runs in this repo's own dev environment, not inside a generated project. - Tutorial docs (`docs/tutorials/adopt-existing.md`, `docs/tutorials/create-new.md`) and prose/comment mentions of "copier" — already correct or out of scope. ## Testing - `uv run --locked tox -e pre-commit` — passed. - `uv run --locked tox -e tests` — 5 pre-existing failures unrelated to this change (sandbox network proxy blocks a docs-build version-switcher request to `diamondlightsource.github.io`, and one test has a version-string mismatch from running off an untagged commit rather than a release tag). No failures caused by this change; `test_example_repo_updates`'s actual file-content diff was clean aside from that unrelated version string. Closes #343 --- _Generated by [Claude Code](https://claude.ai/code/session_01VuHBQ1iEZogr1q7VBjA2iL)_ Co-authored-by: Claude <noreply@anthropic.com>
1 parent b8caef5 commit 718a485

3 files changed

Lines changed: 3 additions & 4 deletions

File tree

.github/CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ The template has tests for:
2020
However, this does not test whether processes like CI and docs work correctly. You can ensure that these are checked by:
2121

2222
- Making your changes on a branch of <https://github.com/DiamondLightSource/python-copier-template>
23-
- Running `copier update --vcs-ref=<branch_name>` in the repo where you would like to demonstrate the behaviour
23+
- Running `uvx copier update --vcs-ref=<branch_name>` in the repo where you would like to demonstrate the behaviour
2424
- Linking to that demonstration repo in the PR
2525

2626
## Developer Information

docs/how-to/update-template.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
To track changes to the upstream template, run
66

77
```
8-
copier update
8+
uvx copier update
99
```
1010

1111
This will fetch the latest tagged release of the template, and apply any changes to your working copy. It will prompt for answers again, giving your previous answers as the defaults.
@@ -32,7 +32,7 @@ The following steps are recommended to update your project, especially for infre
3232
- fix issues found by the above
3333
- commit the changes
3434
- update the template
35-
- `copier update`
35+
- `uvx copier update`
3636
- fix any merge conflicts
3737
- validate that the project still works
3838
- `tox -p`

template/pyproject.toml.jinja

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ requires-python = ">=3.11"
2121

2222
[dependency-groups]
2323
dev = [
24-
"copier",
2524
{% if type_checker=="mypy" %}"mypy",
2625
{% endif %}{% if sphinx %}"myst-parser",
2726
{% endif %}"pre-commit",

0 commit comments

Comments
 (0)