-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmise.toml
More file actions
81 lines (66 loc) · 3.18 KB
/
Copy pathmise.toml
File metadata and controls
81 lines (66 loc) · 3.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
[tasks."server:dev"]
description = "Run the server in dev mode"
run = "uv run uvicorn src.main:app --reload --host 0.0.0.0 --port 4000"
dir = "server"
[tasks."server:api:gen"]
description = "Generate Pydantic models from the OpenAPI spec"
run = "uv run datamodel-codegen --input ../api/shareloop.openapi.yaml --output src/models/openapi.py --field-constraints --snake-case-field --base-class src.models.base.ApiBaseModel --output-datetime-class datetime"
dir = "server"
sources = ["../api/*.openapi.yaml"]
outputs = ["./src/models/openapi.py"]
[tasks."server:db:up"]
description = "Start the db with docker compose (external requirement)"
run = "docker compose up -d db"
[tasks."server:db:migrate"]
description = "Apply all pending Alembic migrations"
run = "uv run alembic upgrade head"
dir = "server"
env = { PYTHONPATH = "." }
[tasks."server:db:migration:new"]
description = "Create a new migration from model changes (pass args after --)"
run = "uv run alembic revision --autogenerate"
dir = "server"
env = { PYTHONPATH = "." }
[tasks."server:db:migration:create"]
description = "Create an empty migration for manual SQL (pass args after --)"
run = "uv run alembic revision"
dir = "server"
[tasks."server:db:stamp"]
description = "Stamp the database at the current head revision (no-op if already current)"
run = "uv run alembic stamp head"
dir = "server"
env = { PYTHONPATH = "." }
[tasks."server:lint"]
description = "Run ruff linter"
run = "uv run ruff check src/"
dir = "server"
[tasks."server:typecheck"]
description = "Run mypy type checker"
run = "uv run mypy src/"
dir = "server"
[tasks."server:check"]
description = "Run lint and typecheck"
dir = "server"
depends = ["server:lint", "server:typecheck"]
[tasks."app:dev"]
description = "Run the app in dev mode"
run = "flutter run"
dir = "app"
[tasks."app:dev2"]
description = "Run the app in dev mode (second user, isolated storage)"
run = "flutter run --dart-define=STORAGE_NAMESPACE=dev2_"
dir = "app"
[tasks."app:api:gen"]
description = "Generate the Flutter API client from the OpenAPI spec"
run = "openapi-generator-cli generate -i ../api/shareloop.openapi.yaml -g dart -o ./gen/api"
dir = "app"
tools = { java = "corretto-21", "npm:@openapitools/openapi-generator-cli" = "2.32.0" }
sources = ["../api/*.openapi.yaml"]
outputs = ["./gen/api/**/*"]
[env]
DATABASE_URL = "postgresql+asyncpg://shareloop:shareloop@localhost:5432/shareloop"
[tools]
python = "3.12"
uv = "latest"
flutter = { version = "3.41.9", platforms = { linux-arm64 = { url = 'https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_arm64_{{ version | replace(from="-stable", to="") }}-stable.tar.xz' }, linux-x64 = { url = 'https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_{{ version | replace(from="-stable", to="") }}-stable.tar.xz' } }, url = "https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_{{ version }}-stable.zip", version_expr = 'fromJSON(body).releases | filter({ #.channel == "stable" }) | match({ #.version >= "3.22" }) | map({ #.version }) | sortVersions()', version_list_url = "https://storage.googleapis.com/flutter_infra_release/releases/releases_linux.json" }
node = "latest"