Go to the documentation of this file. 1 #ifndef SCRIPT_WORKER_HPP
2 #define SCRIPT_WORKER_HPP
34 const QString &convertedScriptPath,
35 const QString &evalScriptPath,
36 bool parallelizedEvaluation,
65 void failed(
const QString &error);
71 void convertAndExecuteNotebook();
76 void executeConvertedScript();
81 void evaluateScriptInParallel();
91 void checkAndEmitFinished();
98 QString formatMessage(
const QString &msg,
bool fromEval =
false);
100 QString notebookPath;
101 QString convertedScriptPath;
102 QString evalScriptPath;
103 bool parallelizedEvaluationRequired;
106 bool mainScriptFinished;
107 bool evalScriptFinished;
109 QList<ProcessRunner*> processRunners;
112 QString evaluationOutput;
115 #endif // SCRIPT_WORKER_HPP
A class for converting Jupyter notebooks to Python scripts and processing task pools.
Definition: notebook_converter.hpp:23
void forceStop()
Forces the stop of the running process.
Definition: process_runner.cpp:35
void finished()
Signal emitted when the script execution finishes.
void errorReady(const QString &error)
Signal emitted when the process produces an error.
void executePythonScript(const QString &scriptPath, const QString &name)
Executes a given Python script.
Definition: script_worker.cpp:172
ScriptWorker(const QString ¬ebookPath, const QString &convertedScriptPath, const QString &evalScriptPath, bool parallelizedEvaluation, int timeoutSeconds)
Constructs a ScriptWorker object.
Definition: script_worker.cpp:25
void failed(const QString &error)
Signal emitted when the script execution fails.
void start()
Starts the execution of the process.
Definition: process_runner.cpp:25
Manages the execution of an external process with a timeout.
Definition: process_runner.hpp:15
void outputReady(const QString &output)
Signal emitted when the process produces output.
void forceStop()
Forces the stop of all running scripts.
Definition: script_worker.cpp:206
bool convertNotebook(const QString ¬ebookPath)
Converts a Jupyter notebook to a Python script. Ignoring code cells with "solution" tag.
Definition: notebook_converter.cpp:29
void finished(int exitCode, QProcess::ExitStatus exitStatus)
Signal emitted when the process finishes.
void timeout()
Signal emitted when the process times out.
void startExecution()
Starts the execution of the scripts.
Definition: script_worker.cpp:38
Manages the execution of scripts for tasks.
Definition: script_worker.hpp:21