Skip to content

Commit 13f67ee

Browse files
* Update dependency https://github.com/DiamondLightSource/python-copier-template to v5.0.0a4 * Fix merge conflict --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Tom C (DLS) <[email protected]>
1 parent 40c4430 commit 13f67ee

File tree

9 files changed

+28
-29
lines changed

9 files changed

+28
-29
lines changed

.copier-answers.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Changes here will be overwritten by Copier
2-
_commit: 5.0.0a3
2+
_commit: 5.0.0a4
33
_src_path: https://github.com/DiamondLightSource/python-copier-template
44
author_email: [email protected]
55
author_name: Tom Cobb

.devcontainer/devcontainer.json

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,22 @@
88
"remoteEnv": {
99
// Allow X11 apps to run inside the container
1010
"DISPLAY": "${localEnv:DISPLAY}",
11+
// Put things that allow it in the persistent cache
12+
"PRE_COMMIT_HOME": "/cache/pre-commit",
13+
"UV_CACHE_DIR": "/cache/uv",
14+
"UV_PYTHON_CACHE_DIR": "/cache/uv-python",
15+
// Make a venv that is specific for this workspace path as the cache is shared
16+
"UV_PROJECT_ENVIRONMENT": "/cache/venv-for${localWorkspaceFolder}",
1117
// Do the equivalent of "activate" the venv so we don't have to "uv run" everything
12-
"VIRTUAL_ENV": "/workspaces/${localWorkspaceFolderBasename}/.venv",
13-
"PATH": "/workspaces/${localWorkspaceFolderBasename}/.venv/bin:${containerEnv:PATH}"
18+
"VIRTUAL_ENV": "/cache/venv-for${localWorkspaceFolder}",
19+
"PATH": "/cache/venv-for${localWorkspaceFolder}/bin:${containerEnv:PATH}"
1420
},
1521
"customizations": {
1622
"vscode": {
1723
// Set *default* container specific settings.json values on container create.
1824
"settings": {
1925
// Use the container's python by default
20-
"python.defaultInterpreterPath": "/workspaces/${localWorkspaceFolderBasename}/.venv/bin/python",
26+
"python.defaultInterpreterPath": "/cache/venv-for${localWorkspaceFolder}/bin/python",
2127
// Don't activate the venv as it is already in the PATH
2228
"python.terminal.activateEnvInCurrentTerminal": false,
2329
"python.terminal.activateEnvironment": false,
@@ -47,9 +53,7 @@
4753
}
4854
},
4955
// Create the config folder for the bash-config feature and uv cache
50-
// NOTE: The uv cache can get large, DLS users should read
51-
// https://dev-guide.diamond.ac.uk/linux-user-environment/how-tos/disk-quota-troubleshooting
52-
"initializeCommand": "mkdir -p ${localEnv:HOME}/.config/terminal-config ${localEnv:HOME}/.cache/uv",
56+
"initializeCommand": "mkdir -p ${localEnv:HOME}/.config/terminal-config",
5357
"runArgs": [
5458
// Allow the container to access the host X11 display and EPICS CA
5559
"--net=host",
@@ -63,20 +67,15 @@
6367
"target": "/user-terminal-config",
6468
"type": "bind"
6569
},
66-
// Keep a persistent cross container cache for uv
70+
// Keep a persistent cross container cache for uv, pre-commit, and the venvs
6771
{
68-
"source": "${localEnv:HOME}/.cache/uv",
69-
"target": "/root/.cache/uv",
70-
"type": "bind"
71-
},
72-
// Use a volume mount for the uv venv so it is local to the container
73-
{
74-
"target": "/workspaces/${localWorkspaceFolderBasename}/.venv",
72+
"source": "devcontainer-shared-cache",
73+
"target": "/cache",
7574
"type": "volume"
7675
}
7776
],
7877
// Mount the parent as /workspaces so we can pip install peers as editable
7978
"workspaceMount": "source=${localWorkspaceFolder}/..,target=/workspaces,type=bind",
80-
// After the container is created, install the python project in editable form
81-
"postCreateCommand": "uv sync && uv run pre-commit install --install-hooks"
79+
// After the container is created, recreate the venv then make pre-commit first run faster
80+
"postCreateCommand": "uv venv --clear && uv sync && pre-commit install --install-hooks"
8281
}

