From 5aa43b74817b08e615b2caefe5d3e38ae26b664d Mon Sep 17 00:00:00 2001 From: Ryan Davis Date: Sat, 25 Jul 2026 23:19:48 -0700 Subject: [PATCH] ci: 12 add devcontainer and RBS pipeline config Provide a reproducible devcontainer environment for local development, sourced from Redux Build System features. Add rbs.toml to configure unit testing, artifact publishing, and integration/push stages for CI automation. --- .devcontainer/devcontainer-lock.json | 14 ++++++++++++++ .devcontainer/devcontainer.json | 25 +++++++++++++++++++++++++ .devcontainer/post-create.sh | 8 ++++++++ .gitignore | 4 ++++ rbs.toml | 18 ++++++++++++++++++ 5 files changed, 69 insertions(+) create mode 100644 .devcontainer/devcontainer-lock.json create mode 100644 .devcontainer/devcontainer.json create mode 100755 .devcontainer/post-create.sh create mode 100644 rbs.toml diff --git a/.devcontainer/devcontainer-lock.json b/.devcontainer/devcontainer-lock.json new file mode 100644 index 0000000..d64856c --- /dev/null +++ b/.devcontainer/devcontainer-lock.json @@ -0,0 +1,14 @@ +{ + "features": { + "ghcr.io/devcontainers/features/docker-outside-of-docker:1": { + "version": "1.10.0", + "resolved": "ghcr.io/devcontainers/features/docker-outside-of-docker@sha256:c2c2cf829505ead8e4892c88c31b6594ae94a2bbb209e16e1fac456c1a3a624e", + "integrity": "sha256:c2c2cf829505ead8e4892c88c31b6594ae94a2bbb209e16e1fac456c1a3a624e" + }, + "ghcr.io/reduxisu/features/rbs:1": { + "version": "1.0.0", + "resolved": "ghcr.io/reduxisu/features/rbs@sha256:65cfaf2554fb1707ea84cf34f3defbd1f34ba528b359627e70e423f7ac7da3e6", + "integrity": "sha256:65cfaf2554fb1707ea84cf34f3defbd1f34ba528b359627e70e423f7ac7da3e6" + } + } +} diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..35b40dc --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,25 @@ +{ + "name": "quantumsolver", + "image": "mcr.microsoft.com/devcontainers/python:3.13", + "features": { + "ghcr.io/devcontainers/features/docker-outside-of-docker:1": { "moby": false }, + "ghcr.io/reduxisu/features/rbs:1": {} + }, + "mounts": [ + "source=quantumsolver-venv,target=${containerWorkspaceFolder}/.venv,type=volume" + ], + "appPort": [27100], + "portsAttributes": { + "27100": { "label": "quantumsolver (Flask)", "onAutoForward": "notify" } + }, + "containerUser": "vscode", + "remoteUser": "vscode", + "updateRemoteUserUID": true, + "postStartCommand": "if [ \"$(stat -c %U /workspaces/quantumsolver)\" != \"vscode\" ]; then sudo chown -R vscode:vscode /workspaces/quantumsolver; fi", + "postCreateCommand": "bash .devcontainer/post-create.sh", + "customizations": { + "vscode": { + "extensions": ["ms-python.python", "charliermarsh.ruff", "ms-python.black-formatter"] + } + } +} diff --git a/.devcontainer/post-create.sh b/.devcontainer/post-create.sh new file mode 100755 index 0000000..3f8640e --- /dev/null +++ b/.devcontainer/post-create.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash +set -euo pipefail + +# .venv is a container-local volume so it never collides with the host venv; make it writable. +sudo chown "$(id -u):$(id -g)" .venv + +# uv is provided by the rbs feature; it installs system-wide to /usr/local/bin. +uv sync --all-groups diff --git a/.gitignore b/.gitignore index d2da743..5818a16 100644 --- a/.gitignore +++ b/.gitignore @@ -15,6 +15,10 @@ htmlcov/ dist/ requirements.audit.txt +# rbs pipeline output +.rbs/ +report.md + # editor/OS artifacts .DS_Store *.swp diff --git a/rbs.toml b/rbs.toml new file mode 100644 index 0000000..65dca27 --- /dev/null +++ b/rbs.toml @@ -0,0 +1,18 @@ +# Redux Build System pipeline config. See github.com/ReduxISU/Redux_Build_System. +engine = "uv" +package = "quantumsolver" + +[unit-test] +python-versions = ["3.12", "3.13"] +coverage-min = 85 + +[artifact] +image = "ghcr.io/reduxisu/quantumsolver" +port = 27100 +health-path = "/health" + +[integration] +command = "uv run pytest tests/integration -v" + +[push] +on-branch = "main"