Skip to content
Draft
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
41 changes: 0 additions & 41 deletions .devcontainer/Dockerfile

This file was deleted.

136 changes: 3 additions & 133 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,145 +1,15 @@
{
"build": {
"context": "..",
"dockerfile": "Dockerfile"
},
"containerEnv": {
"PRE_COMMIT_HOME": "/home/vscode/.cache/pre-commit",
"PYTHONPATH": "${containerWorkspaceFolder}",
"TZ": "Europe/Amsterdam",
"UV_CACHE_DIR": "/home/vscode/.cache/uv",
"UV_LINK_MODE": "copy",
"UV_PROJECT_ENVIRONMENT": "${containerWorkspaceFolder}/.venv",
"UV_PYTHON_DOWNLOADS": "never"
},
"customizations": {
"vscode": {
"extensions": [
"ms-azuretools.vscode-docker",
"ms-python.python",
"ms-python.vscode-pylance",
"ms-python.mypy-type-checker",
"charliermarsh.ruff",
"ms-toolsai.jupyter",
"ms-python.black-formatter",
"ms-python.debugpy",
"docker.docker",
"tamasfe.even-better-toml",
"cweijan.vscode-office",
"openai.chatgpt",
"github.vscode-github-actions",
"GitHub.vscode-pull-request-github",
"mtxr.sqltools",
"mtxr.sqltools-driver-mysql",
"mtxr.sqltools-driver-pg",
"mtxr.sqltools-driver-sqlite",
"ms-ossdata.vscode-pgsql",
"redhat.vscode-yaml",
"foxundermoon.shell-format"
],
"settings": {
"[json]": {
"editor.defaultFormatter": "vscode.json-language-features",
"editor.formatOnSave": true
},
"[jsonc]": {
"editor.defaultFormatter": "vscode.json-language-features",
"editor.formatOnSave": true
},
"[python]": {
"editor.codeActionsOnSave": {
"source.fixAll.ruff": "explicit",
"source.organizeImports.ruff": "explicit"
},
"editor.defaultFormatter": "ms-python.black-formatter",
"editor.formatOnSave": true
},
"[yaml]": {
"editor.defaultFormatter": "redhat.vscode-yaml",
"editor.formatOnSave": true
},
"chatgpt.openOnStartup": false,
"chatgpt.runCodexInWindowsSubsystemForLinux": true,
"debug.internalConsoleOptions": "neverOpen",
"debug.showProtocolLogs": false,
"editor.formatOnPaste": true,
"editor.rulers": [
88
],
"editor.trimAutoWhitespace": true,
"files.exclude": {
"**/.pytest_cache": true,
"**/.ruff_cache": true,
"**/__pycache__": true
},
"files.watcherExclude": {
"**/.git/objects/**": true,
"**/.pytest_cache": true,
"**/.ruff_cache": true,
"**/__pycache__": true
},
"git.ignoreLimitWarning": true,
"js/ts.tsdk.promptToUseWorkspaceVersion": true,
"mypy-type-checker.args": [
"--config-file=pyproject.toml"
],
"mypy-type-checker.cwd": "${workspaceFolder}",
"mypy-type-checker.importStrategy": "fromEnvironment",
"mypy-type-checker.reportingScope": "workspace",
"python-envs.terminal.autoActivationType": "off",
"python.analysis.typeCheckingMode": "standard",
"python.defaultInterpreterPath": "${workspaceFolder}/.venv/bin/python",
"python.terminal.activateEnvInCurrentTerminal": true,
"python.terminal.useEnvFile": true,
"python.testing.pytestArgs": [
"."
],
"python.testing.pytestEnabled": true,
"python.testing.unittestEnabled": false,
"ruff.enable": true,
"search.exclude": {
"**/.git": true,
"**/.pytest_cache": true,
"**/.venv": true,
"**/__pycache__": true,
"**/build": true,
"**/dist": true,
"**/node_modules": true
},
"terminal.integrated.defaultProfile.linux": "bash",
"terminal.integrated.env.linux": {
"PYTHONPATH": "${workspaceFolder}",
"UV_PROJECT_ENVIRONMENT": "${workspaceFolder}/.venv"
}
}
}
},
"features": {
"ghcr.io/devcontainers/features/docker-outside-of-docker:1": {
"enableNonRootDocker": "true",
"moby": "false",
"version": "latest"
},
"ghcr.io/devcontainers/features/git:1": {},
"ghcr.io/devcontainers/features/github-cli:1": {}
},
"image": "ghcr.io/techletes/devcontainer:latest",
"initializeCommand": "bash ${localWorkspaceFolder}/.devcontainer/initialize.sh",
"mounts": [
"source=${localEnv:HOME}/.gitconfig,target=/tmp/host-gitconfig,type=bind,consistency=cached",
"source=fst-uv-cache,target=/home/vscode/.cache/uv,type=volume",
"source=fst-pre-commit-cache,target=/home/vscode/.cache/pre-commit,type=volume",
"source=${localEnv:HOME}/.codex,target=/home/vscode/.codex,type=bind,consistency=cached",
"source=${localEnv:HOME}/.config/gh,target=/home/vscode/.config/gh,type=bind,consistency=cached"
],
"name": "zero-friction",
"overrideCommand": true,
"postAttachCommand": "bash .devcontainer/post-attach.sh",
"postCreateCommand": "bash .devcontainer/post-create.sh",
"remoteEnv": {
"CODEX_HOME": "/home/vscode/.codex"
},
"remoteUser": "vscode",
"updateRemoteUserUID": true,
"postAttachCommand": "techletes-dev post-attach python",
"postCreateCommand": "techletes-dev post-create python",
"waitFor": "postCreateCommand",
"workspaceFolder": "/workspaces/app",
"workspaceMount": "source=${localWorkspaceFolder},target=/workspaces/app,type=bind,consistency=cached"
Expand Down
10 changes: 10 additions & 0 deletions .devcontainer/initialize.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
#!/usr/bin/env bash
set -euo pipefail

docker pull ghcr.io/techletes/devcontainer:latest

repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
cd "${repo_root}"

# Bind mounts must have their host-side sources available before the container
# starts. These tools are installed in the container, so empty host directories
# are sufficient for contributors who do not use them locally.
mkdir -p "${HOME}/.codex" "${HOME}/.config/gh"
if [[ ! -e "${HOME}/.gitconfig" ]]; then
touch "${HOME}/.gitconfig"
fi

if [[ ! -f .env ]]; then
if [[ -f .env.template ]]; then
cp .env.template .env
Expand Down
15 changes: 0 additions & 15 deletions .devcontainer/post-attach.sh

This file was deleted.

42 changes: 0 additions & 42 deletions .devcontainer/post-create.sh

This file was deleted.

9 changes: 0 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ jobs:
all: ${{ steps.filter.outputs.all }}
python: ${{ steps.filter.outputs.python }}
pre_commit: ${{ steps.filter.outputs.pre_commit }}
devcontainer: ${{ steps.filter.outputs.devcontainer }}
steps:
- name: Checkout code
uses: actions/checkout@v6
Expand All @@ -58,8 +57,6 @@ jobs:
- '.pre-commit-config.yaml'
- '.secret.baseline'
- 'scripts/hooks/**'
devcontainer:
- '.devcontainer/**'

pre-commit:
uses: ./.github/workflows/test-pre-commit.yml
Expand All @@ -71,9 +68,3 @@ jobs:
if: ${{ needs.changed-files.outputs.all == 'true' || needs.changed-files.outputs.python == 'true' }}
needs: changed-files
secrets: inherit

devcontainer-smoke:
if: ${{ needs.changed-files.outputs.all == 'true' || needs.changed-files.outputs.devcontainer == 'true' }}
needs: changed-files
uses: ./.github/workflows/test-devcontainer.yml
secrets: inherit
49 changes: 0 additions & 49 deletions .github/workflows/test-devcontainer.yml

This file was deleted.

3 changes: 3 additions & 0 deletions .github/workflows/test-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ jobs:
- name: Install dependencies
run: uv sync

- name: Verify API Management version patches
run: uv run python scripts/patch_api_version.py --check

- name: Run tests with coverage
run: uv run pytest --cov --cov-report=term --cov-report=xml

Expand Down
5 changes: 4 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,16 @@ repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
# Preserve upstream OpenAPI exports exactly as downloaded.
- id: trailing-whitespace
exclude: ^openapi_specs/
- id: end-of-file-fixer
exclude: coverage\.svg$
exclude: ^(coverage\.svg$|openapi_specs/)
- id: check-toml
- id: check-json
- id: check-symlinks
- id: check-yaml
exclude: ^openapi_specs/
- id: check-added-large-files
exclude: uv.lock
- id: check-merge-conflict
Expand Down
Loading
Loading