Skip to content

Commit 33cae30

Browse files
committed
update to copier 2.5.0
1 parent cb9df61 commit 33cae30

38 files changed

+226
-87
lines changed

.copier-answers.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
# Changes here will be overwritten by Copier
2-
_commit: 1.3.0
2+
_commit: 2.5.0
33
_src_path: gh:DiamondLightSource/python-copier-template
44
author_email: [email protected]
55
author_name: Giles Knap
6+
component_lifecycle: production
67
component_owner: group:default/sscc
8+
component_type: user-interface
79
description: GUI for low level control and monitoring of turbo pmac and power pmac
810
motion controllers
911
distribution_name: dls-pmaccontrol
@@ -12,5 +14,6 @@ docs_type: sphinx
1214
git_platform: github.com
1315
github_org: DiamondLightSource
1416
package_name: dls_pmac_control
17+
pypi: true
1518
repo_name: dls-pmac-control
1619
type_checker: mypy

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,4 @@
4343
"workspaceMount": "source=${localWorkspaceFolder}/..,target=/workspaces,type=bind",
4444
// After the container is created, install the python project in editable form
4545
"postCreateCommand": "pip install $([ -f dev-requirements.txt ] && echo '-c dev-requirements.txt') -e '.[dev]' && pre-commit install"
46-
}
46+
}

.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/1.3.0/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/2.5.0/how-to.html).
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
name: Bug Report
3+
about: The template to use for reporting bugs and usability issues
4+
title: " "
5+
labels: 'bug'
6+
assignees: ''
7+
8+
---
9+
10+
Describe the bug, including a clear and concise description of the expected behavior, the actual behavior and the context in which you encountered it (ideally include details of your environment).
11+
12+
## Steps To Reproduce
13+
Steps to reproduce the behavior:
14+
1. Go to '...'
15+
2. Click on '....'
16+
3. Scroll down to '....'
17+
4. See error
18+
19+
20+
## Acceptance Criteria
21+
- Specific criteria that will be used to judge if the issue is fixed

.github/ISSUE_TEMPLATE/issue.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
name: Issue
3+
about: The standard template to use for feature requests, design discussions and tasks
4+
title: " "
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
A brief description of the issue, including specific stakeholders and the business case where appropriate
11+
12+
## Acceptance Criteria
13+
- Specific criteria that will be used to judge if the issue is fixed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Fixes #ISSUE
2+
3+
### Instructions to reviewer on how to test:
4+
1. Do thing x
5+
2. Confirm thing y happens
6+
7+
### Checks for reviewer
8+
- [ ] Would the PR title make sense to a user on a set of release notes

.github/pages/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@
88
<link rel="canonical" href="main/index.html">
99
</head>
1010

11-
</html>
11+
</html>

.github/pages/make_switcher.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
1+
"""Make switcher.json to allow docs to switch between different versions."""
2+
13
import json
24
import logging
35
from argparse import ArgumentParser
46
from pathlib import Path
57
from subprocess import CalledProcessError, check_output
6-
from typing import Optional
78

89

910
def report_output(stdout: bytes, label: str) -> list[str]:
11+
"""Print and return something received frm stdout."""
1012
ret = stdout.decode().strip().split("\n")
1113
print(f"{label}: {ret}")
1214
return ret
@@ -24,7 +26,7 @@ def get_sorted_tags_list() -> list[str]:
2426
return report_output(stdout, "Tags list")
2527

2628

27-
def get_versions(ref: str, add: Optional[str]) -> list[str]:
29+
def get_versions(ref: str, add: str | None) -> list[str]:
2830
"""Generate the file containing the list of all GitHub Pages builds."""
2931
# Get the directories (i.e. builds) from the GitHub Pages branch
3032
try:
@@ -53,7 +55,8 @@ def get_versions(ref: str, add: Optional[str]) -> list[str]:
5355
return versions
5456

5557

56-
def write_json(path: Path, repository: str, versions: str):
58+
def write_json(path: Path, repository: str, versions: list[str]):
59+
"""Write the JSON switcher to path."""
5760
org, repo_name = repository.split("/")
5861
struct = [
5962
{"version": version, "url": f"https://{org}.github.io/{repo_name}/{version}/"}
@@ -65,6 +68,7 @@ def write_json(path: Path, repository: str, versions: str):
6568

6669

6770
def main(args=None):
71+
"""Parse args and write switcher."""
6872
parser = ArgumentParser(
6973
description="Make a versions.json file from gh-pages directories"
7074
)

.github/workflows/_container.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ jobs:
2525
password: ${{ secrets.GITHUB_TOKEN }}
2626

2727
- name: Build and export to Docker local cache
28-
uses: docker/build-push-action@v5
28+
uses: docker/build-push-action@v6
29+
env:
30+
DOCKER_BUILD_RECORD_UPLOAD: false
2931
with:
3032
context: .
3133
# Need load and tags so we can test it below
@@ -46,7 +48,9 @@ jobs:
4648
4749
- name: Push cached image to container registry
4850
if: github.ref_type == 'tag'
49-
uses: docker/build-push-action@v5
51+
uses: docker/build-push-action@v6
52+
env:
53+
DOCKER_BUILD_RECORD_UPLOAD: false
5054
# This does not build the image again, it will find the image in the
5155
# Docker cache and publish it
5256
with:

.github/workflows/_docs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ jobs:
4747
if: github.ref_type == 'tag' || github.ref_name == 'main'
4848
# We pin to the SHA, not the tag, for security reasons.
4949
# https://docs.github.com/en/actions/learn-github-actions/security-hardening-for-github-actions#using-third-party-actions
50-
uses: peaceiris/actions-gh-pages@373f7f263a76c20808c831209c920827a82a2847 # v3.9.3
50+
uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4.0.0
5151
with:
5252
github_token: ${{ secrets.GITHUB_TOKEN }}
5353
publish_dir: .github/pages
54-
keep_files: true
54+
keep_files: true

0 commit comments

Comments
 (0)