Skip to content

Commit 1c71289

Browse files
fix: Move to long-form Github URLs (#260)
See epics-containers/services-template-helm#21 (comment) and the ADR in this PR for explanation.
2 parents 99dc4b6 + aa9f768 commit 1c71289

File tree

5 files changed

+24
-5
lines changed

5 files changed

+24
-5
lines changed

.github/workflows/_example.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
2121
- name: Rewrite copier answers
2222
run: |
23-
sed -i 's|_src_path: .|_src_path: gh:DiamondLightSource/python-copier-template|' example/.copier-answers.yml
23+
sed -i 's|_src_path: .|_src_path: https://github.com/DiamondLightSource/python-copier-template.git|' example/.copier-answers.yml
2424
2525
- name: Publish example
2626
# We pin to the SHA, not the tag, for security reasons.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ You will need to `pip install copier` inside an activated `venv` from python3.11
4848
```
4949
mkdir /path/to/my-project
5050
# The --trust argument is required to run setup tasks such as initializing a git repository
51-
copier copy --trust gh:DiamondLightSource/python-copier-template /path/to/my-project
51+
copier copy --trust https://github.com/DiamondLightSource/python-copier-template.git /path/to/my-project
5252
```
5353

5454
You can also use it via `pipx run copier` if you have that installed.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# 21. Use long-form URLs in documentation
2+
3+
Date: 2025-05-07
4+
5+
## Status
6+
7+
Accepted
8+
9+
## Context
10+
11+
Copier supports shortcut URLs (see [docs](https://copier.readthedocs.io/en/stable/generating)) of the form `gh:namespace/project`. This was convenient for making our documentation look neater and more digestible to new users, however it is just a convention. When trying to integrate other tools with copier we find that they do not necessarily support the convention. See [this discussion](https://github.com/renovatebot/renovate/discussions/35577) for example.
12+
13+
## Decision
14+
15+
Remove shortcut URLs from this repository and replace them with standard URLs.
16+
17+
## Consequences
18+
19+
Downstream projects following the documentation will be created with standard URLs and will be supported by renovate and other tools. The alternative solution is to open PRs to these tools so they too support the shortcuts. It was decided that it was quicker, easier and probably more architecturally correct to use long-form URLs since they are already a well-known and widely adopted standard. See [this discussion](https://github.com/epics-containers/services-template-helm/issues/21#issuecomment-2855125741).

docs/tutorials/adopt-existing.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Copier will *overwrite* files with the template files. Please check the changes
1818
If you have a [python3-pip-skeleton](https://github.com/DiamondLightSource/python3-pip-skeleton) based project then it is best to adopt the `1.0.0` release of this template, then `copier update` to get to the latest. This is because `copier update` will try and merge file changes across renames done between releases, while `copier copy` cannot. This looks like:
1919

2020
```shell
21-
copier copy gh:DiamondLightSource/python-copier-template --trust --vcs-ref=1.0.0 /path/to/existing-project
21+
copier copy https://github.com/DiamondLightSource/python-copier-template.git --trust --vcs-ref=1.0.0 /path/to/existing-project
2222
git diff
2323
# Examine the changes, put back anything you want to keep
2424
git commit -m "Adopt python-copier-template 1.0.0"
@@ -33,7 +33,7 @@ git commit -m "Update to python-copier-template x.x.x"
3333
If you have a project with a different structure then it is best to go straight to the latest release:
3434

3535
```shell
36-
copier copy --trust gh:DiamondLightSource/python-copier-template /path/to/existing-project
36+
copier copy --trust https://github.com/DiamondLightSource/python-copier-template.git /path/to/existing-project
3737
git diff
3838
# Examine the changes, put back anything you want to keep
3939
git commit -m "Adopt python-copier-template x.x.x"

docs/tutorials/create-new.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Once you have followed the [](./installation) tutorial, you can use `copier` to
44

55
```
66
$ mkdir /path/to/my-project
7-
$ copier copy --trust gh:DiamondLightSource/python-copier-template /path/to/my-project
7+
$ copier copy --trust https://github.com/DiamondLightSource/python-copier-template.git /path/to/my-project
88
```
99

1010
This will:

0 commit comments

Comments
 (0)