Skip to content
Merged
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
2 changes: 1 addition & 1 deletion .dagger/lock
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[["version","1"]]
["","container.from",["docker.io/library/golang:1.25-alpine","linux/arm64"],"sha256:8d22e29d960bc50cd025d93d5b7c7d220b1ee9aa7a239b3c8f55a57e987e8d45","pin"]
["","git.head",["https://github.com/dagger/sdk-sdk"],"09da9576688ec4b495ae4a9443a4719da86ed25e","float"]
["","git.head",["https://github.com/dagger/sdk-sdk"],"d1532df4f7d322a7bdab02487accde9d21bbb464","float"]
2 changes: 1 addition & 1 deletion .dagger/modules/e2e/dagger.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "e2e",
"engineVersion": "v0.20.8",
"engineVersion": "v0.21.4",
"sdk": {
"source": "dang"
},
Expand Down
12 changes: 12 additions & 0 deletions .dagger/modules/e2e/main.dang
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,18 @@ type E2e {
null
}

"""
initClient should not materialize files itself. The engine records the client
and owns the generated context changeset.
"""
pub initClientCheck(ws: Workspace!): Void @check {
let changes = pythonSdk.initClient(ws, path: outputRoot + "/client", module: generateModulePath, dev: true)

assert(changes.isEmpty, "initClient should return an empty SDK changeset")

null
}

"""
config.get should reflect pyproject.toml and report unset values as null
rather than guessing, and config.set should edit only pyproject.toml.
Expand Down
2 changes: 1 addition & 1 deletion dagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
{
"name": "polyfill",
"source": "https://github.com/dagger/sdk-sdk/polyfill@main",
"pin": "09da9576688ec4b495ae4a9443a4719da86ed25e"
"pin": "d1532df4f7d322a7bdab02487accde9d21bbb464"
}
]
}
10 changes: 10 additions & 0 deletions dagger.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Dagger workspace configuration
# Install modules with: dagger install <module>
# Example:
# dagger install github.com/dagger/dagger/modules/wolfi

# Marker filename that skips generate when found at or above a Python SDK module root.
# settings.skipGenerateFilename = ""

[modules.e2e]
source = ".dagger/modules/e2e"
10 changes: 10 additions & 0 deletions python-sdk.dang
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,16 @@ type PythonSdk {
}
}

"""
Generate a typed Python client for `module` at `path`.

The engine records the managed client in workspace config before calling
this function. The engine owns materializing the generated client files.
"""
pub initClient(ws: Workspace!, path: String!, module: String!, dev: Boolean! = false): Changeset! {
polyfill.workspace(ws).fork.changes
}

"""
Render a Python template with the requested module name.
"""
Expand Down