* Creates a function that runs a Python transform function. * @param filePath - The path to the Python file. * @param functionName - The name of the function to run (defaults to 'get_transform'). * @returns A function that executes the Python transform.
( filePath: string, functionName: string = 'get_transform', )
| 98 | * @returns A function that executes the Python transform. |
| 99 | */ |
| 100 | function getPythonTransformFunction( |
| 101 | filePath: string, |
| 102 | functionName: string = 'get_transform', |
| 103 | ): Function { |
| 104 | return async (output: string, context: { vars: Vars }) => { |
| 105 | return runPython(filePath, functionName, [output, context]); |
| 106 | }; |
| 107 | } |
| 108 | |
| 109 | /** |
| 110 | * Retrieves a transform function from a file, supporting both JavaScript and Python. |
no test coverage detected
searching dependent graphs…