Skip to content

Commit 3d70efa

Browse files
committed
Upgrade to Resonant v0.50.3
1 parent 8c87cef commit 3d70efa

17 files changed

+404
-168
lines changed

.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.3
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: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
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+
"ghcr.io/rails/devcontainer/features/postgres-client:1": {
18+
"version": 18
19+
},
20+
"ghcr.io/devcontainers/features/terraform:1": {},
21+
"ghcr.io/devcontainers/features/aws-cli:1": {},
22+
"ghcr.io/devcontainers/features/github-cli:1": {},
23+
"ghcr.io/devcontainers-extra/features/heroku-cli:1": {}
24+
},
25+
"customizations": {
26+
"vscode": {
27+
"extensions": [
28+
// Python
29+
"ms-python.python",
30+
"ms-python.vscode-pylance",
31+
"ms-python.debugpy",
32+
"ms-python.mypy-type-checker",
33+
"charliermarsh.ruff",
34+
// Django
35+
"batisteo.vscode-django",
36+
"augustocdias.tasks-shell-input",
37+
// Other file formats
38+
"editorconfig.editorconfig",
39+
"mikestead.dotenv",
40+
"tamasfe.even-better-toml",
41+
"timonwong.shellcheck",
42+
// Infrastructure
43+
"ms-azuretools.vscode-containers",
44+
"hashicorp.terraform",
45+
"github.vscode-github-actions",
46+
// Remove AWS extension, as only the CLI is wanted; see: https://github.com/devcontainers/features/issues/1228
47+
"-AmazonWebServices.aws-toolkit-vscode"
48+
],
49+
"settings": {
50+
"containers.containerClient": "com.microsoft.visualstudio.containers.docker",
51+
// Container-specific Python paths
52+
"python.defaultInterpreterPath": "/home/vscode/venv/bin/python",
53+
// Ensure that `envFile` from any user settings is ignored; Docker Compose provides it.
54+
"python.envFile": "",
55+
// Reduce file watcher overhead for generated/cache directories.
56+
"files.watcherExclude": {
57+
"**/__pycache__/**": true,
58+
"**/.pytest_cache/**": true,
59+
"**/node_modules/**": true
60+
}
61+
}
62+
}
63+
},
64+
// Prevent a prompt every time the debugger opens a port or Django auto-restarts.
65+
"otherPortsAttributes": {
66+
"onAutoForward": "silent"
67+
},
68+
"portsAttributes": {
69+
"8000": {
70+
"label": "Django",
71+
// Show a dialog if the port isn't free.
72+
"requireLocalPort": true,
73+
"onAutoForward": "silent"
74+
},
75+
"8080": {
76+
"label": "Vite",
77+
"requireLocalPort": true,
78+
"onAutoForward": "silent"
79+
}
80+
},
81+
// Install a global Python and create a venv before VSCode extensions start,
82+
// to prevent prompts and ensure test discovery works on first load.
83+
"onCreateCommand": {
84+
"python": ["uv", "python", "install", "--default"],
85+
"venv": ["uv", "sync", "--all-extras", "--all-groups"],
86+
"npm": ["npm", "--prefix", "client", "install"]
87+
},
88+
// Ensure it is re-synced on restarts.
89+
"updateContentCommand": {
90+
"venv": ["uv", "sync", "--all-extras", "--all-groups"],
91+
"npm": ["npm", "--prefix", "client", "install"]
92+
}
93+
}
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 & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
name: CI
22
on:
33
pull_request:
4-
# types: [opened, synchronize]
5-
# TODO: why is this here?
64
push:
75
branches:
8-
- "main"
6+
- main
97
permissions:
108
contents: read
119
jobs:
@@ -15,7 +13,7 @@ jobs:
1513
matrix:
1614
linter: [eslint, typescript]
1715
name: Lint [${{ matrix.linter }}]
18-
runs-on: ubuntu-latest
16+
runs-on: ubuntu-24.04
1917
steps:
2018
- name: Checkout repository
2119
uses: actions/checkout@v6
@@ -32,7 +30,7 @@ jobs:
3230
working-directory: client
3331
test-python:
3432
name: Test Python
35-
runs-on: ubuntu-latest
33+
runs-on: ubuntu-24.04
3634
services:
3735
postgres:
3836
image: postgis/postgis:latest
@@ -55,7 +53,7 @@ jobs:
5553
- 5672:5672
5654
minio:
5755
# This image does not require any command arguments (which GitHub Actions don't support)
58-
image: bitnamilegacy/minio:2025.7.23
56+
image: bitnamilegacy/minio:latest
5957
env:
6058
MINIO_ROOT_USER: minioAccessKey
6159
MINIO_ROOT_PASSWORD: minioSecretKey
@@ -66,16 +64,15 @@ jobs:
6664
--health-start-interval 2s
6765
ports:
6866
- 9000:9000
69-
7067
steps:
7168
- name: Checkout repository
7269
uses: actions/checkout@v6
7370
- name: Install uv
7471
uses: astral-sh/setup-uv@v7
75-
7672
- name: Run tests
77-
run: uv run tox
73+
run: |
74+
uv run tox
7875
env:
7976
DJANGO_DATABASE_URL: postgres://postgres:postgres@localhost:5432/django
8077
DJANGO_CELERY_BROKER_URL: amqp://localhost:5672/
81-
DJANGO_MINIO_STORAGE_URL: http://minioAccessKey:minioSecretKey@localhost:9000/django-storage-testing
78+
DJANGO_MINIO_STORAGE_URL: http://minioAccessKey:minioSecretKey@localhost:9000/django-storage

