Generated code for the Python module
( ctx context.Context, modSource *dagger.ModuleSource, introspectionJSON *dagger.File, )
| 145 | |
| 146 | // Generated code for the Python module |
| 147 | func (m *PythonSdk) Codegen( |
| 148 | ctx context.Context, |
| 149 | modSource *dagger.ModuleSource, |
| 150 | introspectionJSON *dagger.File, |
| 151 | ) (*dagger.GeneratedCode, error) { |
| 152 | m, err := m.Common(ctx, modSource, introspectionJSON) |
| 153 | if err != nil { |
| 154 | return nil, err |
| 155 | } |
| 156 | |
| 157 | ignorePaths := []string{".venv", "**/__pycache__"} |
| 158 | genPaths := []string{ |
| 159 | // TODO: uncomment when we start generating client bindings outside the library |
| 160 | // UserGenPath, |
| 161 | } |
| 162 | |
| 163 | if m.VendorPath != "" { |
| 164 | ignorePaths = append(ignorePaths, m.VendorPath) |
| 165 | genPaths = []string{m.VendorPath + "/**"} |
| 166 | } |
| 167 | |
| 168 | return dag. |
| 169 | GeneratedCode( |
| 170 | m.Container.Directory(m.ContextDirPath). |
| 171 | WithoutDirectory("sdk/runtime")). |
| 172 | WithVCSGeneratedPaths(genPaths). |
| 173 | WithVCSIgnoredPaths(ignorePaths), nil |
| 174 | } |
| 175 | |
| 176 | // Container for executing the Python module runtime |
| 177 | func (m *PythonSdk) ModuleRuntime( |
nothing calls this directly
no test coverage detected