Learn Environment
Public Slots | Signals | Public Member Functions | List of all members
ScriptWorker Class Reference

Manages the execution of scripts for tasks. More...

#include <script_worker.hpp>

Inheritance diagram for ScriptWorker:
Inheritance graph
Collaboration diagram for ScriptWorker:
Collaboration graph

Public Slots

void startExecution ()
 Starts the execution of the scripts. More...
 
void forceStop ()
 Forces the stop of all running scripts. More...
 
void executePythonScript (const QString &scriptPath, const QString &name)
 Executes a given Python script. More...
 

Signals

void finished ()
 Signal emitted when the script execution finishes. More...
 
void failed (const QString &error)
 Signal emitted when the script execution fails. More...
 

Public Member Functions

 ScriptWorker (const QString &notebookPath, const QString &convertedScriptPath, const QString &evalScriptPath, bool parallelizedEvaluation, int timeoutSeconds)
 Constructs a ScriptWorker object. More...
 

Detailed Description

Manages the execution of scripts for tasks.

The ScriptWorker class is responsible for converting and executing Jupyter notebooks, as well as evaluating the results. It handles the execution state and emits signals based on the success or failure of the scripts.

Constructor & Destructor Documentation

◆ ScriptWorker()

ScriptWorker::ScriptWorker ( const QString &  notebookPath,
const QString &  convertedScriptPath,
const QString &  evalScriptPath,
bool  parallelizedEvaluation,
int  timeoutSeconds 
)

Constructs a ScriptWorker object.

Parameters
notebookPathPath to the Jupyter notebook file.
convertedScriptPathPath to the converted script.
evalScriptPathPath to the evaluation script.
parallelizedEvaluationWhether the evaluation should run in parallel to the main script.
timeoutSecondsTimeout for script execution in seconds.

Member Function Documentation

◆ executePythonScript

void ScriptWorker::executePythonScript ( const QString &  scriptPath,
const QString &  name 
)
slot

Executes a given Python script.

Here is the caller graph for this function:

◆ failed

void ScriptWorker::failed ( const QString &  error)
signal

Signal emitted when the script execution fails.

Parameters
errorThe error message.
Here is the caller graph for this function:

◆ finished

void ScriptWorker::finished ( )
signal

Signal emitted when the script execution finishes.

Here is the caller graph for this function:

◆ forceStop

void ScriptWorker::forceStop ( )
slot

Forces the stop of all running scripts.

◆ startExecution

void ScriptWorker::startExecution ( )
slot

Starts the execution of the scripts.

Here is the caller graph for this function:

The documentation for this class was generated from the following files: