You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 0c166c2
Browse filesBrowse the repository at this point in the historyBrowse files
Mirror the Go SDK's CLI 1.0 init-contract preparation (dagger/go-sdk#2)
for the Python SDK:
- add `targetRuntime` returning "python" so modules initialized through
this SDK target the built-in Python runtime
- replace `init` with `initModule(ws, name, path, template, pythonVersion,
useUv, baseImage)` that returns only the Python-owned template files; the
engine owns dagger.json / dagger-module.toml and workspace config and
merges this changeset with its own bookkeeping
- remove the SDK-owned `mod deps` / `mod engine` command surfaces, now
owned by the core CLI (`dagger module deps` / `dagger module engine`)
- mark the `modules` / `generate-all` discovery path as legacy dagger.json
discovery, obsolete for workspace-managed modules
- update the e2e checks and README to match
The Python build-config surface (`mod config`) stays in this module, as it
is genuinely SDK-specific. `initClient` is intentionally out of scope:
generating a Python client is a code-generator concern, mirroring the Go
SDK which stays module-only.
Signed-off-by: Yves Brissaud <yves@dagger.io>
assertContains(defaultChanges.layer.file(defaultPath + "/dagger.json").contents, "\"automaticGitignore\": false", "default init should check in generated files")
111
99
assertContains(defaultChanges.layer.file(defaultPath + "/src/init_default/__init__.py").contents, "class InitDefault:", "minimal template did not render the module type")
112
100
assertContains(defaultChanges.layer.file(defaultPath + "/src/init_default/__init__.py").contents, "source: dagger.Directory", "minimal template did not declare a Directory source field")
113
101
assertContains(defaultChanges.layer.file(defaultPath + "/src/init_default/__init__.py").contents, "def __init__(self, ws: dagger.Workspace)", "minimal template did not declare a Workspace constructor")
114
102
assertContains(defaultChanges.layer.file(defaultPath + "/src/init_default/__init__.py").contents, "self.source = ws.directory(\"/\")", "minimal template constructor did not assign ws.directory to source")
assertContains(legacyChanges.layer.file(legacyPath + "/src/init_legacy/main.py").contents, "class InitLegacy:", "legacy template did not render the module type")
118
105
119
106
null
@@ -161,66 +148,10 @@ type E2e {
161
148
}
162
149
163
150
"""
164
-
Engine version helpers should read dagger.json and write normalized versions.
0 commit comments