diff --git a/.copier-answers.yml b/.copier-answers.yml index 75d408a..f1b1a16 100644 --- a/.copier-answers.yml +++ b/.copier-answers.yml @@ -1,5 +1,5 @@ # Changes here will be overwritten by Copier -_commit: 5.0.3 +_commit: 5.4.0 _src_path: https://github.com/DiamondLightSource/python-copier-template.git author_email: n.leung@diamond.ac.uk author_name: Nathanael Leung @@ -10,7 +10,6 @@ description: Repository for useful python data analysis functions for the Diamon Imaging Group distribution_name: imaging_toolbox docker: true -docker_debug: false docs_type: README git_platform: github.com github_org: DiamondLightSource diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index c480c2a..8f5ee94 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -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.0.3/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.4.0/how-to.html). diff --git a/.github/workflows/_container.yml b/.github/workflows/_container.yml index 1d02e99..0446d2e 100644 --- a/.github/workflows/_container.yml +++ b/.github/workflows/_container.yml @@ -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: @@ -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: | @@ -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 diff --git a/.github/workflows/_dist.yml b/.github/workflows/_dist.yml index 9fdb47f..3b6d83f 100644 --- a/.github/workflows/_dist.yml +++ b/.github/workflows/_dist.yml @@ -7,13 +7,13 @@ 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.0.0 - name: Build sdist and wheel run: > @@ -21,7 +21,7 @@ jobs: 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 diff --git a/.github/workflows/_pypi.yml b/.github/workflows/_pypi.yml index fa8bee5..8082f8b 100644 --- a/.github/workflows/_pypi.yml +++ b/.github/workflows/_pypi.yml @@ -8,7 +8,11 @@ jobs: steps: - name: Download dist artifact +<<<<<<< before updating uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8 +======= + uses: actions/download-artifact@v8 +>>>>>>> after updating with: name: dist path: dist diff --git a/.github/workflows/_release.yml b/.github/workflows/_release.yml index 07f316d..7930cd4 100644 --- a/.github/workflows/_release.yml +++ b/.github/workflows/_release.yml @@ -7,7 +7,11 @@ jobs: steps: - name: Download artifacts +<<<<<<< before updating uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8 +======= + uses: actions/download-artifact@v8 +>>>>>>> after updating with: merge-multiple: true @@ -23,7 +27,11 @@ 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 +<<<<<<< before updating uses: softprops/action-gh-release@718ea10b132b3b2eba29c1007bb80653f286566b # v3.0.1 +======= + uses: softprops/action-gh-release@3d0d9888cb7fd7b750713d6e236d1fcb99157228 # v3.0.2 +>>>>>>> after updating with: prerelease: ${{ contains(github.ref_name, 'a') || contains(github.ref_name, 'b') || contains(github.ref_name, 'rc') }} name: ${{ github.ref_name }} diff --git a/.github/workflows/_test.yml b/.github/workflows/_test.yml index 46cd49d..8ebceb8 100644 --- a/.github/workflows/_test.yml +++ b/.github/workflows/_test.yml @@ -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.0.0 - 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 diff --git a/.github/workflows/_tox.yml b/.github/workflows/_tox.yml index 56eddd4..e7abe84 100644 --- a/.github/workflows/_tox.yml +++ b/.github/workflows/_tox.yml @@ -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.0.0 - name: Run tox run: uv run --locked tox -e ${{ inputs.tox }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9aebf4a..34af076 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,7 +18,7 @@ jobs: strategy: matrix: runs-on: ["ubuntu-latest"] # can add windows-latest, macos-latest - python-version: ["3.11", "3.12", "3.13"] + python-version: ["3.11", "3.12", "3.13", "3.14"] fail-fast: false uses: ./.github/workflows/_test.yml with: diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a43ed57..10d7415 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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 @@ -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 diff --git a/Dockerfile b/Dockerfile index 091cd30..ae86246 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 \ @@ -23,7 +23,6 @@ ENV UV_PYTHON_INSTALL_DIR=/python RUN --mount=type=cache,target=/root/.cache/uv \ uv sync --locked --no-editable --no-dev --managed-python --extra workflows - # The runtime stage copies the built venv into a runtime container FROM ubuntu:resolute AS runtime diff --git a/pyproject.toml b/pyproject.toml index d8c6a1f..85212b8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,11 +5,20 @@ build-backend = "setuptools.build_meta" [project] name = "imaging_toolbox" classifiers = [ +<<<<<<< before updating "Development Status :: 3 - Alpha", "License :: OSI Approved :: Apache Software License", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", +======= + "Development Status :: 3 - Alpha", + "License :: OSI Approved :: Apache Software License", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", +>>>>>>> after updating ] description = "Repository for useful python data analysis functions for the Diamond Imaging Group" dependencies = ["numpy", "scikit-image", "scipy", "scipy-stubs"] @@ -23,6 +32,7 @@ workflows = ["jupyter", "papermill", "matplotlib", "nbconvert", "h5py"] [dependency-groups] dev = [ +<<<<<<< before updating "copier", "pre-commit", "pyright", @@ -31,6 +41,15 @@ dev = [ "ruff", "tox-uv", "types-mock", +======= + "pre-commit", + "pyright", + "pytest", + "pytest-cov", + "ruff", + "tox-uv", + "types-mock", +>>>>>>> after updating ] [project.scripts] diff --git a/renovate.json b/renovate.json index 376b9a8..144ee22 100644 --- a/renovate.json +++ b/renovate.json @@ -35,6 +35,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 } ] }