.github/CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ It is recommended that developers use a [vscode devcontainer](https://code.visua
2424

2525
This project was created using the [Diamond Light Source Copier Template](https://github.com/DiamondLightSource/python-copier-template) for Python projects.
2626

27-
For more information on common tasks like setting up a developer environment, running the tests, and setting a pre-commit hook, see the template's [How-to guides](https://diamondlightsource.github.io/python-copier-template/5.0.0a3/how-to.html).
27+
For more information on common tasks like setting up a developer environment, running the tests, and setting a pre-commit hook, see the template's [How-to guides](https://diamondlightsource.github.io/python-copier-template/5.0.0a4/how-to.html).

.github/workflows/_dist.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ jobs:
77

88
steps:
99
- name: Checkout
10-
uses: actions/checkout@v4
10+
uses: actions/checkout@v5
1111
with:
1212
# Need this to get version number from last tag
1313
fetch-depth: 0
1414

1515
- name: Install uv
16-
uses: astral-sh/setup-uv@v6
16+
uses: astral-sh/setup-uv@v7
1717

1818
- name: Build sdist and wheel
1919
run: >

.github/workflows/_docs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
run: sleep 60
1313

1414
- name: Checkout
15-
uses: actions/checkout@v4
15+
uses: actions/checkout@v5
1616
with:
1717
# Need this to get version number from last tag
1818
fetch-depth: 0
@@ -21,7 +21,7 @@ jobs:
2121
run: sudo apt-get install graphviz
2222

2323
- name: Install uv
24-
uses: astral-sh/setup-uv@v5
24+
uses: astral-sh/setup-uv@v7
2525

2626
- name: Build docs
2727
run: uv run --locked tox -e docs

.github/workflows/_pypi.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88

99
steps:
1010
- name: Download dist artifact
11-
uses: actions/download-artifact@v4
11+
uses: actions/download-artifact@v5
1212
with:
1313
name: dist
1414
path: dist

.github/workflows/_release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77

88
steps:
99
- name: Download artifacts
10-
uses: actions/download-artifact@v4
10+
uses: actions/download-artifact@v5
1111
with:
1212
merge-multiple: true
1313

@@ -23,7 +23,7 @@ jobs:
2323
- name: Create GitHub Release
2424
# We pin to the SHA, not the tag, for security reasons.
2525
# https://docs.github.com/en/actions/learn-github-actions/security-hardening-for-github-actions#using-third-party-actions
26-
uses: softprops/action-gh-release@da05d552573ad5aba039eaac05058a918a7bf631 # v2.2.2
26+
uses: softprops/action-gh-release@6da8fa9354ddfdc4aeace5fc48d7f679b5214090 # v2.4.1
2727
with:
2828
prerelease: ${{ contains(github.ref_name, 'a') || contains(github.ref_name, 'b') || contains(github.ref_name, 'rc') }}
2929
files: "*"

.github/workflows/_test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535

3636
steps:
3737
- name: Checkout repository (with submodules)
38-
uses: actions/checkout@v4
38+
uses: actions/checkout@v5
3939
with:
4040
submodules: recursive
4141
fetch-depth: 0
@@ -47,7 +47,7 @@ jobs:
4747
echo "TEMP=D:\\Temp" >> $env:GITHUB_ENV
4848
4949
- name: Install uv
50-
uses: astral-sh/setup-uv@v5
50+
uses: astral-sh/setup-uv@v7
5151

5252
- if: inputs.needs-services && inputs.runs-on != 'windows-latest'
5353
name: Run docker compose

.github/workflows/_tox.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ jobs:
1313

1414
steps:
1515
- name: Checkout
16-
uses: actions/checkout@v4
16+
uses: actions/checkout@v5
1717

1818
- name: Install uv
19-
uses: astral-sh/setup-uv@v5
19+
uses: astral-sh/setup-uv@v7
2020

2121
- name: Run tox
2222
run: uv run --locked tox -e ${{ inputs.tox }}

0 commit comments

Comments
 (0)