.vscode/launch.json

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
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+
},
13+
{
14+
"name": "Django: Server (eager Celery)",
15+
"type": "debugpy",
16+
"request": "launch",
17+
"program": "${workspaceFolder}/manage.py",
18+
"args": ["runserver_plus", "--print-sql", "localhost:8000"],
19+
"env": {
20+
"DJANGO_CELERY_TASK_ALWAYS_EAGER": "true"
21+
},
22+
"django": true,
23+
"console": "integratedTerminal"
24+
},
25+
{
26+
"name": "Django: Management Command",
27+
"type": "debugpy",
28+
"request": "launch",
29+
"program": "${workspaceFolder}/manage.py",
30+
"args": ["${input:managementCommand}"],
31+
"django": true,
32+
"console": "integratedTerminal"
33+
},
34+
{
35+
"name": "Celery: Worker",
36+
"type": "debugpy",
37+
"request": "launch",
38+
"module": "celery",
39+
"args": [
40+
"--app",
41+
"bats_ai.celery",
42+
"worker",
43+
"--loglevel",
44+
"INFO",
45+
"--pool",
46+
"solo",
47+
"--without-heartbeat"
48+
],
49+
"console": "integratedTerminal",
50+
"justMyCode": false
51+
},
52+
{
53+
"name": "Pytest: Debug",
54+
"type": "debugpy",
55+
"request": "launch",
56+
"purpose": ["debug-test"],
57+
"console": "integratedTerminal",
58+
"django": true,
59+
"justMyCode": false
60+
},
61+
{
62+
"name": "Vite: Dev Server",
63+
"type": "node",
64+
"request": "launch",
65+
"cwd": "${workspaceFolder}/client",
66+
"runtimeExecutable": "npm",
67+
"runtimeArgs": ["run", "dev"],
68+
"console": "integratedTerminal"
69+
}
70+
],
71+
"compounds": [
72+
{
73+
"name": "Django + Celery",
74+
"configurations": ["Django: Server", "Celery: Worker"],
75+
"stopAll": true
76+
},
77+
{
78+
"name": "Django + Celery + Vite",
79+
"configurations": ["Django: Server", "Celery: Worker", "Vite: Dev Server"],
80+
"stopAll": true
81+
}
82+
],
83+
"inputs": [
84+
{
85+
"id": "managementCommand",
86+
"type": "command",
87+
"command": "shellCommand.execute",
88+
"args": {
89+
"command": "./manage.py help --commands",
90+
"description": "Django management command",
91+
"allowCustomValues": true
92+
}
93+
}
94+
]
95+
}

.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)