moved to separate function

This commit is contained in:
Andrew Nester 2023-08-17 17:50:00 +02:00
parent a9ed5df9fe
commit 476439c48e
No known key found for this signature in database
GPG Key ID: 12BC628A44B7DA57
1 changed files with 34 additions and 25 deletions

View File

@ -53,6 +53,15 @@ func (m *transform) Name() string {
func (m *transform) Apply(ctx context.Context, b *bundle.Bundle) error {
wheelTasks := libraries.FindAllWheelTasks(b)
for _, wheelTask := range wheelTasks {
err := generateNotebookTrampoline(b, wheelTask)
if err != nil {
return err
}
}
return nil
}
func generateNotebookTrampoline(b *bundle.Bundle, wheelTask *jobs.Task) error {
taskDefinition := wheelTask.PythonWheelTask
libraries := wheelTask.Libraries
@ -81,7 +90,7 @@ func (m *transform) Apply(ctx context.Context, b *bundle.Bundle) error {
wheelTask.NotebookTask = &jobs.NotebookTask{
NotebookPath: path.Join(parts...),
}
}
return nil
}