From c89e62023f8cb67d1ebc21876007e602b4d82c67 Mon Sep 17 00:00:00 2001
From: FlorianJacta <98709993+FlorianJacta@users.noreply.github.com>
Date: Wed, 11 Oct 2023 18:49:42 +0200
Subject: [PATCH 1/5] Update Job executions
---
.../src/step_07.py | 4 ++--
.../step_07/{config_07.svg => config.svg} | 0
.../step_07/{step_07.md => index.md} | 21 ++++++++++---------
3 files changed, 13 insertions(+), 12 deletions(-)
rename docs/knowledge_base/tutorials/scenario_management_overview/step_07/{config_07.svg => config.svg} (100%)
rename docs/knowledge_base/tutorials/scenario_management_overview/step_07/{step_07.md => index.md} (82%)
diff --git a/docs/knowledge_base/tutorials/scenario_management_overview/src/step_07.py b/docs/knowledge_base/tutorials/scenario_management_overview/src/step_07.py
index ba12ae80d..e733da80b 100644
--- a/docs/knowledge_base/tutorials/scenario_management_overview/src/step_07.py
+++ b/docs/knowledge_base/tutorials/scenario_management_overview/src/step_07.py
@@ -33,8 +33,8 @@ def add(nb):
# Configuration of the pipeline and scenario
scenario_cfg = Config.configure_scenario(id="my_scenario",
- task_configs=[first_task_cfg,
- second_task_cfg])
+ task_configs=[first_task_cfg,
+ second_task_cfg])
Config.export("config_07.toml")
diff --git a/docs/knowledge_base/tutorials/scenario_management_overview/step_07/config_07.svg b/docs/knowledge_base/tutorials/scenario_management_overview/step_07/config.svg
similarity index 100%
rename from docs/knowledge_base/tutorials/scenario_management_overview/step_07/config_07.svg
rename to docs/knowledge_base/tutorials/scenario_management_overview/step_07/config.svg
diff --git a/docs/knowledge_base/tutorials/scenario_management_overview/step_07/step_07.md b/docs/knowledge_base/tutorials/scenario_management_overview/step_07/index.md
similarity index 82%
rename from docs/knowledge_base/tutorials/scenario_management_overview/step_07/step_07.md
rename to docs/knowledge_base/tutorials/scenario_management_overview/step_07/index.md
index 19f41422a..e86be6118 100644
--- a/docs/knowledge_base/tutorials/scenario_management_overview/step_07/step_07.md
+++ b/docs/knowledge_base/tutorials/scenario_management_overview/step_07/index.md
@@ -13,7 +13,7 @@ Changing the execution mode can be useful for running multiple tasks in parallel
- _development_ mode: synchronous. The default execution mode is _development_.
-In this step, we define a new configuration and functions to showcase the two execution modes.
+We define a configuration and functions to showcase the two execution modes.
```python
# Normal function used by Taipy
@@ -26,7 +26,7 @@ def add(nb):
return nb + 10
```
-![](config_07.svg){ width=700 style="margin:auto;display:block;border: 4px solid rgb(210,210,210);border-radius:7px" }
+![](config.svg){ width=700 style="margin:auto;display:block;border: 4px solid rgb(210,210,210);border-radius:7px" }
This line of code alters the execution mode. Setting it to _standalone_ makes Taipy Core work asynchronously.
In this configuration, a maximum of two tasks can run simultaneously.
@@ -92,20 +92,21 @@ output_cfg = Config.configure_data_node("output")
# Configuration of tasks
first_task_cfg = Config.configure_task("double",
- double,
- input_cfg,
- intermediate_cfg)
+ double,
+ input_cfg,
+ intermediate_cfg)
second_task_cfg = Config.configure_task("add",
- add,
- intermediate_cfg,
- output_cfg)
+ add,
+ intermediate_cfg,
+ output_cfg)
# Configuration of the pipeline and scenario
scenario_cfg = Config.configure_scenario(id="my_scenario",
- task_configs=[first_task_cfg,
- second_task_cfg])
+ task_configs=[first_task_cfg,
+ second_task_cfg])
+Config.export("config_07.toml")
if __name__=="__main__":
tp.Core().run()
From bc9f94fa8bd75e0e71c822f324a47e4ea8605599 Mon Sep 17 00:00:00 2001
From: FlorianJacta <98709993+FlorianJacta@users.noreply.github.com>
Date: Thu, 12 Oct 2023 11:00:24 +0200
Subject: [PATCH 2/5] No download for all steps
---
.../tutorials/scenario_management_overview/step_07/index.md | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/docs/knowledge_base/tutorials/scenario_management_overview/step_07/index.md b/docs/knowledge_base/tutorials/scenario_management_overview/step_07/index.md
index e86be6118..6d1a46aab 100644
--- a/docs/knowledge_base/tutorials/scenario_management_overview/step_07/index.md
+++ b/docs/knowledge_base/tutorials/scenario_management_overview/step_07/index.md
@@ -1,6 +1,5 @@
-> You can download the code for
-Step 7
-or all the steps here.
+> You can download the code
+here.
# Executing jobs
From de48f0656b334592ca6d03d5fdefdf3c52f02c4c Mon Sep 17 00:00:00 2001
From: Jean-Robin
Date: Thu, 12 Oct 2023 11:46:24 +0200
Subject: [PATCH 3/5] Update
docs/knowledge_base/tutorials/scenario_management_overview/step_07/index.md
---
.../tutorials/scenario_management_overview/step_07/index.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/knowledge_base/tutorials/scenario_management_overview/step_07/index.md b/docs/knowledge_base/tutorials/scenario_management_overview/step_07/index.md
index 6d1a46aab..14a2f7f51 100644
--- a/docs/knowledge_base/tutorials/scenario_management_overview/step_07/index.md
+++ b/docs/knowledge_base/tutorials/scenario_management_overview/step_07/index.md
@@ -25,7 +25,7 @@ def add(nb):
return nb + 10
```
-![](config.svg){ width=700 style="margin:auto;display:block;border: 4px solid rgb(210,210,210);border-radius:7px" }
+![Configuration](config.svg){ width=700 style="margin:auto;display:block;border: 4px solid rgb(210,210,210);border-radius:7px" }
This line of code alters the execution mode. Setting it to _standalone_ makes Taipy Core work asynchronously.
In this configuration, a maximum of two tasks can run simultaneously.
From 4a5b4e161c65956e261ef09730d03227c95f167d Mon Sep 17 00:00:00 2001
From: FlorianJacta <98709993+FlorianJacta@users.noreply.github.com>
Date: Thu, 12 Oct 2023 14:56:51 +0200
Subject: [PATCH 4/5] Move Python code
---
.../{src/config_07.toml => step_07/config.toml} | 0
.../tutorials/scenario_management_overview/step_07/index.md | 6 +++++-
.../{src/step_07.py => step_07/job_execution.py} | 0
.../{src/step_07_toml.py => step_07/job_execution_toml.py} | 0
4 files changed, 5 insertions(+), 1 deletion(-)
rename docs/knowledge_base/tutorials/scenario_management_overview/{src/config_07.toml => step_07/config.toml} (100%)
rename docs/knowledge_base/tutorials/scenario_management_overview/{src/step_07.py => step_07/job_execution.py} (100%)
rename docs/knowledge_base/tutorials/scenario_management_overview/{src/step_07_toml.py => step_07/job_execution_toml.py} (100%)
diff --git a/docs/knowledge_base/tutorials/scenario_management_overview/src/config_07.toml b/docs/knowledge_base/tutorials/scenario_management_overview/step_07/config.toml
similarity index 100%
rename from docs/knowledge_base/tutorials/scenario_management_overview/src/config_07.toml
rename to docs/knowledge_base/tutorials/scenario_management_overview/step_07/config.toml
diff --git a/docs/knowledge_base/tutorials/scenario_management_overview/step_07/index.md b/docs/knowledge_base/tutorials/scenario_management_overview/step_07/index.md
index 14a2f7f51..51ea74295 100644
--- a/docs/knowledge_base/tutorials/scenario_management_overview/step_07/index.md
+++ b/docs/knowledge_base/tutorials/scenario_management_overview/step_07/index.md
@@ -1,5 +1,9 @@
> You can download the code
-here.
+here. Here is the
+Python version
+with the
+TOML file
+.
# Executing jobs
diff --git a/docs/knowledge_base/tutorials/scenario_management_overview/src/step_07.py b/docs/knowledge_base/tutorials/scenario_management_overview/step_07/job_execution.py
similarity index 100%
rename from docs/knowledge_base/tutorials/scenario_management_overview/src/step_07.py
rename to docs/knowledge_base/tutorials/scenario_management_overview/step_07/job_execution.py
diff --git a/docs/knowledge_base/tutorials/scenario_management_overview/src/step_07_toml.py b/docs/knowledge_base/tutorials/scenario_management_overview/step_07/job_execution_toml.py
similarity index 100%
rename from docs/knowledge_base/tutorials/scenario_management_overview/src/step_07_toml.py
rename to docs/knowledge_base/tutorials/scenario_management_overview/step_07/job_execution_toml.py
From e41368b7ca029b7ac9e8ffd918a0ded6d6611359 Mon Sep 17 00:00:00 2001
From: FlorianJacta <98709993+FlorianJacta@users.noreply.github.com>
Date: Thu, 12 Oct 2023 17:07:54 +0200
Subject: [PATCH 5/5] Accept suggestions
---
.../tutorials/scenario_management_overview/step_07/index.md | 2 +-
.../scenario_management_overview/step_07/job_execution.py | 2 +-
.../scenario_management_overview/step_07/job_execution_toml.py | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/docs/knowledge_base/tutorials/scenario_management_overview/step_07/index.md b/docs/knowledge_base/tutorials/scenario_management_overview/step_07/index.md
index 51ea74295..bad2cce58 100644
--- a/docs/knowledge_base/tutorials/scenario_management_overview/step_07/index.md
+++ b/docs/knowledge_base/tutorials/scenario_management_overview/step_07/index.md
@@ -67,7 +67,7 @@ if __name__=="__main__":
scenario_1.submit(wait=True, timeout=5)
```
-## Entire code
+# Entire code
```python
diff --git a/docs/knowledge_base/tutorials/scenario_management_overview/step_07/job_execution.py b/docs/knowledge_base/tutorials/scenario_management_overview/step_07/job_execution.py
index e733da80b..32c51b81a 100644
--- a/docs/knowledge_base/tutorials/scenario_management_overview/step_07/job_execution.py
+++ b/docs/knowledge_base/tutorials/scenario_management_overview/step_07/job_execution.py
@@ -36,7 +36,7 @@ def add(nb):
task_configs=[first_task_cfg,
second_task_cfg])
-Config.export("config_07.toml")
+Config.export("config.toml")
if __name__=="__main__":
tp.Core().run()
diff --git a/docs/knowledge_base/tutorials/scenario_management_overview/step_07/job_execution_toml.py b/docs/knowledge_base/tutorials/scenario_management_overview/step_07/job_execution_toml.py
index d2c649097..eea150271 100644
--- a/docs/knowledge_base/tutorials/scenario_management_overview/step_07/job_execution_toml.py
+++ b/docs/knowledge_base/tutorials/scenario_management_overview/step_07/job_execution_toml.py
@@ -14,7 +14,7 @@ def add(nb):
return nb + 10
-Config.load('config_07.toml')
+Config.load('config.toml')
Config.configure_job_executions(mode="standalone", max_nb_of_workers=2)