Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
# Changes here will be overwritten by Copier
_commit: 5.1.0
_commit: 5.5.0
_src_path: https://github.com/DiamondLightSource/python-copier-template.git
author_email: oliver.jones@diamond.ac.uk
author_name: Oli Jones
description: EPICS driver for the OceanOptics flame mini spectrometer
distribution_name: fastcsflame
docker: true
docker_debug: true
docs_type: README
git_platform: github.com
github_org: ''
Expand Down
2 changes: 1 addition & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ It is recommended that developers use a [vscode devcontainer](https://code.visua

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

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.1.0/how-to.html).
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.5.0/how-to.html).
12 changes: 6 additions & 6 deletions .github/workflows/_container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,25 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v5
uses: actions/checkout@v7
with:
# Need this to get version number from last tag
fetch-depth: 0

- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
uses: docker/setup-buildx-action@v4

- name: Log in to GitHub Docker Registry
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
uses: docker/login-action@v4
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and export to Docker local cache
uses: docker/build-push-action@v6
uses: docker/build-push-action@v7
env:
DOCKER_BUILD_RECORD_UPLOAD: false
with:
Expand All @@ -43,7 +43,7 @@ jobs:

- name: Create tags for publishing image
id: meta
uses: docker/metadata-action@v5
uses: docker/metadata-action@v6
with:
images: ghcr.io/${{ github.repository }}
tags: |
Expand All @@ -52,7 +52,7 @@ jobs:

- name: Push cached image to container registry
if: inputs.publish && github.ref_type == 'tag'
uses: docker/build-push-action@v6
uses: docker/build-push-action@v7
env:
DOCKER_BUILD_RECORD_UPLOAD: false
# This does not build the image again, it will find the image in the
Expand Down
49 changes: 0 additions & 49 deletions .github/workflows/_debug_container.yml

This file was deleted.

6 changes: 3 additions & 3 deletions .github/workflows/_dist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,21 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v5
uses: actions/checkout@v7
with:
# Need this to get version number from last tag
fetch-depth: 0

- name: Install uv
uses: astral-sh/setup-uv@v7
uses: astral-sh/setup-uv@v10.3.2

- name: Build sdist and wheel
run: >
export SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct) &&
uvx --from build pyproject-build

- name: Upload sdist and wheel as artifacts
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: dist
path: dist
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:

steps:
- name: Download artifacts
uses: actions/download-artifact@v5
uses: actions/download-artifact@v8
with:
merge-multiple: true

Expand All @@ -23,7 +23,7 @@ jobs:
- name: Create GitHub Release
# We pin to the SHA, not the tag, for security reasons.
# https://docs.github.com/en/actions/learn-github-actions/security-hardening-for-github-actions#using-third-party-actions
uses: softprops/action-gh-release@6da8fa9354ddfdc4aeace5fc48d7f679b5214090 # v2.4.1
uses: softprops/action-gh-release@efb35369e0ad2afab669f228072c1b0d510eae64 # v3.0.3
with:
prerelease: ${{ contains(github.ref_name, 'a') || contains(github.ref_name, 'b') || contains(github.ref_name, 'rc') }}
files: "*"
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,19 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v5
uses: actions/checkout@v7
with:
# Need this to get version number from last tag
fetch-depth: 0

- name: Install uv
uses: astral-sh/setup-uv@v7
uses: astral-sh/setup-uv@v10.3.2

- name: Run tests
run: uv run --locked tox -e tests

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
uses: codecov/codecov-action@v7
with:
name: ${{ inputs.python-version }}/${{ inputs.runs-on }}
files: cov.xml
4 changes: 2 additions & 2 deletions .github/workflows/_tox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v5
uses: actions/checkout@v7

- name: Install uv
uses: astral-sh/setup-uv@v7
uses: astral-sh/setup-uv@v10.3.2

- name: Run tox
run: uv run --locked tox -e ${{ inputs.tox }}
10 changes: 1 addition & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
tags:
- "*"
pull_request:
merge_group:

jobs:
lint:
Expand Down Expand Up @@ -35,15 +36,6 @@ jobs:
contents: read
packages: write

debug_container:
needs: [container, test]
uses: ./.github/workflows/_debug_container.yml
with:
publish: ${{ needs.test.result == 'success' }}
permissions:
contents: read
packages: write

dist:
uses: ./.github/workflows/_dist.yml

Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
rev: v6.0.0
hooks:
- id: check-added-large-files
exclude: ^uv.lock
Expand Down Expand Up @@ -32,6 +32,6 @@ repos:
files: ^(uv\.lock|pyproject\.toml)$

- repo: https://github.com/gitleaks/gitleaks
rev: v8.28.0
rev: v8.30.1
hooks:
- id: gitleaks
7 changes: 5 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# The devcontainer should use the developer target and run as root with podman
# or docker with user namespaces.
FROM ghcr.io/diamondlightsource/ubuntu-devcontainer:noble AS developer
FROM ghcr.io/diamondlightsource/ubuntu-devcontainer:resolute AS developer

# Add any system dependencies for the developer/build environment here
RUN apt-get update -y && apt-get install -y --no-install-recommends \
Expand All @@ -23,6 +23,7 @@ ENV UV_PYTHON_INSTALL_DIR=/python
RUN --mount=type=cache,target=/root/.cache/uv \
uv sync --locked --no-editable --no-dev --managed-python

<<<<<<< before updating

FROM build AS debug

Expand All @@ -46,8 +47,10 @@ ENTRYPOINT [ "/bin/bash", "-c", "--" ]
CMD [ "while true; do sleep 30; done;" ]


=======
>>>>>>> after updating
# The runtime stage copies the built venv into a runtime container
FROM ubuntu:noble AS runtime
FROM ubuntu:resolute AS runtime

# Add apt-get system dependecies for runtime here if needed
# RUN apt-get update -y && apt-get install -y --no-install-recommends \
Expand Down
5 changes: 4 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ requires-python = ">=3.11"

[dependency-groups]
dev = [
"copier",
"pre-commit",
"pyright",
"pytest",
Expand All @@ -46,6 +45,10 @@ GitHub = "https://github.com//fastcsflame"
email = "oliver.jones@diamond.ac.uk"
name = "Oli Jones"

[tool.uv]
# Minimum uv to fix eMudhra CA cert incident (see discuss.python.org/t/109576)
required-version = ">=0.13.5"

[tool.setuptools_scm]
version_file = "src/fastcsflame/_version.py"

Expand Down
11 changes: 11 additions & 0 deletions renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,17 @@
"github-actions"
],
"enabled": false
},
{
"description": "Disable Dockerfile base images that are managed by python-copier-template",
"matchManagers": [
"dockerfile"
],
"matchDepNames": [
"ubuntu",
"ghcr.io/diamondlightsource/ubuntu-devcontainer"
],
"enabled": false
}
]
}
Loading