Skip to content

Commit 6fdd14d

Browse files
authored
Merge pull request #475 from Kitware/resonant-upgrade
Upgrade to Resonant v0.50.4
2 parents dbdabb7 + b0fdab1 commit 6fdd14d

18 files changed

Lines changed: 438 additions & 170 deletions

.copier-answers.resonant.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
_commit: v0.48.1
1+
_commit: v0.50.4
22
_src_path: https://github.com/kitware-resonant/cookiecutter-resonant
33
core_app_name: core
44
include_example_code: false

.devcontainer/devcontainer.json

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
2+
// README at: https://github.com/devcontainers/templates/tree/main/src/docker-existing-docker-compose
3+
{
4+
"name": "bats-ai",
5+
"dockerComposeFile": [
6+
"../docker-compose.yml",
7+
"../docker-compose.override.yml",
8+
"./docker-compose.devcontainer.yml"
9+
],
10+
"service": "django",
11+
"overrideCommand": true,
12+
// The "vscode" user and remoteUser are set by the base image label (devcontainers/base).
13+
"workspaceFolder": "/home/vscode/bats-ai",
14+
"features": {
15+
"ghcr.io/devcontainers/features/git-lfs:1": {},
16+
"ghcr.io/devcontainers/features/node:1": {
17+
// Work around https://github.com/devcontainers/features/pull/1625
18+
"pnpmVersion": "none"
19+
},
20+
"ghcr.io/rails/devcontainer/features/postgres-client:1": {
21+
"version": 18
22+
},
23+
"ghcr.io/devcontainers/features/terraform:1": {},
24+
"ghcr.io/devcontainers/features/aws-cli:1": {},
25+
"ghcr.io/devcontainers/features/github-cli:1": {},
26+
"ghcr.io/devcontainers-extra/features/heroku-cli:1": {}
27+
},
28+
"customizations": {
29+
"vscode": {
30+
"extensions": [
31+
// Python
32+
"ms-python.python",
33+
"ms-python.vscode-pylance",
34+
"ms-python.debugpy",
35+
"ms-python.mypy-type-checker",
36+
"charliermarsh.ruff",
37+
// Django
38+
"batisteo.vscode-django",
39+
"augustocdias.tasks-shell-input",
40+
// Other file formats
41+
"editorconfig.editorconfig",
42+
"mikestead.dotenv",
43+
"tamasfe.even-better-toml",
44+
"timonwong.shellcheck",
45+
// Infrastructure
46+
"ms-azuretools.vscode-containers",
47+
"hashicorp.terraform",
48+
"github.vscode-github-actions",
49+
// Remove AWS extension, as only the CLI is wanted; see: https://github.com/devcontainers/features/issues/1228
50+
"-AmazonWebServices.aws-toolkit-vscode"
51+
],
52+
"settings": {
53+
"containers.containerClient": "com.microsoft.visualstudio.containers.docker",
54+
// Container-specific Python paths
55+
"python.defaultInterpreterPath": "/home/vscode/venv/bin/python",
56+
// Disable automatic Python venv activation in new terminals.
57+
"python-envs.terminal.autoActivationType": "off",
58+
// Ensure that `envFile` from any user settings is ignored; Docker Compose provides it.
59+
"python.envFile": "",
60+
// Reduce file watcher overhead for generated/cache directories.
61+
"files.watcherExclude": {
62+
"**/__pycache__/**": true,
63+
"**/.pytest_cache/**": true,
64+
"**/node_modules/**": true
65+
}
66+
}
67+
}
68+
},
69+
// Prevent a prompt every time the debugger opens a port or Django auto-restarts.
70+
"otherPortsAttributes": {
71+
"onAutoForward": "silent"
72+
},
73+
"portsAttributes": {
74+
"8000": {
75+
"label": "Django",
76+
// Show a dialog if the port isn't free.
77+
"requireLocalPort": true,
78+
"onAutoForward": "silent"
79+
},
80+
"8080": {
81+
"label": "Vite",
82+
"requireLocalPort": true,
83+
"onAutoForward": "silent"
84+
}
85+
},
86+
// Install a global Python and create a venv before VSCode extensions start,
87+
// to prevent prompts and ensure test discovery works on first load.
88+
"onCreateCommand": {
89+
"python": ["uv", "python", "install", "--default"],
90+
"venv": ["uv", "sync", "--all-extras", "--all-groups"],
91+
"npm": ["npm", "--prefix", "client", "install"]
92+
},
93+
// Ensure it is re-synced on restarts.
94+
"updateContentCommand": {
95+
"venv": ["uv", "sync", "--all-extras", "--all-groups"],
96+
"npm": ["npm", "--prefix", "client", "install"]
97+
}
98+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
services:
2+
django:
3+
# Don't expose ports, devcontainer forwarding is superior, since we can just bind to localhost.
4+
ports: !reset []
5+
# Don't auto-run the default command, launch.json or the terminal will be used.
6+
command: !reset []
7+
8+
celery:
9+
# Celery will be started via launch.json or the terminal.
10+
profiles: ["celery"]
11+
12+
client:
13+
# npm will be started via launch.json or the terminal.
14+
profiles: ["client"]

.editorconfig

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,11 @@ indent_size = 2
2727
indent_size = 4
2828
max_line_length = 100
2929

30-
[*.toml]
30+
[*.sh]
3131
indent_size = 2
3232

33-
[*.{yml,yaml}]
33+
[*.toml]
3434
indent_size = 2
3535

36-
[*.{js,jsx,ts,tsx,vue}]
36+
[*.{yml,yaml}]
3737
indent_size = 2
38-
max_line_length = 100
Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ on:
33
pull_request:
44
push:
55
branches:
6-
- "main"
6+
- main
77
permissions:
88
contents: read
99
jobs:
1010
lint-client:
11-
runs-on: ubuntu-latest
11+
runs-on: ubuntu-24.04
1212
steps:
1313
- name: Checkout repository
1414
uses: actions/checkout@v6
@@ -26,7 +26,7 @@ jobs:
2626
working-directory: client
2727
test-python:
2828
name: Test Python
29-
runs-on: ubuntu-latest
29+
runs-on: ubuntu-24.04
3030
services:
3131
postgres:
3232
image: postgis/postgis:latest
@@ -49,7 +49,7 @@ jobs:
4949
- 5672:5672
5050
minio:
5151
# This image does not require any command arguments (which GitHub Actions don't support)
52-
image: bitnamilegacy/minio:2025.7.23
52+
image: bitnamilegacy/minio:latest
5353
env:
5454
MINIO_ROOT_USER: minioAccessKey
5555
MINIO_ROOT_PASSWORD: minioSecretKey
@@ -60,17 +60,16 @@ jobs:
6060
--health-start-interval 2s
6161
ports:
6262
- 9000:9000
63-
6463
steps:
6564
- name: Checkout repository
6665
uses: actions/checkout@v6
6766
- name: Install uv
6867
uses: astral-sh/setup-uv@v7
69-
7068
- name: Run tests
71-
run: uv run tox
69+
run: |
70+
uv run --locked tox
7271
env:
7372
DJANGO_DATABASE_URL: postgres://postgres:postgres@localhost:5432/django
7473
DJANGO_CELERY_BROKER_URL: amqp://localhost:5672/
75-
DJANGO_MINIO_STORAGE_URL: http://minioAccessKey:minioSecretKey@localhost:9000/django-storage-testing
74+
DJANGO_MINIO_STORAGE_URL: http://minioAccessKey:minioSecretKey@localhost:9000/django-storage
7675
DJANGO_BATAI_WEB_URL: http://localhost:8080/

.vscode/launch.json

Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"name": "Django: Server",
6+
"type": "debugpy",
7+
"request": "launch",
8+
"program": "${workspaceFolder}/manage.py",
9+
"args": ["runserver_plus", "--print-sql", "localhost:8000"],
10+
"django": true,
11+
"console": "integratedTerminal",
12+
"justMyCode": false,
13+
"presentation": {
14+
"group": "2-services",
15+
"order": 1
16+
}
17+
},
18+
{
19+
"name": "Django: Server (eager Celery)",
20+
"type": "debugpy",
21+
"request": "launch",
22+
"program": "${workspaceFolder}/manage.py",
23+
"args": ["runserver_plus", "--print-sql", "localhost:8000"],
24+
"env": {
25+
"DJANGO_CELERY_TASK_ALWAYS_EAGER": "true"
26+
},
27+
"django": true,
28+
"console": "integratedTerminal",
29+
"justMyCode": false,
30+
"presentation": {
31+
"group": "3-utilities",
32+
"order": 1
33+
}
34+
},
35+
{
36+
"name": "Django: Management Command",
37+
"type": "debugpy",
38+
"request": "launch",
39+
"program": "${workspaceFolder}/manage.py",
40+
"args": ["${input:managementCommand}"],
41+
"django": true,
42+
"console": "integratedTerminal",
43+
"justMyCode": false,
44+
"presentation": {
45+
"group": "3-utilities",
46+
"order": 2
47+
}
48+
},
49+
{
50+
"name": "Celery: Worker",
51+
"type": "debugpy",
52+
"request": "launch",
53+
"module": "celery",
54+
"args": [
55+
"--app",
56+
"bats_ai.celery",
57+
"worker",
58+
"--loglevel",
59+
"INFO",
60+
"--pool",
61+
"solo",
62+
"--without-heartbeat"
63+
],
64+
"console": "integratedTerminal",
65+
"justMyCode": false,
66+
"presentation": {
67+
"group": "2-services",
68+
"order": 2
69+
}
70+
},
71+
{
72+
"name": "Pytest: Debug",
73+
"type": "debugpy",
74+
"request": "launch",
75+
"module": "pytest",
76+
"purpose": ["debug-test"],
77+
"console": "integratedTerminal",
78+
"django": true,
79+
"justMyCode": false,
80+
"presentation": {
81+
"hidden": true
82+
}
83+
},
84+
{
85+
"name": "Vite: Dev Server",
86+
"type": "node",
87+
"request": "launch",
88+
"cwd": "${workspaceFolder}/client",
89+
"runtimeExecutable": "npm",
90+
"runtimeArgs": ["run", "dev"],
91+
"console": "integratedTerminal",
92+
"presentation": {
93+
"group": "2-services",
94+
"order": 3
95+
}
96+
}
97+
],
98+
"compounds": [
99+
{
100+
"name": "Django + Celery + Vite",
101+
"configurations": ["Django: Server", "Celery: Worker", "Vite: Dev Server"],
102+
"stopAll": true,
103+
"presentation": {
104+
"group": "1-compound",
105+
"order": 1
106+
}
107+
}
108+
],
109+
"inputs": [
110+
{
111+
"id": "managementCommand",
112+
"type": "command",
113+
"command": "shellCommand.execute",
114+
"args": {
115+
"command": "./manage.py help --commands",
116+
"description": "Django management command",
117+
"allowCustomValues": true
118+
}
119+
}
120+
]
121+
}

