Skip to content
Open
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
__pycache__/
venv/
.idea/
.task_markers
42 changes: 42 additions & 0 deletions mise.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
experimental_monorepo_root = true

[tasks.deploy-test-support]
description = "Deploy test support apps"
depends = [":py-bootstrap"]
run = [
"modal-client/.venv/bin/modal deploy test-support/libmodal_test_support.py",
#"uvx 'modal<1.2' deploy test-support/test_support_1_1.py"
"mkdir -p .task_markers && touch .task_markers/last-test-support-deploy"
]
sources = ["test-support/**", "modal-client/**"]
outputs = [".task_markers/last-test-support-deploy"]

# The following would preferably live in modal-client itself
# but that's blocked by mise naming of monorepo tasks vs non-monorepo tasks
# https://github.com/jdx/mise/discussions/6564#discussioncomment-14646640
[tools]
python = "3.11"
uv = "latest"

[env]
_.python.venv = {path = ".venv", create=true}

[tasks.py-install]
run = [
"uv pip install -r modal-client/requirements.dev.txt -e ./modal-client",
"mkdir -p .task_markers && touch .task_markers/py-install"
]
outputs = [".task_markers/py-install"]
# technically sources here should include all top level package names
# since they get symlinked in by the -e install, but that's hard to list
sources = ["modal-client/requirements.dev.txt", "modal-client/pyproject.toml"]

[tasks.py-protoc]
run = "cd modal-client && inv protoc"
sources = ["modal-client/modal_proto/*.proto"]
outputs = ["modal-client/modal_proto/*.py"]
depends = [":py-install"]

[tasks.py-bootstrap]
description = "Build and install the modal in ./modal-client"
depends = [":py-install", ":py-protoc"]
7 changes: 7 additions & 0 deletions modal-go/mise.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[tools]
go = "1.23"

[tasks.test]
description = "Test go"
run = "go test -v -run ./test"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Incorrect Regex Pattern in Go Test Command

The go test command incorrectly uses -run ./test. The -run flag expects a regex pattern for test names, but ./test is a package path. This means tests in the ./test directory won't run, as the command will try to match test function names against the literal pattern ./test.

Fix in Cursor Fix in Web

depends = ["//:deploy-test-support"]
25 changes: 25 additions & 0 deletions modal-js/mise.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
[tools]
node = "22"

[tasks.protoc]
run = "./scripts/gen-proto.sh"
sources = ["../modal-client/modal_proto/*.proto"]
outputs = "proto/**/*.ts"
depends = [":bootstrap"]

[tasks.bootstrap]
description = "Bootstrap or update js dev"
run = "npm i"
outputs = ["package-lock.json"]
sources = ["package.json"]

[tasks.build]
run = "npm run build"
depends = [":bootstrap", ":protoc"]
sources = ["src/**/*.ts"]
outputs = ["dist/index.js"]

[tasks.test]
description = "Test js"
run = "npm test"
depends = [":build", "//:deploy-test-support"]