Skip to content
Merged
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
8 changes: 4 additions & 4 deletions .devcontainer/devcontainer-lock.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"features": {
"ghcr.io/devcontainers/features/python:1.6.5": {
"version": "1.6.5",
"resolved": "ghcr.io/devcontainers/features/python@sha256:f5e1557b5745bcc3aa8f12eaa1084b8d63952d73e776c406214d65f593aae6d8",
"integrity": "sha256:f5e1557b5745bcc3aa8f12eaa1084b8d63952d73e776c406214d65f593aae6d8"
"ghcr.io/devcontainers/features/python:1.7.1": {
"version": "1.7.1",
"resolved": "ghcr.io/devcontainers/features/python@sha256:cf9b6d879790a594b459845b207c5e1762a0c8f954bb8033ff396e497f9c301b",
"integrity": "sha256:cf9b6d879790a594b459845b207c5e1762a0c8f954bb8033ff396e497f9c301b"
}
}
}
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"image": "mcr.microsoft.com/devcontainers/universal:2",
"features": {
"ghcr.io/devcontainers/features/python:1.6.5": {
"ghcr.io/devcontainers/features/python:1.7.1": {
"version": "3.12",
"installTools": false
}
Expand Down
2 changes: 1 addition & 1 deletion .github/dependabot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ updates:
patterns:
- "*"

- package-ecosystem: "pip"
- package-ecosystem: "uv"
directory: "/"
schedule:
interval: "monthly"
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/container-build-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ permissions:

jobs:
build-push:
uses: darbiadev/.github/.github/workflows/container-build-push.yaml@41518576ed6c499ed3e68d5cbceaeaa50abd471a # v14.1.0
with:
file-name: Dockerfile
uses: darbiadev/.github/.github/workflows/container-build-push.yaml@91dda16028f109ac78016dd740206fd109740068 # v15.0.0

deploy:
needs: build-push
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dependency-review.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ jobs:
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: "Dependency Review"
uses: actions/dependency-review-action@3b139cfc5fae8b618d3eae3675e383bb1769c019 # v4.5.0
uses: actions/dependency-review-action@ce3cf9537a52e8119d91fd484ab5b8a807627bf8 # v4.6.0
with:
config-file: darbiadev/.github/.github/dependency-review-config.yaml@main
6 changes: 3 additions & 3 deletions .github/workflows/python-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Setup Python
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0
with:
python-version: 3.12
allow-prereleases: true
Expand Down Expand Up @@ -44,7 +44,7 @@ jobs:
run: uv run python -m coverage run -m pytest -v

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@015f24e6818733317a2da2edd6290ab26238649a # v5.0.7
uses: codecov/codecov-action@0565863a31f2c772f9f0395002a31e3f06189574 # v5.4.0
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

Expand All @@ -55,4 +55,4 @@ jobs:
pages: write
id-token: write

uses: darbiadev/.github/.github/workflows/github-pages-python-sphinx.yaml@41518576ed6c499ed3e68d5cbceaeaa50abd471a # v14.1.0
uses: darbiadev/.github/.github/workflows/github-pages-python-sphinx.yaml@91dda16028f109ac78016dd740206fd109740068 # v15.0.0
2 changes: 1 addition & 1 deletion .github/workflows/sentry-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: "Create Sentry release"
uses: getsentry/action-release@e769183448303de84c5a06aaaddf9da7be26d6c7 # v1.7.0
uses: getsentry/action-release@00ed2a6cc2171514e031a0f5b4b3cdc586dc171a # v3.1.1
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ORG: ${{ vars.SENTRY_ORG }}
Expand Down
21 changes: 6 additions & 15 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
repos:
- repo: meta
hooks:
- id: check-hooks-apply
- id: check-useless-excludes

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
Expand All @@ -15,20 +20,6 @@ repos:
exclude: .devcontainer/devcontainer-lock.json

- repo: https://github.com/astral-sh/uv-pre-commit
rev: 0.5.4
rev: 0.6.13
hooks:
- id: uv-lock
- id: uv-export
args:
- --frozen
- --no-emit-project
- --output-file=requirements.txt
files: pyproject.toml|uv.lock
- id: uv-export
args:
- --frozen
- --no-emit-project
- --all-extras
- --all-groups
- --output-file=requirements-dependabot.txt
files: pyproject.toml|uv.lock
23 changes: 23 additions & 0 deletions Containerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
FROM python:3.13-slim@sha256:f3614d98f38b0525d670f287b0474385952e28eb43016655dd003d0e28cf8652

COPY --from=ghcr.io/astral-sh/uv:0.6.13@sha256:0b6dc79013b689f3bc0cbf12807cb1c901beaafe80f2ee10a1d76aa3842afb92 /uv /bin/

# Define Git SHA build argument for Sentry
ARG git_sha="development"
ENV GIT_SHA=$git_sha

RUN adduser --disabled-password api
USER api

WORKDIR /app

COPY uv.lock pyproject.toml ./
RUN uv sync --frozen --no-editable --no-default-groups --no-install-project

COPY --chown=api:api src/ src/
RUN uv sync --frozen --no-editable --no-default-groups

# HTTP
EXPOSE 8080

ENTRYPOINT ["uv", "run", "--no-sync", "gunicorn", "--bind", "0.0.0.0:8080", "--workers", "4", "--worker-class", "uvicorn.workers.UvicornWorker", "api.server:app"]
20 changes: 0 additions & 20 deletions Dockerfile

This file was deleted.

7 changes: 3 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
name = "api.letsbuilda.dev"
description = "Public API for our projects"
authors = [{ name = "Bradley Reynolds", email = "bradley.reynolds@darbia.dev" }]
license = { text = "MIT" }
readme = "README.md"
requires-python = ">=3.12"
license = "MIT"
requires-python = ">=3.13"
dynamic = ["version"]
dependencies = [
# Core
Expand Down Expand Up @@ -45,7 +44,7 @@ dev = [
tests = ["pytest>=8.2.2", "pytest-randomly>=3.15.0", "coverage>=7.6.1"]

[build-system]
requires = ["setuptools", "wheel"]
requires = ["setuptools >= 77.0.3"]
build-backend = "setuptools.build_meta"

[tool.setuptools.dynamic.version]
Expand Down
Loading
Loading