.vscode/settings.json

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{
2+
// File cleanup
3+
"files.trimTrailingWhitespace": true,
4+
"files.insertFinalNewline": true,
5+
"files.trimFinalNewlines": true,
6+
7+
// Python
8+
"python.analysis.autoFormatStrings": true,
9+
"python.testing.pytestEnabled": true,
10+
"python.analysis.autoImportCompletions": true,
11+
"python.analysis.gotoDefinitionInStringLiteral": true,
12+
// Allow auto-importing from deeper symbols inside of Django.
13+
"python.analysis.packageIndexDepths": [
14+
{
15+
"name": "django",
16+
"depth": 6
17+
}
18+
],
19+
"python.analysis.inlayHints.pytestParameters": true,
20+
21+
// Django templates
22+
"emmet.includeLanguages": {
23+
"django-html": "html"
24+
},
25+
26+
// Type checking: Use Mypy and disable Pylance.
27+
"mypy-type-checker.importStrategy": "fromEnvironment",
28+
// Mypy daemon seems better, but is buggy in practice.
29+
"mypy-type-checker.preferDaemon": false,
30+
"mypy-type-checker.reportingScope": "file",
31+
"python.analysis.typeCheckingMode": "off",
32+
33+
// Ruff
34+
"[python]": {
35+
"editor.defaultFormatter": "charliermarsh.ruff"
36+
}
37+
}

0 commit comments

Comments
 (0)